IO-233 CDK updates.
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
Divider,
|
||||
PageHeader,
|
||||
InputNumber,
|
||||
Input,
|
||||
} from "antd";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
@@ -26,6 +27,8 @@ import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import LayoutFormRow from "../../components/layout-form-row/layout-form-row.component";
|
||||
import DateTimePicker from "../../components/form-date-time-picker/form-date-time-picker.component";
|
||||
import moment from "moment";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
jobRO: selectJobReadOnly,
|
||||
@@ -59,6 +62,7 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) {
|
||||
actual_delivery: values.actual_delivery,
|
||||
kmin: values.kmin,
|
||||
kmout: values.kmout,
|
||||
dms_allocation: values.dms_allocation,
|
||||
},
|
||||
},
|
||||
refetchQueries: ["QUERY_JOB_CLOSE_DETAILS"],
|
||||
@@ -117,6 +121,7 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) {
|
||||
: job.scheduled_delivery && moment(job.scheduled_delivery),
|
||||
kmin: job.kmin,
|
||||
kmout: job.kmout,
|
||||
dms_allocation: job.dms_allocation,
|
||||
}}
|
||||
scrollToFirstError
|
||||
>
|
||||
@@ -141,7 +146,11 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) {
|
||||
{t("general.actions.close")}
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
|
||||
<Link to={`/manage/dms?jobId=${job.id}`}>
|
||||
<Button disabled={job.date_exported || !jobRO}>
|
||||
{t("jobs.actions.sendtodms")}
|
||||
</Button>
|
||||
</Link>
|
||||
<JobsScoreboardAdd job={job} disabled={false} />
|
||||
</Space>
|
||||
}
|
||||
@@ -247,6 +256,19 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) {
|
||||
<InputNumber precision={0} disabled={jobRO} />
|
||||
</Form.Item>
|
||||
)}
|
||||
{(bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber) && (
|
||||
<Form.Item
|
||||
label={t("jobs.fields.dms_allocation")}
|
||||
name="dms_allocation"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
},
|
||||
]}
|
||||
>
|
||||
<Input disabled />
|
||||
</Form.Item>
|
||||
)}
|
||||
</LayoutFormRow>
|
||||
<Divider />
|
||||
<JobsCloseLines job={job} />
|
||||
|
||||
Reference in New Issue
Block a user