From 1102670e66d4d7cc2fcf10696a53cfb9f978d6cf Mon Sep 17 00:00:00 2001 From: Dave Date: Tue, 24 Mar 2026 17:45:42 -0400 Subject: [PATCH] feature/IO-3624-Shop-Config-UX-Refresh - DMS Sections --- ...p-info.responsibilitycenters.component.jsx | 3066 +++++++++-------- client/src/translations/en_us/common.json | 1 + client/src/translations/es/common.json | 1 + client/src/translations/fr/common.json | 1 + 4 files changed, 1557 insertions(+), 1512 deletions(-) diff --git a/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx b/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx index 0a2fa27ca..4d5544f55 100644 --- a/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx +++ b/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx @@ -400,146 +400,212 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) { ]} {hasDMSKey && ( - <> - - {bodyshop.rr_dealerid && ( - {form.getFieldValue("rr_dealerid")} - )} - {bodyshop.cdk_dealerid && ( - - {form.getFieldValue("cdk_dealerid")} - - )} - {bodyshop.pbs_serialnumber && ( - - {form.getFieldValue("pbs_serialnumber")} - - )} - - - - - - - - - - - - - - - - - - {bodyshop.pbs_serialnumber && ( + +
+ + {bodyshop.rr_dealerid && ( + + {form.getFieldValue("rr_dealerid")} + + )} + {bodyshop.cdk_dealerid && ( + + {form.getFieldValue("cdk_dealerid")} + + )} + {bodyshop.pbs_serialnumber && ( + + {form.getFieldValue("pbs_serialnumber")} + + )} + + - + - )} - {bodyshop.pbs_serialnumber && ( - + - )} - {bodyshop.pbs_serialnumber && ( - + - )} - {bodyshop.pbs_serialnumber && ( - - )} - {bodyshop.pbs_serialnumber && ( - - + + )} + {bodyshop.pbs_serialnumber && ( + + + + + + + + - - - - - - - { - remove(field.name); - }} - /> - + ))} + + - ))} - - - -
- ); - }} - -
- - )} - + + ); + }} + +
+ + )} + + )} {HasFeatureAccess({ featureName: "export", bodyshop }) && ( <> @@ -919,1255 +923,1275 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) { {(fields, { add, remove }) => { return (
- {fields.map((field, index) => ( - -
- 0 ? false : true}> - - - - - - - { - remove(field.name); - }} - /> + {fields.map((field, index) => { + const dmsDefault = form.getFieldValue([ + "md_responsibility_centers", + "dms_defaults", + field.name + ]) || { name: undefined }; + + return ( + + } + onClick={() => { + remove(field.name); + }} + /> + } + > +
+ + + + + + + + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}costs-ats`} + name={[field.name, "costs", "ATS"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}costs-LAB`} + name={[field.name, "costs", "LAB"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}costs-LAE`} + name={[field.name, "costs", "LAE"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}costs-LAG`} + name={[field.name, "costs", "LAG"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}costs-LAR`} + name={[field.name, "costs", "LAR"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}costs-LAU`} + name={[field.name, "costs", "LAU"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}costs-LA2`} + name={[field.name, "costs", "LA2"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}costs-LA4`} + name={[field.name, "costs", "LA4"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}costs-PAC`} + name={[field.name, "costs", "PAC"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}costs-PAL`} + name={[field.name, "costs", "PAL"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}costs-PAN`} + name={[field.name, "costs", "PAN"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}costs-PAP`} + name={[field.name, "costs", "PAP"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}costs-PAS`} + name={[field.name, "costs", "PAS"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}costs-TOW`} + name={[field.name, "costs", "TOW"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}costs-MASH`} + name={[field.name, "costs", "MASH"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}profits-LAA`} + name={[field.name, "profits", "LAA"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}profits-LAD`} + name={[field.name, "profits", "LAD"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}profits-LAF`} + name={[field.name, "profits", "LAF"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}profits-LAM`} + name={[field.name, "profits", "LAM"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}profits-LAS`} + name={[field.name, "profits", "LAS"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}profits-LA1`} + name={[field.name, "profits", "LA1"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}profits-LA3`} + name={[field.name, "profits", "LA3"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}profits-PAA`} + name={[field.name, "profits", "PAA"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}profits-PAG`} + name={[field.name, "profits", "PAG"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}profits-PAM`} + name={[field.name, "profits", "PAM"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}profits-PAO`} + name={[field.name, "profits", "PAO"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}profits-PAR`} + name={[field.name, "profits", "PAR"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}profits-PASL`} + name={[field.name, "profits", "PASL"]} + > + ({ value: item, label: item }))} + /> + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}profits-MAPA`} + name={[field.name, "profits", "MAPA"]} + > + ({ value: item, label: item }))} + /> + + +
- - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-ats`} - name={[field.name, "costs", "ATS"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-LAB`} - name={[field.name, "costs", "LAB"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-LAE`} - name={[field.name, "costs", "LAE"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-LAG`} - name={[field.name, "costs", "LAG"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-LAR`} - name={[field.name, "costs", "LAR"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-LAU`} - name={[field.name, "costs", "LAU"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-LA2`} - name={[field.name, "costs", "LA2"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-LA4`} - name={[field.name, "costs", "LA4"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-PAC`} - name={[field.name, "costs", "PAC"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-PAL`} - name={[field.name, "costs", "PAL"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-PAN`} - name={[field.name, "costs", "PAN"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-PAP`} - name={[field.name, "costs", "PAP"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-PAS`} - name={[field.name, "costs", "PAS"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-TOW`} - name={[field.name, "costs", "TOW"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-MASH`} - name={[field.name, "costs", "MASH"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-LAA`} - name={[field.name, "profits", "LAA"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-LAD`} - name={[field.name, "profits", "LAD"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-LAF`} - name={[field.name, "profits", "LAF"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-LAM`} - name={[field.name, "profits", "LAM"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-LAS`} - name={[field.name, "profits", "LAS"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-LA1`} - name={[field.name, "profits", "LA1"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-LA3`} - name={[field.name, "profits", "LA3"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-PAA`} - name={[field.name, "profits", "PAA"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-PAG`} - name={[field.name, "profits", "PAG"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-PAM`} - name={[field.name, "profits", "PAM"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-PAO`} - name={[field.name, "profits", "PAO"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-PAR`} - name={[field.name, "profits", "PAR"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-PASL`} - name={[field.name, "profits", "PASL"]} - > - ({ value: item, label: item }))} - /> - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-MAPA`} - name={[field.name, "profits", "MAPA"]} - > - ({ value: item, label: item }))} - /> - - -
-
- ))} + + ); + })}