From fbd9fce2306c94d0f7c9e60be30eba6ace13e4a8 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Wed, 5 Jan 2022 19:13:14 -0800 Subject: [PATCH] IO-1604 Move inoice final note to notes screen. --- .../jobs-notes/jobs.notes.component.jsx | 61 +++++++++++-------- client/src/graphql/jobs.queries.js | 2 +- .../pages/jobs-close/jobs-close.component.jsx | 8 --- 3 files changed, 37 insertions(+), 34 deletions(-) diff --git a/client/src/components/jobs-notes/jobs.notes.component.jsx b/client/src/components/jobs-notes/jobs.notes.component.jsx index 97e4b2cb9..0d07e2516 100644 --- a/client/src/components/jobs-notes/jobs.notes.component.jsx +++ b/client/src/components/jobs-notes/jobs.notes.component.jsx @@ -5,7 +5,7 @@ import { EyeInvisibleFilled, WarningFilled, } from "@ant-design/icons"; -import { Button, Card, Space, Table } from "antd"; +import { Button, Card, Form, Input, Space, Table } from "antd"; import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; @@ -14,6 +14,7 @@ import { selectJobReadOnly } from "../../redux/application/application.selectors import { setModalContext } from "../../redux/modals/modals.actions"; import { DateTimeFormatter } from "../../utils/DateFormatter"; import { TemplateList } from "../../utils/TemplateConstants"; +import LayoutFormRow from "../layout-form-row/layout-form-row.component"; import NoteUpsertModal from "../note-upsert-modal/note-upsert-modal.container"; import PrintWrapperComponent from "../print-wrapper/print-wrapper.component"; @@ -131,32 +132,42 @@ export function JobNotesComponent({ ]; return ( - { - setNoteUpsertContext({ - actions: { refetch: refetch }, - context: { - jobId: jobId, - }, - }); - }} +
+ + - {t("notes.actions.new")} - - } - > - + + + + { + setNoteUpsertContext({ + actions: { refetch: refetch }, + context: { + jobId: jobId, + }, + }); + }} + > + {t("notes.actions.new")} + + } + > + - - +
+ + ); } export default connect(mapStateToProps, mapDispatchToProps)(JobNotesComponent); diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js index 2218ed820..6ff600dce 100644 --- a/client/src/graphql/jobs.queries.js +++ b/client/src/graphql/jobs.queries.js @@ -485,7 +485,7 @@ export const GET_JOB_BY_PK = gql` } alt_transport intakechecklist - + invoice_final_note loss_desc kmin kmout diff --git a/client/src/pages/jobs-close/jobs-close.component.jsx b/client/src/pages/jobs-close/jobs-close.component.jsx index 9b9e2dc9a..71d961c99 100644 --- a/client/src/pages/jobs-close/jobs-close.component.jsx +++ b/client/src/pages/jobs-close/jobs-close.component.jsx @@ -63,7 +63,6 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) { kmin: values.kmin, kmout: values.kmout, dms_allocation: values.dms_allocation, - invoice_final_note: values.invoice_final_note, }, }, refetchQueries: ["QUERY_JOB_CLOSE_DETAILS"], @@ -123,7 +122,6 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) { kmin: job.kmin, kmout: job.kmout, dms_allocation: job.dms_allocation, - invoice_final_note: job.invoice_final_note, }} scrollToFirstError > @@ -273,12 +271,6 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) { )} - - -