Skip to content

Commit

Permalink
Esteban/feature/editable configs (#111)
Browse files Browse the repository at this point in the history
remove unused

bootstrap routing for edit component

bootstrap edit component

handle confirm save and cancel

implement edit

configs service

Handle SAVE errors and return new reference on `getOne`

Include description in template

Exclude rows not editable by users

user-defined settings
- exclude from list
- validate against edits

Better titles

define user-defined settings

implement terms editor

e2e testing

stub settings reponses

edit component unit tests

fix confitional render

better type names

better file name

better online order term naming
  • Loading branch information
esteban-gs authored Nov 19, 2022
1 parent bd8ad96 commit de7d020
Show file tree
Hide file tree
Showing 42 changed files with 1,373 additions and 12 deletions.
5 changes: 5 additions & 0 deletions cypress/constants/machete-constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ export const onlineOrderRoutes: IOnlineOrderRoute = {
orderConfirm: `${onlineOrdersBase}/order-confirm`,
};

const settingsBase: string = "/configuration/settings";
export const macheteSettingsRoutes: { list: string } = {
list: `${settingsBase}`
}

export const initConfirmCheckedTerms = [
{
name: "completion",
Expand Down
12 changes: 12 additions & 0 deletions cypress/fixtures/settings/DisableOnlineOrders.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"key": "DisableOnlineOrders",
"value": "FALSE",
"description": "Enter either TRUE or FALSE. Enter TRUE to turn off access to the online hiring portal",
"category": "OnlineOrders",
"publicConfig": true,
"createdby": "Init T. Script",
"datecreated": "2022-05-24T13:08:33.263",
"dateupdated": "2022-05-24T13:10:33.07",
"id": 28,
"updatedby": "[email protected]"
}
12 changes: 12 additions & 0 deletions cypress/fixtures/settings/DisableOnlineOrdersBanner.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"key": "DisableOnlineOrdersBanner",
"value": "Online orders are currently disabled. Please call the center.anythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganything",
"description": "The message for employers when the online hring portal is turned off",
"category": "OnlineOrders",
"publicConfig": true,
"createdby": "Init T. Script",
"datecreated": "2022-05-24T13:08:33.277",
"dateupdated": "2022-05-29T00:52:38.217",
"id": 29,
"updatedby": "[email protected]"
}
12 changes: 12 additions & 0 deletions cypress/fixtures/settings/DisableOnlineOrdersBannerInfoUrl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"key": "DisableOnlineOrdersBannerInfoUrl",
"value": "DisableOnlineOrdersBannerInfoUrlanythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganything",
"description": "The URL to your center's website explaining why online hiring is turned off",
"category": "OnlineOrders",
"publicConfig": true,
"createdby": "Init T. Script",
"datecreated": "2022-05-24T13:08:33.29",
"dateupdated": "2022-05-29T00:52:39.46",
"id": 30,
"updatedby": "[email protected]"
}
12 changes: 12 additions & 0 deletions cypress/fixtures/settings/DisableWorkersVaccineRequirement.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"key": "DisableWorkersVaccineRequirement",
"value": "FALSE",
"description": null,
"category": "OnlineOrders",
"publicConfig": true,
"createdby": "Init T. Script",
"datecreated": "2022-05-24T15:13:12.66",
"dateupdated": "2022-05-24T15:13:12.66",
"id": 32,
"updatedby": "Init T. Script"
}
12 changes: 12 additions & 0 deletions cypress/fixtures/settings/OnlineOrdersEnglishReqNote.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"key": "OnlineOrdersEnglishReqNote",
"value": "OnlineOrdersEnglishReqNoteanythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganything",
"description": "Displayed in the site details step. When employers requests an English-speaking worker, this note provides any center-specific details",
"category": "OnlineOrders",
"publicConfig": true,
"createdby": "Init T. Script",
"datecreated": "2022-05-24T13:08:33.137",
"dateupdated": "2022-05-29T00:53:29.85",
"id": 18,
"updatedby": "[email protected]"
}
12 changes: 12 additions & 0 deletions cypress/fixtures/settings/OnlineOrdersIntroMessage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"key": "OnlineOrdersIntroMessage",
"value": "OnlineOrdersIntroMessageanythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganything",
"description": "Displays in the 1st step of the online hiring. Include your center's basic information and how you program works, contact number, etc. Links to your website will also work.",
"category": "OnlineOrders",
"publicConfig": true,
"createdby": "Init T. Script",
"datecreated": "2022-05-24T13:08:33.113",
"dateupdated": "2022-05-29T00:53:28.473",
"id": 16,
"updatedby": "[email protected]"
}
12 changes: 12 additions & 0 deletions cypress/fixtures/settings/OnlineOrdersTerms.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"key": "OnlineOrdersTerms",
"value": "[{\"name\":\"term1\",\"text\":\"This is the term one\"},{\"name\":\"term2\",\"text\":\"This is the term two\"}]",
"description": "The terms that an employer has to accept before proceding with creating a work order",
"category": "OnlineOrders",
"publicConfig": true,
"createdby": "Init T. Script",
"datecreated": "2022-06-21T15:29:44.333",
"dateupdated": "2022-06-21T15:29:44.333",
"id": 1002,
"updatedby": "Init T. Script"
}
12 changes: 12 additions & 0 deletions cypress/fixtures/settings/OnlineOrdersTransportDetailsLink.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"key": "OnlineOrdersTransportDetailsLink",
"value": "OnlineOrdersTransportDetailsLinkanythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganything",
"description": "Will display if your transport provider cost rules have any fees. Include the link to your website with transport cost info ",
"category": "OnlineOrders",
"publicConfig": true,
"createdby": "Init T. Script",
"datecreated": "2022-05-24T13:08:33.15",
"dateupdated": "2022-05-29T00:53:31.323",
"id": 19,
"updatedby": "[email protected]"
}
12 changes: 12 additions & 0 deletions cypress/fixtures/settings/OrderConfirmTransportFeesNotice.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"key": "OrderConfirmTransportFeesNotice",
"value": "OrderConfirmTransportFeesNoticeanythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganything",
"description": "Will display in the last step if employer chooses a transport method with fees. Inlcude text on why the fee applies",
"category": "OnlineOrders",
"publicConfig": true,
"createdby": "Init T. Script",
"datecreated": "2022-05-24T13:08:33.16",
"dateupdated": "2022-05-29T00:53:32.737",
"id": 20,
"updatedby": "[email protected]"
}
12 changes: 12 additions & 0 deletions cypress/fixtures/settings/OrderReviewLaborCostMethodHelper.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"key": "OrderReviewLaborCostMethodHelper",
"value": "OrderReviewLaborCostMethodHelperanythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganything",
"description": "Displayed in the pre-sumbit review step. The helper text for labor cost explaining payment options",
"category": "OnlineOrders",
"publicConfig": true,
"createdby": "Init T. Script",
"datecreated": "2022-05-24T13:08:33.213",
"dateupdated": "2022-05-29T00:52:33.313",
"id": 24,
"updatedby": "[email protected]"
}
12 changes: 12 additions & 0 deletions cypress/fixtures/settings/OrderReviewLaborCostPayMethodHelper.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"key": "OrderReviewLaborCostPayMethodHelper",
"value": "OrderReviewLaborCostAboutUrlanythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganything",
"description": "Displayed in the pre-sumbit review step. The url to your website explaining the labor cost",
"category": "OnlineOrders",
"publicConfig": true,
"createdby": "Init T. Script",
"datecreated": "2022-05-24T13:08:33.24",
"dateupdated": "2022-05-29T00:52:35.697",
"id": 26,
"updatedby": "[email protected]"
}
12 changes: 12 additions & 0 deletions cypress/fixtures/settings/OrderReviewNextStepsHelper.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"key": "OrderReviewNextStepsHelper",
"value": "OrderReviewNextStepsHelperanythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganything",
"description": "Displayed in the pre-sumbit review step. Describe the next steps in the process, will employer need to wait for confirmation via a call, text or wait for email, etc.",
"category": "OnlineOrders",
"publicConfig": true,
"createdby": "Init T. Script",
"datecreated": "2022-05-24T13:08:33.25",
"dateupdated": "2022-05-29T00:52:36.943",
"id": 27,
"updatedby": "[email protected]"
}
12 changes: 12 additions & 0 deletions cypress/fixtures/settings/OrderReviewSkillsSummaryLabel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"key": "OrderReviewSkillsSummaryLabel",
"value": "OrderReviewSkillsSummaryLabelanythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganything",
"description": "Displayed in the pre-sumbit review step. The label for the work assignments summary table",
"category": "OnlineOrders",
"publicConfig": true,
"createdby": "Init T. Script",
"datecreated": "2022-05-24T13:08:33.183",
"dateupdated": "2022-05-29T00:52:30.817",
"id": 22,
"updatedby": "[email protected]"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"key": "OrderReviewTransportFeeEmplanationUrl",
"value": "OrderReviewTransportFeeAboutUrlanythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganything",
"description": "Displayed in the pre-sumbit review step. The url to your website explaining the transport fees",
"category": "OnlineOrders",
"publicConfig": true,
"createdby": "Init T. Script",
"datecreated": "2022-05-24T13:08:33.227",
"dateupdated": "2022-05-29T00:52:34.5",
"id": 25,
"updatedby": "[email protected]"
}
12 changes: 12 additions & 0 deletions cypress/fixtures/settings/OrderReviewTransportFeeMethodHelper.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"key": "OrderReviewTransportFeeMethodHelper",
"value": "OrderReviewTransportFeeMethodHelperanythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganything",
"description": "Displayed in the pre-sumbit review step. The helper text for transport fees explaining payment options",
"category": "OnlineOrders",
"publicConfig": true,
"createdby": "Init T. Script",
"datecreated": "2022-05-24T13:08:33.2",
"dateupdated": "2022-05-29T00:52:32.02",
"id": 23,
"updatedby": "[email protected]"
}
12 changes: 12 additions & 0 deletions cypress/fixtures/settings/OrderReviewWorkerCountLabel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"key": "OrderReviewWorkerCountLabel",
"value": "OrderReviewWorkerCountLabelanythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganything",
"description": "Displayed in the pre-sumbit review step. The label for the count of work assignments",
"category": "OnlineOrders",
"publicConfig": true,
"createdby": "Init T. Script",
"datecreated": "2022-05-24T13:08:33.173",
"dateupdated": "2022-05-29T00:52:29.627",
"id": 21,
"updatedby": "[email protected]"
}
12 changes: 12 additions & 0 deletions cypress/fixtures/settings/OrganizationAddress.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"key": "OrganizationAddress",
"value": "123 main st, seattle, wa 98101anythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganything",
"description": "Will be displayed in work order summaries, etc",
"category": "General",
"publicConfig": true,
"createdby": "Init T. Script",
"datecreated": "2022-05-24T13:08:33.047",
"dateupdated": "2022-05-29T00:53:25.613",
"id": 10,
"updatedby": "[email protected]"
}
14 changes: 14 additions & 0 deletions cypress/fixtures/settings/OrganizationName.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"key": "OrganizationName",
"value": "from stub",
"description": "Will be displayed in the employer's portal and throughout the app",
"category": "General",
"publicConfig": true,
"createdby": "Init T. Script",
"datecreated": "2022-05-24T13:08:32.937",
"dateupdated": "2022-05-29T00:53:24.283",
"id": 1,
"updatedby": "[email protected]"
}
]
12 changes: 12 additions & 0 deletions cypress/fixtures/settings/WorkCenterDescription_EN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"key": "WorkCenterDescription_EN",
"value": "<p>Casa Latina is nonprofit organization that empowers Latino immigrants through educational and economic opportunities. Our employment program connects immigrants with individuals and businesses looking for temporary labor. Our workers are skilled and dependable. From landscaping to dry walling to catering and housecleaning, if you can dream the project our workers can do it! <a href=\"http://casa-latina.org/get-involved/hire-worker \" target=\"_blank\">Learn more about Casa Latina</a>.</p>anythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganythinganything",
"description": "Will be visible in the welcome page for all users",
"category": "OnlineOrders",
"publicConfig": true,
"createdby": "Init T. Script",
"datecreated": "2022-05-24T13:08:33.103",
"dateupdated": "2022-05-29T00:53:27.143",
"id": 15,
"updatedby": "[email protected]"
}
Loading

0 comments on commit de7d020

Please sign in to comment.