diff --git a/client/src/components/rbac-wrapper/rbac-defaults.js b/client/src/components/rbac-wrapper/rbac-defaults.js index f2ce5d3fa..a5612c481 100644 --- a/client/src/components/rbac-wrapper/rbac-defaults.js +++ b/client/src/components/rbac-wrapper/rbac-defaults.js @@ -59,6 +59,7 @@ const ret = { "shop:dashboard": 3, "shop:rbac": 5, "shop:reportcenter": 2, + "shop:responsibilitycenter": 4, // Updated from "shop:responsibility" to "shop:responsibilitycenter" "shop:templates": 4, "shop:vendors": 2, diff --git a/client/src/components/shop-info/shop-info.rbac.component.jsx b/client/src/components/shop-info/shop-info.rbac.component.jsx index 5364ab5d9..dd840dddf 100644 --- a/client/src/components/shop-info/shop-info.rbac.component.jsx +++ b/client/src/components/shop-info/shop-info.rbac.component.jsx @@ -1,6 +1,5 @@ import { useSplitTreatments } from "@splitsoftware/splitio-react"; import { Form, InputNumber } from "antd"; -import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; @@ -12,12 +11,12 @@ import RbacWrapper from "../rbac-wrapper/rbac-wrapper.component"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop }); -const mapDispatchToProps = (dispatch) => ({ +const mapDispatchToProps = () => ({ //setUserLanguage: language => dispatch(setUserLanguage(language)) }); export default connect(mapStateToProps, mapDispatchToProps)(ShopInfoRbacComponent); -export function ShopInfoRbacComponent({ form, bodyshop }) { +export function ShopInfoRbacComponent({ bodyshop }) { const { t } = useTranslation(); const { treatments: { Simple_Inventory } @@ -29,756 +28,824 @@ export function ShopInfoRbacComponent({ form, bodyshop }) { return ( - {...HasFeatureAccess({ featureName: "export", bodyshop }) - ? [ - - - , - - - , - - - , - - - - ] - : []} - {...HasFeatureAccess({ featureName: "bills", bodyshop }) - ? [ - - - , - - - , - - - , - - - , - - - - ] - : []} - {...HasFeatureAccess({ featureName: "courtesycars", bodyshop }) - ? [ - - - , - - - , - - - , - - - , - - - , - - - - ] - : []} - {...HasFeatureAccess({ featureName: "csi", bodyshop }) - ? [ - - - , - - - - ] - : []} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {HasFeatureAccess({ featureName: "visualboard", bodyshop }) && ( + {[ + ...(HasFeatureAccess({ featureName: "export", bodyshop }) + ? [ + + + , + + + , + + + , + + + + ] + : []), + ...(HasFeatureAccess({ featureName: "bills", bodyshop }) + ? [ + + + , + + + , + + + , + + + , + + + + ] + : []), + ...(HasFeatureAccess({ featureName: "courtesycars", bodyshop }) + ? [ + + + , + + + , + + + , + + + , + + + , + + + + ] + : []), + ...(HasFeatureAccess({ featureName: "csi", bodyshop }) + ? [ + + + , + + + + ] + : []), - - )} - - - - - - - {HasFeatureAccess({ featureName: "scoreboard", bodyshop }) && ( + , - - )} - {...HasFeatureAccess({ featureName: "timetickets", bodyshop }) - ? [ - - - , - - - , - - - , - - - , - - - , - - - , - - - , - - - , - - - - ] - : []} - - - - - - - - - - - - - {/* - - */} - {HasFeatureAccess({ featureName: "media", bodyshop }) && ( + , - - )} - - - - {Simple_Inventory.treatment === "on" && ( - <> - - - - - - - - )} + , + + + , + + + , + + + , + + + , + + + , + + + , + + + , + + + , + + + , + + + , + + + , + + + , + + + , + + + , + + + , + + + , + + + , + + + , + ...(HasFeatureAccess({ featureName: "visualboard", bodyshop }) + ? [ + + + + ] + : []), + + + , + + + , + ...(HasFeatureAccess({ featureName: "scoreboard", bodyshop }) + ? [ + + + + ] + : []), + ...(HasFeatureAccess({ featureName: "timetickets", bodyshop }) + ? [ + + + , + + + , + + + , + + + , + + + , + + + , + + + , + + + + ] + : []), + + + , + + + , + + + , + + + , + + + , + + + , + ...(HasFeatureAccess({ featureName: "media", bodyshop }) + ? [ + + + + ] + : []), + + + , + ...(Simple_Inventory.treatment === "on" + ? [ + + + , + + + + ] + : []) + ]} ); 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 d6eb556d4..ccae00d4f 100644 --- a/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx +++ b/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx @@ -12,6 +12,7 @@ import DataLabel from "../data-label/data-label.component"; import { HasFeatureAccess } from "../feature-wrapper/feature-wrapper.component"; import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component"; import LayoutFormRow from "../layout-form-row/layout-form-row.component"; +import RbacWrapper from "../rbac-wrapper/rbac-wrapper.component"; import ShopInfoResponsibilitycentersTaxesComponent from "./shop-info.responsibilitycenters.taxes.component"; const SelectorDiv = styled.div` @@ -59,287 +60,288 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) { return (
- {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( - <> - {bodyshop.cdk_dealerid && ( - {form.getFieldValue("cdk_dealerid")} - )} - {bodyshop.pbs_serialnumber && ( - - {form.getFieldValue("pbs_serialnumber")} - - )} - - - - - - - - - - - - - - - - + + {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( + <> + {bodyshop.cdk_dealerid && ( + {form.getFieldValue("cdk_dealerid")} + )} {bodyshop.pbs_serialnumber && ( + + {form.getFieldValue("pbs_serialnumber")} + + )} + - + - )} - {bodyshop.pbs_serialnumber && ( - + - )} - {bodyshop.pbs_serialnumber && ( - - )} - {bodyshop.pbs_serialnumber && ( - - - )} - - - - {(fields, { add, remove, move }) => { - return ( -
- {fields.map((field, index) => ( - - - - - - - - - - - - + + + + {bodyshop.pbs_serialnumber && ( + + + + )} + {bodyshop.pbs_serialnumber && ( + + + + )} + {bodyshop.pbs_serialnumber && ( + + + + )} + + + + {(fields, { add, remove, move }) => { + return ( +
+ {fields.map((field, index) => ( + + + + + + + + + + + + + { + remove(field.name); + }} + /> + + + + + ))} + + + +
+ ); + }} +
+
+ + + {(fields, { add, remove }) => { + return ( +
+ {fields.map((field, index) => ( + + + + + + + + { remove(field.name); }} /> - - - + + + ))} + + - ))} - - - -
- ); - }} -
-
- - - {(fields, { add, remove }) => { - return ( -
- {fields.map((field, index) => ( - - - - - - - - - { - remove(field.name); - }} - /> - - - ))} - - - -
- ); - }} -
-
- - )} - {bodyshop.pbs_serialnumber && ( - <> - - {form.getFieldValue("pbs_serialnumber")} - - - )} - {HasFeatureAccess({ featureName: "export", bodyshop }) && ( - <> - - - {(fields, { add, remove, move }) => { - return ( -
- {fields.map((field, index) => ( - - - - - - - - - {/* + ); + }} + + + + )} + {bodyshop.pbs_serialnumber && ( + <> + + {form.getFieldValue("pbs_serialnumber")} + + + )} + {HasFeatureAccess({ featureName: "export", bodyshop }) && ( + <> + + + {(fields, { add, remove, move }) => { + return ( +
+ {fields.map((field, index) => ( + + + + + + + + + {/* */} - - - - {/* + + + {/* */} - {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( - - - - )} - {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( - - - - )} - {bodyshop.cdk_dealerid && ( - - - - )} - - { - remove(field.name); - }} - /> - - - + {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( + + + + )} + {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( + + + + )} + {bodyshop.cdk_dealerid && ( + + + + )} + + { + remove(field.name); + }} + /> + + + + + ))} + + - ))} - - - -
- ); - }} -
-
- - - {(fields, { add, remove, move }) => { - return ( -
- {fields.map((field, index) => ( - - - - - - {/* + ); + }} + + + + + {(fields, { add, remove, move }) => { + return ( +
+ {fields.map((field, index) => ( + + + + + + {/* */} - - - - - - - {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( - )} - {bodyshop.cdk_dealerid && ( - )} - - { - remove(field.name); - }} - /> - - - + {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( + + + + )} + {bodyshop.cdk_dealerid && ( + + + + )} + + { + remove(field.name); + }} + /> + + + + + ))} + + - ))} - - - -
- ); - }} -
-
- - {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( - <> - - - {(fields, { add, remove }) => { - return ( -
- {fields.map((field, index) => ( - -
- 0 ? false : true}> - - - - - - - { - remove(field.name); - }} - /> - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); +
+ ); + }} + + + + {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( + <> + + + {(fields, { add, remove }) => { + return ( +
+ {fields.map((field, index) => ( + +
+ 0 ? false : true}> + - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + ]} + > + + + + + + { + remove(field.name); + }} + /> + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-LAA`} - name={[field.name, "costs", "LAA"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-ats`} + name={[field.name, "costs", "ATS"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-LAB`} - name={[field.name, "costs", "LAB"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-LAA`} + name={[field.name, "costs", "LAA"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-LAD`} - name={[field.name, "costs", "LAD"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-LAB`} + name={[field.name, "costs", "LAB"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-LAE`} - name={[field.name, "costs", "LAE"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-LAD`} + name={[field.name, "costs", "LAD"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-LAF`} - name={[field.name, "costs", "LAF"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-LAE`} + name={[field.name, "costs", "LAE"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-LAG`} - name={[field.name, "costs", "LAG"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-LAF`} + name={[field.name, "costs", "LAF"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-LAM`} - name={[field.name, "costs", "LAM"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-LAG`} + name={[field.name, "costs", "LAG"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-LAR`} - name={[field.name, "costs", "LAR"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-LAM`} + name={[field.name, "costs", "LAM"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-LAS`} - name={[field.name, "costs", "LAS"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-LAR`} + name={[field.name, "costs", "LAR"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-LAU`} - name={[field.name, "costs", "LAU"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-LAS`} + name={[field.name, "costs", "LAS"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-LA1`} - name={[field.name, "costs", "LA1"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-LAU`} + name={[field.name, "costs", "LAU"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-LA2`} - name={[field.name, "costs", "LA2"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-LA1`} + name={[field.name, "costs", "LA1"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-LA3`} - name={[field.name, "costs", "LA3"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-LA2`} + name={[field.name, "costs", "LA2"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-LA4`} - name={[field.name, "costs", "LA4"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-LA3`} + name={[field.name, "costs", "LA3"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-PAA`} - name={[field.name, "costs", "PAA"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-LA4`} + name={[field.name, "costs", "LA4"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-PAC`} - name={[field.name, "costs", "PAC"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-PAA`} + name={[field.name, "costs", "PAA"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-PAG`} - name={[field.name, "costs", "PAG"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-PAC`} + name={[field.name, "costs", "PAC"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-PAL`} - name={[field.name, "costs", "PAL"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-PAG`} + name={[field.name, "costs", "PAG"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-PAM`} - name={[field.name, "costs", "PAM"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-PAL`} + name={[field.name, "costs", "PAL"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-PAN`} - name={[field.name, "costs", "PAN"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-PAM`} + name={[field.name, "costs", "PAM"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-PAO`} - name={[field.name, "costs", "PAO"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-PAN`} + name={[field.name, "costs", "PAN"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-PAP`} - name={[field.name, "costs", "PAP"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-PAO`} + name={[field.name, "costs", "PAO"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-PAR`} - name={[field.name, "costs", "PAR"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-PAP`} + name={[field.name, "costs", "PAP"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-PAS`} - name={[field.name, "costs", "PAS"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-PAR`} + name={[field.name, "costs", "PAR"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-PASL`} - name={[field.name, "costs", "PASL"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-PAS`} + name={[field.name, "costs", "PAS"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-TOW`} - name={[field.name, "costs", "TOW"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-PASL`} + name={[field.name, "costs", "PASL"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-MAPA`} - name={[field.name, "costs", "MAPA"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-TOW`} + name={[field.name, "costs", "TOW"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}costs-MASH`} - name={[field.name, "costs", "MASH"]} - > - - - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-MAPA`} + name={[field.name, "costs", "MAPA"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-ATS`} - name={[field.name, "profits", "ATS"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}costs-MASH`} + name={[field.name, "costs", "MASH"]} + > + + + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-LAA`} - name={[field.name, "profits", "LAA"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-ATS`} + name={[field.name, "profits", "ATS"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-LAB`} - name={[field.name, "profits", "LAB"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-LAA`} + name={[field.name, "profits", "LAA"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-LAD`} - name={[field.name, "profits", "LAD"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-LAB`} + name={[field.name, "profits", "LAB"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-LAE`} - name={[field.name, "profits", "LAE"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-LAD`} + name={[field.name, "profits", "LAD"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-LAF`} - name={[field.name, "profits", "LAF"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-LAE`} + name={[field.name, "profits", "LAE"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-LAG`} - name={[field.name, "profits", "LAG"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-LAF`} + name={[field.name, "profits", "LAF"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-LAM`} - name={[field.name, "profits", "LAM"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-LAG`} + name={[field.name, "profits", "LAG"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-LAR`} - name={[field.name, "profits", "LAR"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-LAM`} + name={[field.name, "profits", "LAM"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-LAS`} - name={[field.name, "profits", "LAS"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-LAR`} + name={[field.name, "profits", "LAR"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-LAU`} - name={[field.name, "profits", "LAU"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-LAS`} + name={[field.name, "profits", "LAS"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-LA1`} - name={[field.name, "profits", "LA1"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-LAU`} + name={[field.name, "profits", "LAU"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-LA2`} - name={[field.name, "profits", "LA2"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-LA1`} + name={[field.name, "profits", "LA1"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-LA3`} - name={[field.name, "profits", "LA3"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-LA2`} + name={[field.name, "profits", "LA2"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-LA4`} - name={[field.name, "profits", "LA4"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-LA3`} + name={[field.name, "profits", "LA3"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-PAA`} - name={[field.name, "profits", "PAA"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-LA4`} + name={[field.name, "profits", "LA4"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-PAC`} - name={[field.name, "profits", "PAC"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-PAA`} + name={[field.name, "profits", "PAA"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-PAG`} - name={[field.name, "profits", "PAG"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-PAC`} + name={[field.name, "profits", "PAC"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-PAL`} - name={[field.name, "profits", "PAL"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-PAG`} + name={[field.name, "profits", "PAG"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-PAM`} - name={[field.name, "profits", "PAM"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-PAL`} + name={[field.name, "profits", "PAL"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-PAN`} - name={[field.name, "profits", "PAN"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-PAM`} + name={[field.name, "profits", "PAM"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-PAO`} - name={[field.name, "profits", "PAO"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-PAN`} + name={[field.name, "profits", "PAN"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-PAP`} - name={[field.name, "profits", "PAP"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-PAO`} + name={[field.name, "profits", "PAO"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-PAR`} - name={[field.name, "profits", "PAR"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-PAP`} + name={[field.name, "profits", "PAP"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-PAS`} - name={[field.name, "profits", "PAS"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-PAR`} + name={[field.name, "profits", "PAR"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-PASL`} - name={[field.name, "profits", "PASL"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-PAS`} + name={[field.name, "profits", "PAS"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-TOW`} - name={[field.name, "profits", "TOW"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-PASL`} + name={[field.name, "profits", "PASL"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-MAPA`} - name={[field.name, "profits", "MAPA"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + key={`${index}profits-TOW`} + name={[field.name, "profits", "TOW"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - key={`${index}profits-MASH`} - name={[field.name, "profits", "MASH"]} - > - - - -
+ }) + ]} + key={`${index}profits-MAPA`} + name={[field.name, "profits", "MAPA"]} + > + +
+ ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); + } + }) + ]} + key={`${index}profits-MASH`} + name={[field.name, "profits", "MASH"]} + > + + + +
+
+ ))} + + - ))} - - - -
- ); - }} -
-
- - )} +
+ ); + }} +
+
+ + )} - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "ATS"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "ATS"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "LAA"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "LAA"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "LAB"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "LAB"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "LAD"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "LAD"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "LAE"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "LAE"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "LAF"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "LAF"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "LAG"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "LAG"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "LAM"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "LAM"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "LAR"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "LAR"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "LAS"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "LAS"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "LAU"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "LAU"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "LA1"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "LA1"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "LA2"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "LA2"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "LA3"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "LA3"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "LA4"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "LA4"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "PAA"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "PAA"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "PAC"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "PAC"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "PAG"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "PAG"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "PAL"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "PAL"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "PAM"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "PAM"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "PAN"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "PAN"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "PAO"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "PAO"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "PAP"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "PAP"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "PAR"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "PAR"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "PAS"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "PAS"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "PASL"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "PASL"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "TOW"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "TOW"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "MAPA"]} - > - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "MAPA"]} + > + + + ({ + validator(rule, value) { + if (costOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "costs", "MASH"]} - > - - - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "costs", "MASH"]} + > + + + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "ATS"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "ATS"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "LAA"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "LAA"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "LAB"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "LAB"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "LAD"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "LAD"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "LAE"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "LAE"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "LAF"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "LAF"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "LAG"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "LAG"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "LAM"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "LAM"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "LAR"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "LAR"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "LAS"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "LAS"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "LAU"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "LAU"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "LA1"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "LA1"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "LA2"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "LA2"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "LA3"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "LA3"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "LA4"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "LA4"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "PAA"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "PAA"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "PAC"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "PAC"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "PAG"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "PAG"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "PAL"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "PAL"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "PAM"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "PAM"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "PAN"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "PAN"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "PAO"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "PAO"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "PAP"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "PAP"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "PAR"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "PAR"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "PAS"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "PAS"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "PASL"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "PASL"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "TOW"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "TOW"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "MAPA"]} - > - - - ({ - validator(rule, value) { - if (profitOptions.includes(value)) { - return Promise.resolve(); + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "MAPA"]} + > + + + ({ + validator(rule, value) { + if (profitOptions.includes(value)) { + return Promise.resolve(); + } + return Promise.reject(t("bodyshop.validation.centermustexist")); } - return Promise.reject(t("bodyshop.validation.centermustexist")); - } - }) - ]} - name={["md_responsibility_centers", "defaults", "profits", "MASH"]} - > - - - - - - )} - - - - - {/* - - */} - {/* - - */} - - - - - - - {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( - - - + }) + ]} + name={["md_responsibility_centers", "defaults", "profits", "MASH"]} + > + + + + + )} - - - - - {DmsAp.treatment === "on" && ( - + @@ -3840,7 +3743,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) { name={[ "md_responsibility_centers", "taxes", - "federal_itc", + "federal", "accountnumber", ]} > @@ -3857,7 +3760,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) { name={[ "md_responsibility_centers", "taxes", - "federal_itc", + "federal", "accountname", ]} > @@ -3871,7 +3774,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) { //message: t("general.validation.required"), } ]} - name={["md_responsibility_centers", "taxes", "federal_itc", "accountdesc"]} + name={["md_responsibility_centers", "taxes", "federal", "accountdesc"]} >
@@ -3883,7 +3786,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) { //message: t("general.validation.required"), } ]} - name={["md_responsibility_centers", "taxes", "federal_itc", "accountitem"]} + name={["md_responsibility_centers", "taxes", "federal", "accountitem"]} > @@ -3896,7 +3799,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) { //message: t("general.validation.required"), } ]} - name={["md_responsibility_centers", "taxes", "federal_itc", "dms_acctnumber"]} + name={["md_responsibility_centers", "taxes", "federal", "dms_acctnumber"]} > @@ -3909,24 +3812,22 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) { //message: t("general.validation.required"), } ]} - name={["md_responsibility_centers", "taxes", "federal_itc", "rate"]} + name={["md_responsibility_centers", "taxes", "federal", "rate"]} > - )} - {InstanceRenderManager({ - imex: ( - + {DmsAp.treatment === "on" && ( + @@ -3938,6 +3839,107 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) { //message: t("general.validation.required"), }, ]} + name={[ + "md_responsibility_centers", + "taxes", + "federal_itc", + "accountnumber", + ]} + > + + */} + {/* + + */} + + + + + + + {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( + + + + )} + + + + + )} + {InstanceRenderManager({ + imex: ( + + + + + {/* */} - - - - - - - {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( - )} - - - - - ), - rome: - })} - {HasFeatureAccess({ featureName: "export", bodyshop }) && ( - <> - {InstanceRenderManager({ - rome: ( - <> + + + + {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( - - - - - ) - })} - {/**/} - {/* */} - {/* */} - {/* */} - {/* /!* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* *!/*/} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && (*/} - {/* */} - {/* */} - {/* */} - {/* )}*/} - {/* */} - {/* */} - {/* */} - {/**/} - AR
} id="AR"> - {/* + + +
+ ), + rome: + })} + {HasFeatureAccess({ featureName: "export", bodyshop }) && ( + <> + {InstanceRenderManager({ + rome: ( + <> + + + + + + + + ) + })} + {/**/} + {/* */} + {/* */} + {/*
*/} + {/* /!* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* *!/*/} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* */} + {/* {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && (*/} + {/* */} + {/* */} + {/* */} + {/* )}*/} + {/* */} + {/* */} + {/* */} + {/**/} + AR
} id="AR"> + {/* */} - - - - {/* + + + {/* */} -
- {DmsAp.treatment === "on" && ( - - {/* + {DmsAp.treatment === "on" && ( + + {/* */} - {/* */} - - - - - - - - - - - )} - Refund
} id="refund"> - {/* + + + + + + + + + + )} + Refund} id="refund"> + {/* */} - {/* */} - {/* */} - - - - - {InstanceRenderManager({ - rome: ( - Adjustments} id="refund"> - {bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber ? ( - <> - - - - - - - - ) : ( - <> - - - - - - - - )} - - ) - })} - {Qb_Multi_Ar.treatment === "on" && ( - Multiple Payers Item} id="accountitem"> - )} - - - {(fields, { add, remove }) => { - return ( -
- {fields.map((field, index) => ( - - 0 ? false : true}> - - - - - - - - - - - - - - - - { - remove(field.name); - }} - /> - - - ))} - -
} id="refund"> + {bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber ? ( + <> + - {t("bodyshop.actions.newsalestaxcode")} - - - - ); - }} -
-
- - )} + + + + + + + ) : ( + <> + + + + + + + + )} + + ) + })} + {Qb_Multi_Ar.treatment === "on" && ( + Multiple Payers Item} id="accountitem"> + + + + + )} + + + {(fields, { add, remove }) => { + return ( +
+ {fields.map((field, index) => ( + + 0 ? false : true}> + + + + + + + + + + + + + + + + { + remove(field.name); + }} + /> + + + ))} + + + +
+ ); + }} +
+
+ + )} + ); } diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index 6fefac6a7..482fa095f 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -517,6 +517,7 @@ "dashboard": "Shop -> Dashboard", "rbac": "Shop -> RBAC", "reportcenter": "Shop -> Report Center", + "responsibilitycenter": "Shop -> Responsibility Centers", "templates": "Shop -> Templates", "vendors": "Shop -> Vendors" }, diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index 735b3d5de..28b7af48e 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -517,6 +517,7 @@ "dashboard": "", "rbac": "", "reportcenter": "", + "responsibilitycenter": "", "templates": "", "vendors": "" }, diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index e73462a13..e667cc379 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -517,6 +517,7 @@ "dashboard": "", "rbac": "", "reportcenter": "", + "responsibilitycenter": "", "templates": "", "vendors": "" },