IO-944 Add production note to intake checklist.

This commit is contained in:
Patrick Fic
2021-04-27 18:36:39 -07:00
parent 35f98f7566
commit 24de10c908
3 changed files with 16 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
import { useMutation } from "@apollo/client";
import { Button, Card, Form, notification, Switch } from "antd";
import { Button, Card, Form, Input, notification, Switch } from "antd";
import queryString from "query-string";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
@@ -54,7 +54,12 @@ export function JobChecklistForm({
(type === "intake" && bodyshop.md_ro_statuses.default_arrived) ||
(type === "deliver" && bodyshop.md_ro_statuses.default_delivered),
...(type === "intake" && { actual_in: new Date() }),
...(type === "intake" && {
production_vars: {
...job.production_vars,
...values.production_vars,
},
}),
...(type === "intake" && {
scheduled_completion: values.scheduled_completion,
}),
@@ -175,6 +180,13 @@ export function JobChecklistForm({
>
<DateTimePicker />
</Form.Item>
<Form.Item
name={["production_vars", "note"]}
label={t("jobs.fields.production_vars.note")}
disabled={readOnly}
>
<Input.TextArea rows={3} />
</Form.Item>
</div>
)}
{type === "deliver" && (

View File

@@ -188,7 +188,7 @@ export const QUERY_INTAKE_CHECKLIST = gql`
jobs_by_pk(id: $jobId) {
id
ro_number
production_vars
scheduled_completion
scheduled_delivery
intakechecklist

View File

@@ -1525,6 +1525,7 @@ export const QUERY_JOB_CHECKLISTS = gql`
scheduled_completion
actual_completion
scheduled_delivery
production_vars
bodyshop {
id
intakechecklist