IO-1604 Move inoice final note to notes screen.
This commit is contained in:
@@ -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 (
|
||||
<Card
|
||||
title={t("jobs.labels.notes")}
|
||||
extra={
|
||||
<Button
|
||||
onClick={() => {
|
||||
setNoteUpsertContext({
|
||||
actions: { refetch: refetch },
|
||||
context: {
|
||||
jobId: jobId,
|
||||
},
|
||||
});
|
||||
}}
|
||||
<div>
|
||||
<LayoutFormRow>
|
||||
<Form.Item
|
||||
label={t("jobs.fields.invoice_final_note")}
|
||||
name="invoice_final_note"
|
||||
>
|
||||
{t("notes.actions.new")}
|
||||
</Button>
|
||||
}
|
||||
>
|
||||
<NoteUpsertModal />
|
||||
<Input.TextArea disabled={jobRO} />
|
||||
</Form.Item>
|
||||
</LayoutFormRow>
|
||||
<Card
|
||||
title={t("jobs.labels.notes")}
|
||||
extra={
|
||||
<Button
|
||||
onClick={() => {
|
||||
setNoteUpsertContext({
|
||||
actions: { refetch: refetch },
|
||||
context: {
|
||||
jobId: jobId,
|
||||
},
|
||||
});
|
||||
}}
|
||||
>
|
||||
{t("notes.actions.new")}
|
||||
</Button>
|
||||
}
|
||||
>
|
||||
<NoteUpsertModal />
|
||||
|
||||
<Table
|
||||
loading={loading}
|
||||
columns={columns}
|
||||
rowKey="id"
|
||||
dataSource={data}
|
||||
/>
|
||||
</Card>
|
||||
<Table
|
||||
loading={loading}
|
||||
columns={columns}
|
||||
rowKey="id"
|
||||
dataSource={data}
|
||||
/>
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(JobNotesComponent);
|
||||
|
||||
@@ -485,7 +485,7 @@ export const GET_JOB_BY_PK = gql`
|
||||
}
|
||||
alt_transport
|
||||
intakechecklist
|
||||
|
||||
invoice_final_note
|
||||
loss_desc
|
||||
kmin
|
||||
kmout
|
||||
|
||||
@@ -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 }) {
|
||||
<Input disabled />
|
||||
</Form.Item>
|
||||
)}
|
||||
<Form.Item
|
||||
label={t("jobs.fields.invoice_final_note")}
|
||||
name="invoice_final_note"
|
||||
>
|
||||
<Input.TextArea disabled={jobRO} />
|
||||
</Form.Item>
|
||||
</LayoutFormRow>
|
||||
<Divider />
|
||||
<JobsCloseLines job={job} />
|
||||
|
||||
Reference in New Issue
Block a user