Merge branch 'release/2023-06-02' of bitbucket.org:snaptsoft/bodyshop into release/2023-06-02
This commit is contained in:
@@ -156,3 +156,11 @@
|
|||||||
td.ant-table-column-sort {
|
td.ant-table-column-sort {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ant-table-tbody > tr.ant-table-row:nth-child(2n) > td {
|
||||||
|
background-color: #f4f4f4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rowWithColor > td {
|
||||||
|
background-color: var(--bgColor) !important;
|
||||||
|
}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import AddToProduction from "./jobs-detail-header-actions.addtoproduction.util";
|
|||||||
import JobsDetaiLheaderCsi from "./jobs-detail-header-actions.csi.component";
|
import JobsDetaiLheaderCsi from "./jobs-detail-header-actions.csi.component";
|
||||||
import DuplicateJob from "./jobs-detail-header-actions.duplicate.util";
|
import DuplicateJob from "./jobs-detail-header-actions.duplicate.util";
|
||||||
import JobsDetailHeaderActionsExportcustdataComponent from "./jobs-detail-header-actions.exportcustdata.component";
|
import JobsDetailHeaderActionsExportcustdataComponent from "./jobs-detail-header-actions.exportcustdata.component";
|
||||||
|
import RbacWrapper from "../rbac-wrapper/rbac-wrapper.component";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -461,54 +462,56 @@ export function JobsDetailHeaderActions({
|
|||||||
)}
|
)}
|
||||||
<JobsDetailHeaderActionsAddevent jobid={job.id} />
|
<JobsDetailHeaderActionsAddevent jobid={job.id} />
|
||||||
{!jobRO && job.converted && (
|
{!jobRO && job.converted && (
|
||||||
<Menu.Item>
|
<RbacWrapper action="jobs:void" noauth>
|
||||||
<Popconfirm
|
<Menu.Item>
|
||||||
title={t("jobs.labels.voidjob")}
|
<Popconfirm
|
||||||
okText="Yes"
|
title={t("jobs.labels.voidjob")}
|
||||||
cancelText="No"
|
okText="Yes"
|
||||||
onClick={(e) => e.stopPropagation()}
|
cancelText="No"
|
||||||
onConfirm={async () => {
|
onClick={(e) => e.stopPropagation()}
|
||||||
//delete the job.
|
onConfirm={async () => {
|
||||||
const result = await voidJob({
|
//delete the job.
|
||||||
variables: {
|
const result = await voidJob({
|
||||||
jobId: job.id,
|
variables: {
|
||||||
job: {
|
jobId: job.id,
|
||||||
status: bodyshop.md_ro_statuses.default_void,
|
job: {
|
||||||
voided: true,
|
status: bodyshop.md_ro_statuses.default_void,
|
||||||
scheduled_in: null,
|
voided: true,
|
||||||
scheduled_completion: null,
|
scheduled_in: null,
|
||||||
inproduction: false,
|
scheduled_completion: null,
|
||||||
},
|
inproduction: false,
|
||||||
note: [
|
|
||||||
{
|
|
||||||
jobid: job.id,
|
|
||||||
created_by: currentUser.email,
|
|
||||||
audit: true,
|
|
||||||
text: t("jobs.labels.voidnote"),
|
|
||||||
},
|
},
|
||||||
],
|
note: [
|
||||||
},
|
{
|
||||||
});
|
jobid: job.id,
|
||||||
|
created_by: currentUser.email,
|
||||||
|
audit: true,
|
||||||
|
text: t("jobs.labels.voidnote"),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
if (!!!result.errors) {
|
if (!!!result.errors) {
|
||||||
notification["success"]({
|
notification["success"]({
|
||||||
message: t("jobs.successes.voided"),
|
message: t("jobs.successes.voided"),
|
||||||
});
|
});
|
||||||
//go back to jobs list.
|
//go back to jobs list.
|
||||||
history.push(`/manage/`);
|
history.push(`/manage/`);
|
||||||
} else {
|
} else {
|
||||||
notification["error"]({
|
notification["error"]({
|
||||||
message: t("jobs.errors.voiding", {
|
message: t("jobs.errors.voiding", {
|
||||||
error: JSON.stringify(result.errors),
|
error: JSON.stringify(result.errors),
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
getPopupContainer={(trigger) => trigger.parentNode}
|
getPopupContainer={(trigger) => trigger.parentNode}
|
||||||
>
|
>
|
||||||
{t("menus.jobsactions.void")}
|
{t("menus.jobsactions.void")}
|
||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
</Menu.Item>
|
</Menu.Item>
|
||||||
|
</RbacWrapper>
|
||||||
)}
|
)}
|
||||||
</Menu>
|
</Menu>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -246,11 +246,21 @@ export function ProductionListTable({
|
|||||||
(x) => x.status === record.status
|
(x) => x.status === record.status
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!color) return null;
|
if (!color) {
|
||||||
|
if (index % 2 === 0)
|
||||||
|
return {
|
||||||
|
style: {
|
||||||
|
backgroundColor: `rgb(236, 236, 236)`,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
className: "rowWithColor",
|
||||||
style: {
|
style: {
|
||||||
backgroundColor: `rgb(${color.color.r},${color.color.g},${color.color.b},${color.color.a})`,
|
"--bgColor": `rgb(${color.color.r},${color.color.g},${color.color.b},${color.color.a})`,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ const ret = {
|
|||||||
"jobs:partsqueue": 4,
|
"jobs:partsqueue": 4,
|
||||||
"jobs:checklist-view": 2,
|
"jobs:checklist-view": 2,
|
||||||
"jobs:list-ready": 1,
|
"jobs:list-ready": 1,
|
||||||
|
"jobs:void": 5,
|
||||||
|
|
||||||
"bills:enter": 2,
|
"bills:enter": 2,
|
||||||
"bills:view": 2,
|
"bills:view": 2,
|
||||||
"bills:list": 2,
|
"bills:list": 2,
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
|
import { useTreatments } from "@splitsoftware/splitio-react";
|
||||||
import { Form, InputNumber } from "antd";
|
import { Form, InputNumber } from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
|
||||||
import RbacWrapper from "../rbac-wrapper/rbac-wrapper.component";
|
|
||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
|
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||||
|
import RbacWrapper from "../rbac-wrapper/rbac-wrapper.component";
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
});
|
});
|
||||||
@@ -316,6 +316,18 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.rbac.jobs.void")}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
name={["md_rbac", "jobs:void"]}
|
||||||
|
>
|
||||||
|
<InputNumber />
|
||||||
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.bills.enter")}
|
label={t("bodyshop.fields.rbac.bills.enter")}
|
||||||
rules={[
|
rules={[
|
||||||
|
|||||||
@@ -405,7 +405,8 @@
|
|||||||
"list-active": "Jobs -> List Active",
|
"list-active": "Jobs -> List Active",
|
||||||
"list-all": "Jobs -> List All",
|
"list-all": "Jobs -> List All",
|
||||||
"list-ready": "Jobs -> List Ready",
|
"list-ready": "Jobs -> List Ready",
|
||||||
"partsqueue": "Jobs -> Parts Queue"
|
"partsqueue": "Jobs -> Parts Queue",
|
||||||
|
"void": "Jobs -> Void"
|
||||||
},
|
},
|
||||||
"owners": {
|
"owners": {
|
||||||
"detail": "Owners -> Detail",
|
"detail": "Owners -> Detail",
|
||||||
|
|||||||
@@ -405,7 +405,8 @@
|
|||||||
"list-active": "",
|
"list-active": "",
|
||||||
"list-all": "",
|
"list-all": "",
|
||||||
"list-ready": "",
|
"list-ready": "",
|
||||||
"partsqueue": ""
|
"partsqueue": "",
|
||||||
|
"void": ""
|
||||||
},
|
},
|
||||||
"owners": {
|
"owners": {
|
||||||
"detail": "",
|
"detail": "",
|
||||||
|
|||||||
@@ -405,7 +405,8 @@
|
|||||||
"list-active": "",
|
"list-active": "",
|
||||||
"list-all": "",
|
"list-all": "",
|
||||||
"list-ready": "",
|
"list-ready": "",
|
||||||
"partsqueue": ""
|
"partsqueue": "",
|
||||||
|
"void": ""
|
||||||
},
|
},
|
||||||
"owners": {
|
"owners": {
|
||||||
"detail": "",
|
"detail": "",
|
||||||
|
|||||||
@@ -729,9 +729,15 @@ async function InsertDmsVehicle(socket) {
|
|||||||
deliveryDate: moment()
|
deliveryDate: moment()
|
||||||
// .tz(socket.JobData.bodyshop.timezone)
|
// .tz(socket.JobData.bodyshop.timezone)
|
||||||
.format("YYYYMMDD"),
|
.format("YYYYMMDD"),
|
||||||
licensePlateNo: String(socket.JobData.plate_no)
|
licensePlateNo:
|
||||||
.replace(/([^\w]|_)/g, "")
|
socket.JobData.plate_no === null
|
||||||
.toUpperCase(),
|
? null
|
||||||
|
: String(socket.JobData.plate_no).replace(/([^\w]|_)/g, "")
|
||||||
|
.length === 0
|
||||||
|
? null
|
||||||
|
: String(socket.JobData.plate_no)
|
||||||
|
.replace(/([^\w]|_)/g, "")
|
||||||
|
.toUpperCase(),
|
||||||
make: socket.txEnvelope.dms_make,
|
make: socket.txEnvelope.dms_make,
|
||||||
modelAbrev: socket.txEnvelope.dms_model,
|
modelAbrev: socket.txEnvelope.dms_model,
|
||||||
modelYear: socket.JobData.v_model_yr,
|
modelYear: socket.JobData.v_model_yr,
|
||||||
|
|||||||
Reference in New Issue
Block a user