IO-1542 Automatically set next contact date on intake.

This commit is contained in:
Patrick Fic
2021-12-28 09:42:23 -08:00
parent 4a46bdb9e8
commit 5ef1530d37
6 changed files with 41 additions and 1 deletions

View File

@@ -79,9 +79,19 @@ export function JobChecklistForm({
...(type === "intake" && {
scheduled_completion: values.scheduled_completion,
}),
...(type === "intake" &&
bodyshop.intakechecklist &&
bodyshop.intakechecklist.next_contact_hours &&
bodyshop.intakechecklist.next_contact_hours > 0 && {
date_next_contact: moment().add(
bodyshop.intakechecklist.next_contact_hours,
"hours"
),
}),
...(type === "deliver" && {
actual_completion: values.actual_completion,
}),
[(type === "intake" && "intakechecklist") ||
(type === "deliver" && "deliverchecklist")]: {
...values,

View File

@@ -180,6 +180,12 @@ export default function ShopInfoIntakeChecklistComponent({ form }) {
))}
</Select>
</Form.Item>
<Form.Item
name={["intakechecklist", "next_contact_hours"]}
label={t("bodyshop.fields.intake.next_contact_hours")}
>
<InputNumber min={0} precision={0} />
</Form.Item>
</SelectorDiv>
<LayoutFormRow header={t("bodyshop.labels.deliverchecklist")}>

View File

@@ -256,6 +256,7 @@
"inhousevendorid": "In House Vendor ID",
"insurance_vendor_id": "Insurance Vendor ID",
"intake": {
"next_contact_hours": "Automatic Next Contact Date - Hours from Intake",
"templates": "Intake Templates"
},
"invoice_federal_tax_rate": "Invoices - Federal Tax Rate",

View File

@@ -256,6 +256,7 @@
"inhousevendorid": "",
"insurance_vendor_id": "",
"intake": {
"next_contact_hours": "",
"templates": ""
},
"invoice_federal_tax_rate": "",

View File

@@ -256,6 +256,7 @@
"inhousevendorid": "",
"insurance_vendor_id": "",
"intake": {
"next_contact_hours": "",
"templates": ""
},
"invoice_federal_tax_rate": "",