|
|
|
|
@@ -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 }) {
|
|
|
|
|
</Select.Option>
|
|
|
|
|
</Select>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
|
|
<Space align="center">
|
|
|
|
|
<DeleteFilled
|
|
|
|
|
onClick={() => {
|
|
|
|
|
@@ -274,7 +273,6 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|
|
|
|
>
|
|
|
|
|
<Input />
|
|
|
|
|
</Form.Item>
|
|
|
|
|
|
|
|
|
|
<DeleteFilled
|
|
|
|
|
onClick={() => {
|
|
|
|
|
remove(field.name);
|
|
|
|
|
@@ -386,7 +384,6 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|
|
|
|
>
|
|
|
|
|
<Input onBlur={handleBlur} />
|
|
|
|
|
</Form.Item> */}
|
|
|
|
|
|
|
|
|
|
{(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && (
|
|
|
|
|
<Form.Item
|
|
|
|
|
label={t("bodyshop.fields.dms.dms_acctnumber")}
|
|
|
|
|
@@ -451,7 +448,6 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|
|
|
|
}}
|
|
|
|
|
</Form.List>
|
|
|
|
|
</LayoutFormRow>
|
|
|
|
|
|
|
|
|
|
<LayoutFormRow header={t("bodyshop.labels.responsibilitycenters.profits")} id="profits">
|
|
|
|
|
<Form.List name={["md_responsibility_centers", "profits"]}>
|
|
|
|
|
{(fields, { add, remove, move }) => {
|
|
|
|
|
@@ -579,10 +575,10 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|
|
|
|
}}
|
|
|
|
|
</Form.List>
|
|
|
|
|
</LayoutFormRow>
|
|
|
|
|
|
|
|
|
|
<SelectorDiv>
|
|
|
|
|
{(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && (
|
|
|
|
|
<>
|
|
|
|
|
<LayoutFormRow id="mappingname" header={t("bodyshop.labels.dms.dms_allocations")}>
|
|
|
|
|
<Form.List name={["md_responsibility_centers", "dms_defaults"]}>
|
|
|
|
|
{(fields, { add, remove, move }) => {
|
|
|
|
|
return (
|
|
|
|
|
@@ -590,7 +586,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|
|
|
|
{fields.map((field, index) => (
|
|
|
|
|
<Form.Item key={field.key}>
|
|
|
|
|
<div>
|
|
|
|
|
<LayoutFormRow id="mappingname">
|
|
|
|
|
<LayoutFormRow id="mappingname" noDivider={index > 0 ? false : true}>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label={t("bodyshop.fields.dms.mappingname")}
|
|
|
|
|
key={`${index}name`}
|
|
|
|
|
@@ -616,7 +612,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
</LayoutFormRow>
|
|
|
|
|
<LayoutFormRow header={t("bodyshop.labels.defaultcostsmapping")} id="defaultcostsmapping">
|
|
|
|
|
<LayoutFormRow header={t("bodyshop.labels.dms.costsmapping")} id="costsmapping">
|
|
|
|
|
<Form.Item
|
|
|
|
|
label={t("bodyshop.fields.responsibilitycenters.ats")}
|
|
|
|
|
rules={[
|
|
|
|
|
@@ -1401,7 +1397,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|
|
|
|
</Select>
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</LayoutFormRow>
|
|
|
|
|
<LayoutFormRow header={t("bodyshop.labels.defaultprofitsmapping")}>
|
|
|
|
|
<LayoutFormRow header={t("bodyshop.labels.dms.profitsmapping")} id="profitsmapping">
|
|
|
|
|
<Form.Item
|
|
|
|
|
label={t("bodyshop.fields.responsibilitycenters.ats")}
|
|
|
|
|
rules={[
|
|
|
|
|
@@ -2204,6 +2200,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|
|
|
|
);
|
|
|
|
|
}}
|
|
|
|
|
</Form.List>
|
|
|
|
|
</LayoutFormRow>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
|
|
@@ -3720,7 +3717,6 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</LayoutFormRow>
|
|
|
|
|
</SelectorDiv>
|
|
|
|
|
|
|
|
|
|
<LayoutFormRow header={t("bodyshop.labels.responsibilitycenters.tax_accounts")} id="tax_accounts">
|
|
|
|
|
<Form.Item
|
|
|
|
|
label={t("bodyshop.fields.responsibilitycenters.federal_tax")}
|
|
|
|
|
@@ -4354,14 +4350,14 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|
|
|
|
</Form.Item>
|
|
|
|
|
</LayoutFormRow>
|
|
|
|
|
)}
|
|
|
|
|
<Typography.Title level={4}>{t("bodyshop.labels.responsibilitycenters.sales_tax_codes")}</Typography.Title>
|
|
|
|
|
<LayoutFormRow id="mappingname" header={t("bodyshop.labels.responsibilitycenters.sales_tax_codes")}>
|
|
|
|
|
<Form.List name={["md_responsibility_centers", "sales_tax_codes"]}>
|
|
|
|
|
{(fields, { add, remove }) => {
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
{fields.map((field, index) => (
|
|
|
|
|
<Form.Item key={field.key}>
|
|
|
|
|
<LayoutFormRow id="sales_tax_codes">
|
|
|
|
|
<LayoutFormRow id="sales_tax_codes" noDivider={index > 0 ? false : true}>
|
|
|
|
|
<Form.Item
|
|
|
|
|
label={t("bodyshop.fields.responsibilitycenters.sales_tax_codes.description")}
|
|
|
|
|
key={`${index}description`}
|
|
|
|
|
@@ -4435,6 +4431,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|
|
|
|
);
|
|
|
|
|
}}
|
|
|
|
|
</Form.List>
|
|
|
|
|
</LayoutFormRow>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|