IO-1604 Move inoice final note to notes screen.
This commit is contained in:
@@ -5,7 +5,7 @@ import {
|
|||||||
EyeInvisibleFilled,
|
EyeInvisibleFilled,
|
||||||
WarningFilled,
|
WarningFilled,
|
||||||
} from "@ant-design/icons";
|
} 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 React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
@@ -14,6 +14,7 @@ import { selectJobReadOnly } from "../../redux/application/application.selectors
|
|||||||
import { setModalContext } from "../../redux/modals/modals.actions";
|
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||||
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
||||||
import { TemplateList } from "../../utils/TemplateConstants";
|
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 NoteUpsertModal from "../note-upsert-modal/note-upsert-modal.container";
|
||||||
import PrintWrapperComponent from "../print-wrapper/print-wrapper.component";
|
import PrintWrapperComponent from "../print-wrapper/print-wrapper.component";
|
||||||
|
|
||||||
@@ -131,32 +132,42 @@ export function JobNotesComponent({
|
|||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card
|
<div>
|
||||||
title={t("jobs.labels.notes")}
|
<LayoutFormRow>
|
||||||
extra={
|
<Form.Item
|
||||||
<Button
|
label={t("jobs.fields.invoice_final_note")}
|
||||||
onClick={() => {
|
name="invoice_final_note"
|
||||||
setNoteUpsertContext({
|
|
||||||
actions: { refetch: refetch },
|
|
||||||
context: {
|
|
||||||
jobId: jobId,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
{t("notes.actions.new")}
|
<Input.TextArea disabled={jobRO} />
|
||||||
</Button>
|
</Form.Item>
|
||||||
}
|
</LayoutFormRow>
|
||||||
>
|
<Card
|
||||||
<NoteUpsertModal />
|
title={t("jobs.labels.notes")}
|
||||||
|
extra={
|
||||||
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
setNoteUpsertContext({
|
||||||
|
actions: { refetch: refetch },
|
||||||
|
context: {
|
||||||
|
jobId: jobId,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("notes.actions.new")}
|
||||||
|
</Button>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<NoteUpsertModal />
|
||||||
|
|
||||||
<Table
|
<Table
|
||||||
loading={loading}
|
loading={loading}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
dataSource={data}
|
dataSource={data}
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
export default connect(mapStateToProps, mapDispatchToProps)(JobNotesComponent);
|
export default connect(mapStateToProps, mapDispatchToProps)(JobNotesComponent);
|
||||||
|
|||||||
@@ -485,7 +485,7 @@ export const GET_JOB_BY_PK = gql`
|
|||||||
}
|
}
|
||||||
alt_transport
|
alt_transport
|
||||||
intakechecklist
|
intakechecklist
|
||||||
|
invoice_final_note
|
||||||
loss_desc
|
loss_desc
|
||||||
kmin
|
kmin
|
||||||
kmout
|
kmout
|
||||||
|
|||||||
@@ -63,7 +63,6 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) {
|
|||||||
kmin: values.kmin,
|
kmin: values.kmin,
|
||||||
kmout: values.kmout,
|
kmout: values.kmout,
|
||||||
dms_allocation: values.dms_allocation,
|
dms_allocation: values.dms_allocation,
|
||||||
invoice_final_note: values.invoice_final_note,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
refetchQueries: ["QUERY_JOB_CLOSE_DETAILS"],
|
refetchQueries: ["QUERY_JOB_CLOSE_DETAILS"],
|
||||||
@@ -123,7 +122,6 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) {
|
|||||||
kmin: job.kmin,
|
kmin: job.kmin,
|
||||||
kmout: job.kmout,
|
kmout: job.kmout,
|
||||||
dms_allocation: job.dms_allocation,
|
dms_allocation: job.dms_allocation,
|
||||||
invoice_final_note: job.invoice_final_note,
|
|
||||||
}}
|
}}
|
||||||
scrollToFirstError
|
scrollToFirstError
|
||||||
>
|
>
|
||||||
@@ -273,12 +271,6 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) {
|
|||||||
<Input disabled />
|
<Input disabled />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
)}
|
||||||
<Form.Item
|
|
||||||
label={t("jobs.fields.invoice_final_note")}
|
|
||||||
name="invoice_final_note"
|
|
||||||
>
|
|
||||||
<Input.TextArea disabled={jobRO} />
|
|
||||||
</Form.Item>
|
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<Divider />
|
<Divider />
|
||||||
<JobsCloseLines job={job} />
|
<JobsCloseLines job={job} />
|
||||||
|
|||||||
Reference in New Issue
Block a user