IO-233 Add CDK Control List.

This commit is contained in:
Patrick Fic
2021-12-01 13:37:03 -08:00
parent cdc0c8bb37
commit 1483f5f7c8
8 changed files with 123 additions and 3 deletions

View File

@@ -201,6 +201,63 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
}}
</Form.List>
</LayoutFormRow>
<LayoutFormRow header={t("bodyshop.labels.dms.cdk.controllist")}>
<Form.List name={["cdk_configuration", "controllist"]}>
{(fields, { add, remove }) => {
return (
<div>
{fields.map((field, index) => (
<Form.Item key={field.key}>
<LayoutFormRow noDivider>
<Form.Item
label={t("jobs.fields.dms.payer.name")}
key={`${index}name`}
name={[field.name, "name"]}
rules={[
{
required: true,
},
]}
>
<Input />
</Form.Item>
<Form.Item
label={t("jobs.fields.dms.payer.controlnumber")}
key={`${index}controlnumber`}
name={[field.name, "controlnumber"]}
rules={[
{
required: true,
},
]}
>
<Input />
</Form.Item>
<DeleteFilled
onClick={() => {
remove(field.name);
}}
/>
</LayoutFormRow>
</Form.Item>
))}
<Form.Item>
<Button
type="dashed"
onClick={() => {
add();
}}
style={{ width: "100%" }}
>
{t("general.actions.add")}
</Button>
</Form.Item>
</div>
);
}}
</Form.List>
</LayoutFormRow>
</>
)}