From c3e6d3dc48bb15b6c8a7a4ffbc6ca19d453d6e51 Mon Sep 17 00:00:00 2001 From: Dave Richer Date: Wed, 21 Aug 2024 15:09:13 -0400 Subject: [PATCH 1/7] - Checkpoint Signed-off-by: Dave Richer --- ...oduction-list-config-manager.component.jsx | 105 ++++++++++-------- 1 file changed, 56 insertions(+), 49 deletions(-) diff --git a/client/src/components/production-list-table/production-list-config-manager.component.jsx b/client/src/components/production-list-table/production-list-config-manager.component.jsx index c33b164ff..95f4ceccf 100644 --- a/client/src/components/production-list-table/production-list-config-manager.component.jsx +++ b/client/src/components/production-list-table/production-list-config-manager.component.jsx @@ -376,7 +376,14 @@ export function ProductionListConfigManager({ > {t("general.actions.save")} - + @@ -384,55 +391,55 @@ export function ProductionListConfigManager({ return ( - - + + + - ); } From c89e4f1b414e2f8f41263f144aff90186c5ed619 Mon Sep 17 00:00:00 2001 From: Dave Richer Date: Wed, 21 Aug 2024 15:14:33 -0400 Subject: [PATCH 2/7] - Checkpoint Signed-off-by: Dave Richer --- client/src/translations/en_us/common.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index ff93baff8..1304eff5f 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -1180,7 +1180,7 @@ "vehicle": "Vehicle" }, "labels": { - "unsavedchanges": "Unsaved change.", + "unsavedchanges": "Unsaved changes.", "actions": "Actions", "areyousure": "Are you sure?", "barcode": "Barcode", From 90532427b67f3833f54ad8df71190a8801533206 Mon Sep 17 00:00:00 2001 From: Dave Richer Date: Wed, 21 Aug 2024 15:32:22 -0400 Subject: [PATCH 3/7] - Checkpoint Signed-off-by: Dave Richer --- ...oduction-list-config-manager.component.jsx | 40 +++++++++++++++++-- client/src/translations/en_us/common.json | 7 +++- client/src/translations/es/common.json | 7 +++- client/src/translations/fr/common.json | 7 +++- 4 files changed, 52 insertions(+), 9 deletions(-) diff --git a/client/src/components/production-list-table/production-list-config-manager.component.jsx b/client/src/components/production-list-table/production-list-config-manager.component.jsx index 95f4ceccf..80c32985f 100644 --- a/client/src/components/production-list-table/production-list-config-manager.component.jsx +++ b/client/src/components/production-list-table/production-list-config-manager.component.jsx @@ -362,7 +362,25 @@ export function ProductionListConfigManager({
{isAddingNewProfile && ( - + { + if (!value) { + return Promise.resolve(); + } + const nameExists = bodyshop.production_config.some((pc) => pc.name === value); + if (nameExists) { + return Promise.reject(new Error(t("production.errors.name_exists"))); + } + return Promise.resolve(); + } + } + ]} + > )} @@ -376,13 +394,22 @@ export function ProductionListConfigManager({ > {t("general.actions.save")} + @@ -417,7 +444,14 @@ export function ProductionListConfigManager({ .map((config) => (
- + {config.name} {config.name !== t("production.constants.main_profile") && ( diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index 1304eff5f..98d9418ec 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -1165,7 +1165,8 @@ "tryagain": "Try Again", "view": "View", "viewreleasenotes": "See What's Changed", - "remove_alert": "Are you sure you want to dismiss the alert?" + "remove_alert": "Are you sure you want to dismiss the alert?", + "saveas": "Save As" }, "errors": { "fcm": "You must allow notification permissions to have real time messaging. Click to try again.", @@ -2788,7 +2789,9 @@ "errors": { "boardupdate": "Error encountered updating Job. {{message}}", "removing": "Error removing from production board. {{error}}", - "settings": "Error saving board settings: {{error}}" + "settings": "Error saving board settings: {{error}}", + "name_exists": "A Profile with this name already exists. Please choose a different name.", + "name_required": "Profile name is required." }, "labels": { "kiosk_mode": "Kiosk Mode", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index 76f537e61..18edcbeeb 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -1165,7 +1165,8 @@ "tryagain": "", "view": "", "viewreleasenotes": "", - "remove_alert": "" + "remove_alert": "", + "saveas": "" }, "errors": { "fcm": "", @@ -2788,7 +2789,9 @@ "errors": { "boardupdate": "", "removing": "", - "settings": "" + "settings": "", + "name_exists": "", + "name_required": "" }, "labels": { "kiosk_mode": "", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index fccb1ce65..adc23a1a0 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -1165,7 +1165,8 @@ "tryagain": "", "view": "", "viewreleasenotes": "", - "remove_alert": "" + "remove_alert": "", + "saveas": "" }, "errors": { "fcm": "", @@ -2788,7 +2789,9 @@ "errors": { "boardupdate": "", "removing": "", - "settings": "" + "settings": "", + "name_exists": "", + "name_required": "" }, "labels": { "kiosk_mode": "", From 11785f3b862af6a3145fc1c46f92049e6d2b0715 Mon Sep 17 00:00:00 2001 From: Dave Richer Date: Wed, 21 Aug 2024 15:39:16 -0400 Subject: [PATCH 4/7] - Checkpoint Signed-off-by: Dave Richer --- ...oduction-list-config-manager.component.jsx | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/client/src/components/production-list-table/production-list-config-manager.component.jsx b/client/src/components/production-list-table/production-list-config-manager.component.jsx index 80c32985f..26fc45511 100644 --- a/client/src/components/production-list-table/production-list-config-manager.component.jsx +++ b/client/src/components/production-list-table/production-list-config-manager.component.jsx @@ -394,15 +394,17 @@ export function ProductionListConfigManager({ > {t("general.actions.save")} - + {!isAddingNewProfile && ( + + )}