From d8d8a4701e7e2effd37674cf679b55a78b10dfe3 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Wed, 10 Jul 2024 14:54:04 -0700 Subject: [PATCH] IO-2839 DMS Allocation Labels Signed-off-by: Allan Carr --- ...p-info.responsibilitycenters.component.jsx | 3307 ++++++++--------- client/src/translations/en_us/common.json | 3 + client/src/translations/es/common.json | 3 + client/src/translations/fr/common.json | 3 + 4 files changed, 1661 insertions(+), 1655 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 e0437fef0..ca3c4722d 100644 --- a/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx +++ b/client/src/components/shop-info/shop-info.responsibilitycenters.component.jsx @@ -1,17 +1,17 @@ import { DeleteFilled } from "@ant-design/icons"; -import { Button, Form, Input, InputNumber, Select, Space, Switch, Typography } from "antd"; +import { useSplitTreatments } from "@splitsoftware/splitio-react"; +import { Button, Form, Input, InputNumber, Select, Space, Switch } from "antd"; import React, { useState } from "react"; import { useTranslation } from "react-i18next"; -import styled from "styled-components"; -import LayoutFormRow from "../layout-form-row/layout-form-row.component"; -import DataLabel from "../data-label/data-label.component"; -import { selectBodyshop } from "../../redux/user/user.selectors"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; -import { useSplitTreatments } from "@splitsoftware/splitio-react"; -import ShopInfoResponsibilitycentersTaxesComponent from "./shop-info.responsibilitycenters.taxes.component"; +import styled from "styled-components"; +import { selectBodyshop } from "../../redux/user/user.selectors"; import InstanceRenderManager from "../../utils/instanceRenderMgr"; +import DataLabel from "../data-label/data-label.component"; import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component"; +import LayoutFormRow from "../layout-form-row/layout-form-row.component"; +import ShopInfoResponsibilitycentersTaxesComponent from "./shop-info.responsibilitycenters.taxes.component"; const SelectorDiv = styled.div` .ant-form-item .ant-select { @@ -214,7 +214,6 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) { - { @@ -274,7 +273,6 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) { > - { remove(field.name); @@ -386,7 +384,6 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) { > */} - {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( - {(fields, { add, remove, move }) => { @@ -579,1631 +575,1632 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) { }} - {(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && ( <> - - {(fields, { add, remove, move }) => { - return ( -
- {fields.map((field, index) => ( - -
- - - - - - - - { - remove(field.name); - }} - /> - - - ({ - validator(rule, value) { - if (costOptions.includes(value)) { - return Promise.resolve(); - } - return Promise.reject(t("bodyshop.validation.centermustexist")); + + + {(fields, { add, remove, move }) => { + 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"]} + > + + + +
+
+ ))} + + - ))} - - - -
- ); - }} - +
+ ); + }} +
+ )} @@ -3720,7 +3717,6 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
- )} - {t("bodyshop.labels.responsibilitycenters.sales_tax_codes")} - - {(fields, { add, remove }) => { - return ( -
- {fields.map((field, index) => ( - - - - - - - - - - - - - - - - - - { - remove(field.name); - }} - /> - + + + {(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 7019097ed..6b76a6ed0 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -647,7 +647,10 @@ "payers": "Payers" }, "cdk_dealerid": "CDK Dealer ID", + "costsmapping": "Costs Mapping", + "dms_allocations": "DMS Allocations", "pbs_serialnumber": "PBS Serial Number", + "profitsmapping": "Profits Mapping", "title": "DMS" }, "emaillater": "Email Later", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index 51a33bc0c..48d6f107d 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -647,7 +647,10 @@ "payers": "" }, "cdk_dealerid": "", + "costsmapping": "", + "dms_allocations": "", "pbs_serialnumber": "", + "profitsmapping": "", "title": "" }, "emaillater": "", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index e3821ef9b..3fd409e2a 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -647,7 +647,10 @@ "payers": "" }, "cdk_dealerid": "", + "costsmapping": "", + "dms_allocations": "", "pbs_serialnumber": "", + "profitsmapping": "", "title": "" }, "emaillater": "",