BOD-52 #comment Implemented job updating based on owner fields. Currently, which fields are updated are hardcoded.
This commit is contained in:
@@ -6,7 +6,7 @@ import styled from "styled-components";
|
||||
|
||||
const SelectorDiv = styled.div`
|
||||
.ant-form-item .ant-select {
|
||||
width: 125px;
|
||||
width: 200px;
|
||||
}
|
||||
`;
|
||||
//TODO Fix up styles.
|
||||
@@ -24,7 +24,8 @@ export default function ShopInfoROStatusComponent({ form }) {
|
||||
return (
|
||||
<div>
|
||||
<Row>
|
||||
<Col span={12}>
|
||||
<Col span={8}>
|
||||
{t("bodyshop.labels.alljobstatuses")}
|
||||
<Form.List name={["md_ro_statuses", "statuses"]}>
|
||||
{(fields, { add, remove }) => {
|
||||
return (
|
||||
@@ -32,8 +33,7 @@ export default function ShopInfoROStatusComponent({ form }) {
|
||||
{fields.map((field, index) => (
|
||||
<Form.Item
|
||||
key={field.key}
|
||||
style={{ padding: 0, margin: 2 }}
|
||||
>
|
||||
style={{ padding: 0, margin: 2 }}>
|
||||
<div style={{ display: "flex" }}>
|
||||
<Form.Item
|
||||
style={{ padding: 0, margin: 2 }}
|
||||
@@ -45,8 +45,7 @@ export default function ShopInfoROStatusComponent({ form }) {
|
||||
required: true,
|
||||
message: t("general.validation.required")
|
||||
}
|
||||
]}
|
||||
>
|
||||
]}>
|
||||
<Input onBlur={handleBlur} />
|
||||
</Form.Item>
|
||||
<DeleteFilled
|
||||
@@ -59,12 +58,11 @@ export default function ShopInfoROStatusComponent({ form }) {
|
||||
))}
|
||||
<Form.Item>
|
||||
<Button
|
||||
type="dashed"
|
||||
type='dashed'
|
||||
onClick={() => {
|
||||
add();
|
||||
}}
|
||||
style={{ width: "100%" }}
|
||||
>
|
||||
style={{ width: "100%" }}>
|
||||
{t("bodyshop.actions.newstatus")}
|
||||
</Button>
|
||||
</Form.Item>
|
||||
@@ -75,6 +73,24 @@ export default function ShopInfoROStatusComponent({ form }) {
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<SelectorDiv>
|
||||
<Form.Item
|
||||
name={["md_ro_statuses", "open_statuses"]}
|
||||
label={t("bodyshop.fields.statuses.open_statuses")}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: t("general.validation.required"),
|
||||
type: "array"
|
||||
}
|
||||
]}>
|
||||
<Select mode='multiple'>
|
||||
{options.map((item, idx) => (
|
||||
<Select.Option key={idx} value={item}>
|
||||
{item}
|
||||
</Select.Option>
|
||||
))}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("bodyshop.fields.statuses.default_scheduled")}
|
||||
rules={[
|
||||
@@ -83,8 +99,7 @@ export default function ShopInfoROStatusComponent({ form }) {
|
||||
message: t("general.validation.required")
|
||||
}
|
||||
]}
|
||||
name={["md_ro_statuses", "default_scheduled"]}
|
||||
>
|
||||
name={["md_ro_statuses", "default_scheduled"]}>
|
||||
<Select>
|
||||
{options.map((item, idx) => (
|
||||
<Select.Option key={idx}>{item}</Select.Option>
|
||||
@@ -99,8 +114,7 @@ export default function ShopInfoROStatusComponent({ form }) {
|
||||
message: t("general.validation.required")
|
||||
}
|
||||
]}
|
||||
name={["md_ro_statuses", "default_arrived"]}
|
||||
>
|
||||
name={["md_ro_statuses", "default_arrived"]}>
|
||||
<Select>
|
||||
{options.map((item, idx) => (
|
||||
<Select.Option key={idx}>{item}</Select.Option>
|
||||
@@ -115,8 +129,7 @@ export default function ShopInfoROStatusComponent({ form }) {
|
||||
message: t("general.validation.required")
|
||||
}
|
||||
]}
|
||||
name={["md_ro_statuses", "default_exported"]}
|
||||
>
|
||||
name={["md_ro_statuses", "default_exported"]}>
|
||||
<Select>
|
||||
{options.map((item, idx) => (
|
||||
<Select.Option key={idx}>{item}</Select.Option>
|
||||
@@ -131,8 +144,7 @@ export default function ShopInfoROStatusComponent({ form }) {
|
||||
message: t("general.validation.required")
|
||||
}
|
||||
]}
|
||||
name={["md_ro_statuses", "default_imported"]}
|
||||
>
|
||||
name={["md_ro_statuses", "default_imported"]}>
|
||||
<Select>
|
||||
{options.map((item, idx) => (
|
||||
<Select.Option key={idx}>{item}</Select.Option>
|
||||
@@ -147,8 +159,7 @@ export default function ShopInfoROStatusComponent({ form }) {
|
||||
message: t("general.validation.required")
|
||||
}
|
||||
]}
|
||||
name={["md_ro_statuses", "default_invoiced"]}
|
||||
>
|
||||
name={["md_ro_statuses", "default_invoiced"]}>
|
||||
<Select>
|
||||
{options.map((item, idx) => (
|
||||
<Select.Option key={idx}>{item}</Select.Option>
|
||||
@@ -163,8 +174,7 @@ export default function ShopInfoROStatusComponent({ form }) {
|
||||
message: t("general.validation.required")
|
||||
}
|
||||
]}
|
||||
name={["md_ro_statuses", "default_completed"]}
|
||||
>
|
||||
name={["md_ro_statuses", "default_completed"]}>
|
||||
<Select>
|
||||
{options.map((item, idx) => (
|
||||
<Select.Option key={idx}>{item}</Select.Option>
|
||||
@@ -179,8 +189,7 @@ export default function ShopInfoROStatusComponent({ form }) {
|
||||
message: t("general.validation.required")
|
||||
}
|
||||
]}
|
||||
name={["md_ro_statuses", "default_delivered"]}
|
||||
>
|
||||
name={["md_ro_statuses", "default_delivered"]}>
|
||||
<Select>
|
||||
{options.map((item, idx) => (
|
||||
<Select.Option key={idx}>{item}</Select.Option>
|
||||
|
||||
Reference in New Issue
Block a user