- Merge release

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-03-14 14:57:59 -04:00
20 changed files with 2501 additions and 188 deletions

View File

@@ -1,5 +1,5 @@
import {DeleteFilled} from "@ant-design/icons";
import {Button, Form, Input, InputNumber, Select, Switch, Typography,} from "antd";
import {Button, Form, Input, InputNumber, Select, Space, Switch, Typography,} from "antd";
import React, {useState} from "react";
import {useTranslation} from "react-i18next";
import styled from "styled-components";
@@ -9,6 +9,7 @@ import {selectBodyshop} from "../../redux/user/user.selectors";
import {connect} from "react-redux";
import {createStructuredSelector} from "reselect";
import {useSplitTreatments} from "@splitsoftware/splitio-react";
import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component";
const SelectorDiv = styled.div`
.ant-form-item .ant-select {
@@ -180,7 +181,7 @@ export function ShopInfoResponsibilityCenterComponent({bodyshop, form}) {
</LayoutFormRow>
<LayoutFormRow header={t("bodyshop.labels.dms.cdk.payers")}>
<Form.List name={["cdk_configuration", "payers"]}>
{(fields, {add, remove}) => {
{(fields, {add, remove, move}) => {
return (
<div>
{fields.map((field, index) => (
@@ -238,11 +239,18 @@ export function ShopInfoResponsibilityCenterComponent({bodyshop, form}) {
</Select>
</Form.Item>
<DeleteFilled
onClick={() => {
remove(field.name);
}}
/>
<Space align="center">
d
onClick={() => {
remove(field.name);
}}
/>
<FormListMoveArrows
move={move}
index={index}
total={fields.length}
/>
</Space>
</LayoutFormRow>
</Form.Item>
))}
@@ -334,7 +342,7 @@ export function ShopInfoResponsibilityCenterComponent({bodyshop, form}) {
id="costs"
>
<Form.List name={["md_responsibility_centers", "costs"]}>
{(fields, {add, remove}) => {
{(fields, {add, remove, move}) => {
return (
<div>
{fields.map((field, index) => (
@@ -451,12 +459,18 @@ export function ShopInfoResponsibilityCenterComponent({bodyshop, form}) {
<Input onBlur={handleBlur}/>
</Form.Item>
)}
<DeleteFilled
onClick={() => {
remove(field.name);
}}
/>
<Space align="center">
<DeleteFilled
onClick={() => {
remove(field.name);
}}
/>
<FormListMoveArrows
move={move}
index={index}
total={fields.length}
/>
</Space>
</LayoutFormRow>
</Form.Item>
))}
@@ -482,7 +496,7 @@ export function ShopInfoResponsibilityCenterComponent({bodyshop, form}) {
id="profits"
>
<Form.List name={["md_responsibility_centers", "profits"]}>
{(fields, {add, remove}) => {
{(fields, {add, remove, move}) => {
return (
<div>
{fields.map((field, index) => (
@@ -584,11 +598,18 @@ export function ShopInfoResponsibilityCenterComponent({bodyshop, form}) {
<Input onBlur={handleBlur}/>
</Form.Item>
)}
<DeleteFilled
onClick={() => {
remove(field.name);
}}
/>
<Space align="center">
<DeleteFilled
onClick={() => {
remove(field.name);
}}
/>
<FormListMoveArrows
move={move}
index={index}
total={fields.length}
/>
</Space>
</LayoutFormRow>
</Form.Item>
))}
@@ -613,7 +634,7 @@ export function ShopInfoResponsibilityCenterComponent({bodyshop, form}) {
{(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && (
<>
<Form.List name={["md_responsibility_centers", "dms_defaults"]}>
{(fields, {add, remove}) => {
{(fields, {add, remove, move}) => {
return (
<div>
{fields.map((field, index) => (