From 24de10c90888971091647be00e29d7d31034480f Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Tue, 27 Apr 2021 18:36:39 -0700 Subject: [PATCH] IO-944 Add production note to intake checklist. --- .../job-checklist-form.component.jsx | 16 ++++++++++++++-- client/src/graphql/bodyshop.queries.js | 2 +- client/src/graphql/jobs.queries.js | 1 + 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/client/src/components/job-checklist/components/job-checklist-form/job-checklist-form.component.jsx b/client/src/components/job-checklist/components/job-checklist-form/job-checklist-form.component.jsx index 1e5596371..4bf94686a 100644 --- a/client/src/components/job-checklist/components/job-checklist-form/job-checklist-form.component.jsx +++ b/client/src/components/job-checklist/components/job-checklist-form/job-checklist-form.component.jsx @@ -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({ > + + + )} {type === "deliver" && ( diff --git a/client/src/graphql/bodyshop.queries.js b/client/src/graphql/bodyshop.queries.js index 9cab3985c..70e08a05e 100644 --- a/client/src/graphql/bodyshop.queries.js +++ b/client/src/graphql/bodyshop.queries.js @@ -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 diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js index 958122d8f..79aea1eb2 100644 --- a/client/src/graphql/jobs.queries.js +++ b/client/src/graphql/jobs.queries.js @@ -1525,6 +1525,7 @@ export const QUERY_JOB_CHECKLISTS = gql` scheduled_completion actual_completion scheduled_delivery + production_vars bodyshop { id intakechecklist