Merged in rome/release/2024-01-05 (pull request #1139)
Rome/release/2024 01 05
This commit is contained in:
@@ -10,7 +10,7 @@ import { createStructuredSelector } from "reselect";
|
|||||||
import {
|
import {
|
||||||
DELETE_BILL_LINE,
|
DELETE_BILL_LINE,
|
||||||
INSERT_NEW_BILL_LINES,
|
INSERT_NEW_BILL_LINES,
|
||||||
UPDATE_BILL_LINE
|
UPDATE_BILL_LINE,
|
||||||
} from "../../graphql/bill-lines.queries";
|
} from "../../graphql/bill-lines.queries";
|
||||||
import { QUERY_BILL_BY_PK, UPDATE_BILL } from "../../graphql/bills.queries";
|
import { QUERY_BILL_BY_PK, UPDATE_BILL } from "../../graphql/bills.queries";
|
||||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||||
@@ -20,6 +20,7 @@ import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
|||||||
import AlertComponent from "../alert/alert.component";
|
import AlertComponent from "../alert/alert.component";
|
||||||
import BillFormContainer from "../bill-form/bill-form.container";
|
import BillFormContainer from "../bill-form/bill-form.container";
|
||||||
import BillMarkExportedButton from "../bill-mark-exported-button/bill-mark-exported-button.component";
|
import BillMarkExportedButton from "../bill-mark-exported-button/bill-mark-exported-button.component";
|
||||||
|
import BillPrintButton from "../bill-print-button/bill-print-button.component";
|
||||||
import BillReeportButtonComponent from "../bill-reexport-button/bill-reexport-button.component";
|
import BillReeportButtonComponent from "../bill-reexport-button/bill-reexport-button.component";
|
||||||
import JobDocumentsGallery from "../jobs-documents-gallery/jobs-documents-gallery.container";
|
import JobDocumentsGallery from "../jobs-documents-gallery/jobs-documents-gallery.container";
|
||||||
import JobsDocumentsLocalGallery from "../jobs-documents-local-gallery/jobs-documents-local-gallery.container";
|
import JobsDocumentsLocalGallery from "../jobs-documents-local-gallery/jobs-documents-local-gallery.container";
|
||||||
@@ -176,7 +177,7 @@ export function BillDetailEditcontainer({
|
|||||||
extra={
|
extra={
|
||||||
<Space>
|
<Space>
|
||||||
<BillDetailEditReturn data={data} />
|
<BillDetailEditReturn data={data} />
|
||||||
|
<BillPrintButton billid={search.billid} />
|
||||||
<Popconfirm
|
<Popconfirm
|
||||||
visible={visible}
|
visible={visible}
|
||||||
onConfirm={() => form.submit()}
|
onConfirm={() => form.submit()}
|
||||||
|
|||||||
@@ -455,9 +455,6 @@ function BillEnterModalContainer({
|
|||||||
setEnterAgain(false);
|
setEnterAgain(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<button onClick={() => console.log(form.getFieldsValue("billlines"))}>
|
|
||||||
get billlines
|
|
||||||
</button>
|
|
||||||
<BillFormContainer
|
<BillFormContainer
|
||||||
form={form}
|
form={form}
|
||||||
disableInvNumber={billEnterModal.context.disableInvNumber}
|
disableInvNumber={billEnterModal.context.disableInvNumber}
|
||||||
|
|||||||
@@ -79,6 +79,20 @@ export function BillFormComponent({
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleFederalTaxExemptSwitchToggle = (checked) => {
|
||||||
|
// Early gate
|
||||||
|
if (!checked) return;
|
||||||
|
const values = form.getFieldsValue("billlines");
|
||||||
|
// Gate bill lines
|
||||||
|
if (!values?.billlines?.length) return;
|
||||||
|
|
||||||
|
const billlines = values.billlines.map((b) => {
|
||||||
|
b.applicable_taxes.federal = false;
|
||||||
|
return b;
|
||||||
|
});
|
||||||
|
form.setFieldsValue({ billlines });
|
||||||
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (job) form.validateFields(["is_credit_memo"]);
|
if (job) form.validateFields(["is_credit_memo"]);
|
||||||
}, [job, form]);
|
}, [job, form]);
|
||||||
@@ -391,7 +405,19 @@ export function BillFormComponent({
|
|||||||
// <CurrencyInput min={0} />
|
// <CurrencyInput min={0} />
|
||||||
// </Form.Item>
|
// </Form.Item>
|
||||||
}
|
}
|
||||||
<Form.Item shouldUpdate span={15}>
|
{
|
||||||
|
//Removed as a part of the merge to Rome Online. Federal tax not applicable.
|
||||||
|
// bodyshop.pbs_serialnumber || bodyshop.cdk_dealerid ? (
|
||||||
|
// <Form.Item
|
||||||
|
// span={2}
|
||||||
|
// label={t("bills.labels.federal_tax_exempt")}
|
||||||
|
// name="federal_tax_exempt"
|
||||||
|
// >
|
||||||
|
// <Switch onChange={handleFederalTaxExemptSwitchToggle} />
|
||||||
|
// </Form.Item>
|
||||||
|
// ) : null
|
||||||
|
}
|
||||||
|
<Form.Item shouldUpdate span={13}>
|
||||||
{() => {
|
{() => {
|
||||||
const values = form.getFieldsValue([
|
const values = form.getFieldsValue([
|
||||||
"billlines",
|
"billlines",
|
||||||
@@ -409,7 +435,7 @@ export function BillFormComponent({
|
|||||||
totals = CalculateBillTotal(values);
|
totals = CalculateBillTotal(values);
|
||||||
if (!!totals)
|
if (!!totals)
|
||||||
return (
|
return (
|
||||||
<div>
|
<div align="right">
|
||||||
<Space wrap>
|
<Space wrap>
|
||||||
<Statistic
|
<Statistic
|
||||||
title={t("bills.labels.subtotal")}
|
title={t("bills.labels.subtotal")}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import {
|
|||||||
Switch,
|
Switch,
|
||||||
Table,
|
Table,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
|
Tooltip,
|
||||||
} from "antd";
|
} from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
import { Button, Space } from "antd";
|
||||||
|
import React, { useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { GenerateDocument } from "../../utils/RenderTemplate";
|
||||||
|
import { TemplateList } from "../../utils/TemplateConstants";
|
||||||
|
|
||||||
|
export default function BillPrintButton({ billid }) {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const [loading, setLoading] = useState(false);
|
||||||
|
const Templates = TemplateList("job_special");
|
||||||
|
|
||||||
|
const submitHandler = async () => {
|
||||||
|
setLoading(true);
|
||||||
|
try {
|
||||||
|
await GenerateDocument(
|
||||||
|
{
|
||||||
|
name: Templates.parts_invoice_label_single.key,
|
||||||
|
variables: {
|
||||||
|
id: billid,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{},
|
||||||
|
"p"
|
||||||
|
);
|
||||||
|
} catch (e) {
|
||||||
|
console.warn("Warning: Error generating a document.");
|
||||||
|
}
|
||||||
|
setLoading(false);
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Space wrap>
|
||||||
|
<Button loading={loading} onClick={submitHandler}>
|
||||||
|
{t("bills.labels.printlabels")}
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -4,6 +4,7 @@ import PhoneNumberFormatter from "../../utils/PhoneFormatter";
|
|||||||
import ChatArchiveButton from "../chat-archive-button/chat-archive-button.component";
|
import ChatArchiveButton from "../chat-archive-button/chat-archive-button.component";
|
||||||
import ChatConversationTitleTags from "../chat-conversation-title-tags/chat-conversation-title-tags.component";
|
import ChatConversationTitleTags from "../chat-conversation-title-tags/chat-conversation-title-tags.component";
|
||||||
import ChatLabelComponent from "../chat-label/chat-label.component";
|
import ChatLabelComponent from "../chat-label/chat-label.component";
|
||||||
|
import ChatPrintButton from "../chat-print-button/chat-print-button.component";
|
||||||
import ChatTagRoContainer from "../chat-tag-ro/chat-tag-ro.container";
|
import ChatTagRoContainer from "../chat-tag-ro/chat-tag-ro.container";
|
||||||
|
|
||||||
export default function ChatConversationTitle({ conversation }) {
|
export default function ChatConversationTitle({ conversation }) {
|
||||||
@@ -13,6 +14,7 @@ export default function ChatConversationTitle({ conversation }) {
|
|||||||
{conversation && conversation.phone_num}
|
{conversation && conversation.phone_num}
|
||||||
</PhoneNumberFormatter>
|
</PhoneNumberFormatter>
|
||||||
<ChatLabelComponent conversation={conversation} />
|
<ChatLabelComponent conversation={conversation} />
|
||||||
|
<ChatPrintButton conversation={conversation} />
|
||||||
<ChatConversationTitleTags
|
<ChatConversationTitleTags
|
||||||
jobConversations={
|
jobConversations={
|
||||||
(conversation && conversation.job_conversations) || []
|
(conversation && conversation.job_conversations) || []
|
||||||
|
|||||||
@@ -0,0 +1,59 @@
|
|||||||
|
import { MailOutlined, PrinterOutlined } from "@ant-design/icons";
|
||||||
|
import { Space, Spin } from "antd";
|
||||||
|
import React, { useState } from "react";
|
||||||
|
import { connect } from "react-redux";
|
||||||
|
import { createStructuredSelector } from "reselect";
|
||||||
|
import { setEmailOptions } from "../../redux/email/email.actions";
|
||||||
|
import { GenerateDocument } from "../../utils/RenderTemplate";
|
||||||
|
import { TemplateList } from "../../utils/TemplateConstants";
|
||||||
|
|
||||||
|
const mapStateToProps = createStructuredSelector({});
|
||||||
|
|
||||||
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
|
setEmailOptions: (e) => dispatch(setEmailOptions(e)),
|
||||||
|
});
|
||||||
|
|
||||||
|
export function ChatPrintButton({ conversation }) {
|
||||||
|
const [loading, setLoading] = useState(false);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Space wrap>
|
||||||
|
<PrinterOutlined
|
||||||
|
onClick={() => {
|
||||||
|
setLoading(true);
|
||||||
|
GenerateDocument(
|
||||||
|
{
|
||||||
|
name: TemplateList("messaging").conversation_list.key,
|
||||||
|
variables: { id: conversation.id },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
subject: TemplateList("messaging").conversation_list.subject,
|
||||||
|
},
|
||||||
|
"p",
|
||||||
|
conversation.id
|
||||||
|
);
|
||||||
|
setLoading(false);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<MailOutlined
|
||||||
|
onClick={() => {
|
||||||
|
setLoading(true);
|
||||||
|
GenerateDocument(
|
||||||
|
{
|
||||||
|
name: TemplateList("messaging").conversation_list.key,
|
||||||
|
variables: { id: conversation.id },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
subject: TemplateList("messaging").conversation_list.subject,
|
||||||
|
},
|
||||||
|
"e",
|
||||||
|
conversation.id
|
||||||
|
);
|
||||||
|
setLoading(false);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{loading && <Spin />}
|
||||||
|
</Space>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export default connect(mapStateToProps, mapDispatchToProps)(ChatPrintButton);
|
||||||
@@ -35,6 +35,15 @@ export default function ContractsCarsComponent({
|
|||||||
state.sortedInfo.columnKey === "status" && state.sortedInfo.order,
|
state.sortedInfo.columnKey === "status" && state.sortedInfo.order,
|
||||||
render: (text, record) => <div>{t(record.status)}</div>,
|
render: (text, record) => <div>{t(record.status)}</div>,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: t("courtesycars.fields.readiness"),
|
||||||
|
dataIndex: "readiness",
|
||||||
|
key: "readiness",
|
||||||
|
sorter: (a, b) => alphaSort(a.readiness, b.readiness),
|
||||||
|
sortOrder:
|
||||||
|
state.sortedInfo.columnKey === "readiness" && state.sortedInfo.order,
|
||||||
|
render: (text, record) => t(record.readiness),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: t("courtesycars.fields.year"),
|
title: t("courtesycars.fields.year"),
|
||||||
dataIndex: "year",
|
dataIndex: "year",
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { CHECK_CC_FLEET_NUMBER } from "../../graphql/courtesy-car.queries";
|
import { CHECK_CC_FLEET_NUMBER } from "../../graphql/courtesy-car.queries";
|
||||||
import { DateFormatter } from "../../utils/DateFormatter";
|
import { DateFormatter } from "../../utils/DateFormatter";
|
||||||
import CourtesyCarFuelSlider from "../courtesy-car-fuel-select/courtesy-car-fuel-select.component";
|
import CourtesyCarFuelSlider from "../courtesy-car-fuel-select/courtesy-car-fuel-select.component";
|
||||||
|
import CourtesyCarReadiness from "../courtesy-car-readiness-select/courtesy-car-readiness-select.component";
|
||||||
import CourtesyCarStatus from "../courtesy-car-status-select/courtesy-car-status-select.component";
|
import CourtesyCarStatus from "../courtesy-car-status-select/courtesy-car-status-select.component";
|
||||||
import FormDatePicker from "../form-date-picker/form-date-picker.component";
|
import FormDatePicker from "../form-date-picker/form-date-picker.component";
|
||||||
//import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
|
//import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
|
||||||
@@ -213,6 +214,9 @@ export default function CourtesyCarCreateFormComponent({ form, saveLoading }) {
|
|||||||
>
|
>
|
||||||
<CourtesyCarStatus />
|
<CourtesyCarStatus />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item label={t("courtesycars.fields.readiness")} name="readiness">
|
||||||
|
<CourtesyCarReadiness />
|
||||||
|
</Form.Item>
|
||||||
<div>
|
<div>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("courtesycars.fields.nextservicekm")}
|
label={t("courtesycars.fields.nextservicekm")}
|
||||||
@@ -227,8 +231,9 @@ export default function CourtesyCarCreateFormComponent({ form, saveLoading }) {
|
|||||||
>
|
>
|
||||||
{() => {
|
{() => {
|
||||||
const nextservicekm = form.getFieldValue("nextservicekm");
|
const nextservicekm = form.getFieldValue("nextservicekm");
|
||||||
const mileageOver =
|
const mileageOver = nextservicekm
|
||||||
nextservicekm && nextservicekm <= form.getFieldValue("mileage");
|
? nextservicekm <= form.getFieldValue("mileage")
|
||||||
|
: false;
|
||||||
if (mileageOver)
|
if (mileageOver)
|
||||||
return (
|
return (
|
||||||
<Space direction="vertical" style={{ color: "tomato" }}>
|
<Space direction="vertical" style={{ color: "tomato" }}>
|
||||||
|
|||||||
@@ -34,6 +34,32 @@ const CourtesyCarFuelComponent = (props, ref) => {
|
|||||||
step={null}
|
step={null}
|
||||||
style={{ marginLeft: "2rem", marginRight: "2rem" }}
|
style={{ marginLeft: "2rem", marginRight: "2rem" }}
|
||||||
{...props}
|
{...props}
|
||||||
|
tooltip={{
|
||||||
|
formatter: (value) => {
|
||||||
|
switch (value) {
|
||||||
|
case 0:
|
||||||
|
return t("courtesycars.labels.fuel.empty");
|
||||||
|
case 13:
|
||||||
|
return t("courtesycars.labels.fuel.18");
|
||||||
|
case 25:
|
||||||
|
return t("courtesycars.labels.fuel.14");
|
||||||
|
case 38:
|
||||||
|
return t("courtesycars.labels.fuel.38");
|
||||||
|
case 50:
|
||||||
|
return t("courtesycars.labels.fuel.12");
|
||||||
|
case 63:
|
||||||
|
return t("courtesycars.labels.fuel.58");
|
||||||
|
case 75:
|
||||||
|
return t("courtesycars.labels.fuel.34");
|
||||||
|
case 88:
|
||||||
|
return t("courtesycars.labels.fuel.78");
|
||||||
|
case 100:
|
||||||
|
return t("courtesycars.labels.fuel.full");
|
||||||
|
default:
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
import { Select } from "antd";
|
||||||
|
import React, { forwardRef, useEffect, useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
const { Option } = Select;
|
||||||
|
|
||||||
|
const CourtesyCarReadinessComponent = ({ value, onChange }, ref) => {
|
||||||
|
const [option, setOption] = useState(value);
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (value !== option && onChange) {
|
||||||
|
onChange(option);
|
||||||
|
}
|
||||||
|
}, [value, option, onChange]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Select
|
||||||
|
allowClear
|
||||||
|
ref={ref}
|
||||||
|
value={option}
|
||||||
|
style={{
|
||||||
|
width: 100,
|
||||||
|
}}
|
||||||
|
onChange={setOption}
|
||||||
|
>
|
||||||
|
<Option value="courtesycars.readiness.ready">
|
||||||
|
{t("courtesycars.readiness.ready")}
|
||||||
|
</Option>
|
||||||
|
<Option value="courtesycars.readiness.notready">
|
||||||
|
{t("courtesycars.readiness.notready")}
|
||||||
|
</Option>
|
||||||
|
</Select>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
export default forwardRef(CourtesyCarReadinessComponent);
|
||||||
@@ -74,10 +74,11 @@ export default function CourtesyCarsList({ loading, courtesycars, refetch }) {
|
|||||||
render: (text, record) => {
|
render: (text, record) => {
|
||||||
const { nextservicedate, nextservicekm, mileage } = record;
|
const { nextservicedate, nextservicekm, mileage } = record;
|
||||||
|
|
||||||
const mileageOver = nextservicekm <= mileage;
|
const mileageOver = nextservicekm ? nextservicekm <= mileage : false;
|
||||||
|
|
||||||
const dueForService =
|
const dueForService =
|
||||||
nextservicedate && moment(nextservicedate).isBefore(moment());
|
nextservicedate &&
|
||||||
|
moment(nextservicedate).endOf("day").isSameOrBefore(moment());
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Space>
|
<Space>
|
||||||
@@ -91,6 +92,26 @@ export default function CourtesyCarsList({ loading, courtesycars, refetch }) {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: t("courtesycars.fields.readiness"),
|
||||||
|
dataIndex: "readiness",
|
||||||
|
key: "readiness",
|
||||||
|
sorter: (a, b) => alphaSort(a.readiness, b.readiness),
|
||||||
|
filters: [
|
||||||
|
{
|
||||||
|
text: t("courtesycars.readiness.ready"),
|
||||||
|
value: "courtesycars.readiness.ready",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: t("courtesycars.readiness.notready"),
|
||||||
|
value: "courtesycars.readiness.notready",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
onFilter: (value, record) => value.includes(record.readiness),
|
||||||
|
sortOrder:
|
||||||
|
state.sortedInfo.columnKey === "readiness" && state.sortedInfo.order,
|
||||||
|
render: (text, record) => t(record.readiness),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: t("courtesycars.fields.year"),
|
title: t("courtesycars.fields.year"),
|
||||||
dataIndex: "year",
|
dataIndex: "year",
|
||||||
@@ -131,6 +152,36 @@ export default function CourtesyCarsList({ loading, courtesycars, refetch }) {
|
|||||||
sortOrder:
|
sortOrder:
|
||||||
state.sortedInfo.columnKey === "plate" && state.sortedInfo.order,
|
state.sortedInfo.columnKey === "plate" && state.sortedInfo.order,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: t("courtesycars.fields.fuel"),
|
||||||
|
dataIndex: "fuel",
|
||||||
|
key: "fuel",
|
||||||
|
sorter: (a, b) => alphaSort(a.fuel, b.fuel),
|
||||||
|
sortOrder:
|
||||||
|
state.sortedInfo.columnKey === "fuel" && state.sortedInfo.order,
|
||||||
|
render: (text, record) => {
|
||||||
|
switch (record.fuel) {
|
||||||
|
case 100:
|
||||||
|
return t("courtesycars.labels.fuel.full");
|
||||||
|
case 88:
|
||||||
|
return t("courtesycars.labels.fuel.78");
|
||||||
|
case 63:
|
||||||
|
return t("courtesycars.labels.fuel.58");
|
||||||
|
case 50:
|
||||||
|
return t("courtesycars.labels.fuel.12");
|
||||||
|
case 38:
|
||||||
|
return t("courtesycars.labels.fuel.34");
|
||||||
|
case 25:
|
||||||
|
return t("courtesycars.labels.fuel.14");
|
||||||
|
case 13:
|
||||||
|
return t("courtesycars.labels.fuel.18");
|
||||||
|
case 0:
|
||||||
|
return t("courtesycars.labels.fuel.empty");
|
||||||
|
default:
|
||||||
|
return record.fuel;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: t("courtesycars.labels.outwith"),
|
title: t("courtesycars.labels.outwith"),
|
||||||
dataIndex: "outwith",
|
dataIndex: "outwith",
|
||||||
|
|||||||
@@ -111,6 +111,14 @@ export function JobsDetailHeaderActions({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
insertAuditTrail({
|
||||||
|
jobid: job.id,
|
||||||
|
operation: AuditTrailMapping.alertToggle(
|
||||||
|
!!job.production_vars && !!job.production_vars.alert
|
||||||
|
? !job.production_vars.alert
|
||||||
|
: true
|
||||||
|
),
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSuspend = (e) => {
|
const handleSuspend = (e) => {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import {
|
import {
|
||||||
|
BranchesOutlined,
|
||||||
ExclamationCircleFilled,
|
ExclamationCircleFilled,
|
||||||
PauseCircleOutlined,
|
PauseCircleOutlined,
|
||||||
WarningFilled,
|
WarningFilled,
|
||||||
BranchesOutlined,
|
|
||||||
} from "@ant-design/icons";
|
} from "@ant-design/icons";
|
||||||
import { Card, Col, Row, Space, Tag, Tooltip } from "antd";
|
import { Card, Col, Row, Space, Tag, Tooltip } from "antd";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
@@ -221,6 +221,14 @@ export function JobsDetailHeader({ job, bodyshop, disabled }) {
|
|||||||
<VehicleVinDisplay>
|
<VehicleVinDisplay>
|
||||||
{`${job.v_vin || t("general.labels.na")}`}
|
{`${job.v_vin || t("general.labels.na")}`}
|
||||||
</VehicleVinDisplay>
|
</VehicleVinDisplay>
|
||||||
|
{bodyshop.pbs_serialnumber || bodyshop.cdk_dealerid ? (
|
||||||
|
job.v_vin.length !== 17 ? (
|
||||||
|
<WarningFilled style={{ color: "tomato", marginLeft: ".3rem" }} />
|
||||||
|
) : null
|
||||||
|
) : null}
|
||||||
|
</DataLabel>
|
||||||
|
<DataLabel label={t("jobs.fields.regie_number")}>
|
||||||
|
{job.regie_number || t("general.labels.na")}
|
||||||
</DataLabel>
|
</DataLabel>
|
||||||
<DataLabel label={t("jobs.labels.relatedros")}>
|
<DataLabel label={t("jobs.labels.relatedros")}>
|
||||||
<JobsRelatedRos jobid={job.id} job={job} />
|
<JobsRelatedRos jobid={job.id} job={job} />
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React from "react";
|
|
||||||
import { Button, Dropdown, Menu } from "antd";
|
import { Button, Dropdown, Menu } from "antd";
|
||||||
import dataSource from "./production-list-columns.data";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import dataSource from "./production-list-columns.data";
|
||||||
|
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
@@ -24,6 +24,7 @@ export function ProductionColumnsComponent({
|
|||||||
columnState,
|
columnState,
|
||||||
technician,
|
technician,
|
||||||
bodyshop,
|
bodyshop,
|
||||||
|
data,
|
||||||
tableState,
|
tableState,
|
||||||
}) {
|
}) {
|
||||||
const [columns, setColumns] = columnState;
|
const [columns, setColumns] = columnState;
|
||||||
@@ -36,6 +37,7 @@ export function ProductionColumnsComponent({
|
|||||||
bodyshop,
|
bodyshop,
|
||||||
technician,
|
technician,
|
||||||
state: tableState,
|
state: tableState,
|
||||||
|
data: data,
|
||||||
activeStatuses: bodyshop.md_ro_statuses.active_statuses,
|
activeStatuses: bodyshop.md_ro_statuses.active_statuses,
|
||||||
}).filter((i) => i.key === e.key),
|
}).filter((i) => i.key === e.key),
|
||||||
]);
|
]);
|
||||||
@@ -46,6 +48,7 @@ export function ProductionColumnsComponent({
|
|||||||
technician,
|
technician,
|
||||||
state: tableState,
|
state: tableState,
|
||||||
activeStatuses: bodyshop.md_ro_statuses.active_statuses,
|
activeStatuses: bodyshop.md_ro_statuses.active_statuses,
|
||||||
|
data: data,
|
||||||
});
|
});
|
||||||
const menu = (
|
const menu = (
|
||||||
<Menu
|
<Menu
|
||||||
|
|||||||
@@ -1,12 +1,23 @@
|
|||||||
import { ExclamationCircleFilled } from "@ant-design/icons";
|
import { ExclamationCircleFilled } from "@ant-design/icons";
|
||||||
|
import { useMutation } from "@apollo/client";
|
||||||
import { Dropdown, Menu } from "antd";
|
import { Dropdown, Menu } from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { useMutation } from "@apollo/client";
|
import { connect } from "react-redux";
|
||||||
import { UPDATE_JOB } from "../../graphql/jobs.queries";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||||
|
import { UPDATE_JOB } from "../../graphql/jobs.queries";
|
||||||
|
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||||
|
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||||
|
|
||||||
export default function ProductionListColumnAlert({ record }) {
|
const mapStateToProps = createStructuredSelector({});
|
||||||
|
|
||||||
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
|
insertAuditTrail: ({ jobid, operation }) =>
|
||||||
|
dispatch(insertAuditTrail({ jobid, operation })),
|
||||||
|
});
|
||||||
|
|
||||||
|
export function ProductionListColumnAlert({ record, insertAuditTrail }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const [updateAlert] = useMutation(UPDATE_JOB);
|
const [updateAlert] = useMutation(UPDATE_JOB);
|
||||||
@@ -27,6 +38,14 @@ export default function ProductionListColumnAlert({ record }) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
});
|
||||||
|
insertAuditTrail({
|
||||||
|
jobid: record.id,
|
||||||
|
operation: AuditTrailMapping.alertToggle(
|
||||||
|
!!record.production_vars && !!record.production_vars.alert
|
||||||
|
? !record.production_vars.alert
|
||||||
|
: true
|
||||||
|
),
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
if (record.refetch) record.refetch();
|
if (record.refetch) record.refetch();
|
||||||
});
|
});
|
||||||
@@ -58,3 +77,8 @@ export default function ProductionListColumnAlert({ record }) {
|
|||||||
</Dropdown>
|
</Dropdown>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default connect(
|
||||||
|
mapStateToProps,
|
||||||
|
mapDispatchToProps
|
||||||
|
)(ProductionListColumnAlert);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { PauseCircleOutlined, BranchesOutlined } from "@ant-design/icons";
|
import { BranchesOutlined, PauseCircleOutlined } from "@ant-design/icons";
|
||||||
import { Space, Tooltip } from "antd";
|
import { Space, Tooltip } from "antd";
|
||||||
import i18n from "i18next";
|
import i18n from "i18next";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
@@ -6,6 +6,7 @@ import { Link } from "react-router-dom";
|
|||||||
import CurrencyFormatter from "../../utils/CurrencyFormatter";
|
import CurrencyFormatter from "../../utils/CurrencyFormatter";
|
||||||
import { TimeFormatter } from "../../utils/DateFormatter";
|
import { TimeFormatter } from "../../utils/DateFormatter";
|
||||||
import PhoneFormatter from "../../utils/PhoneFormatter";
|
import PhoneFormatter from "../../utils/PhoneFormatter";
|
||||||
|
import { onlyUnique } from "../../utils/arrayHelper";
|
||||||
import { alphaSort, dateSort, statusSort } from "../../utils/sorters";
|
import { alphaSort, dateSort, statusSort } from "../../utils/sorters";
|
||||||
import JobAltTransportChange from "../job-at-change/job-at-change.component";
|
import JobAltTransportChange from "../job-at-change/job-at-change.component";
|
||||||
import JobPartsQueueCount from "../job-parts-queue-count/job-parts-queue-count.component";
|
import JobPartsQueueCount from "../job-parts-queue-count/job-parts-queue-count.component";
|
||||||
@@ -27,7 +28,7 @@ import ProductionlistColumnTouchTime from "./prodution-list-columns.touchtime.co
|
|||||||
import { store } from "../../redux/store";
|
import { store } from "../../redux/store";
|
||||||
import { setModalContext } from "../../redux/modals/modals.actions";
|
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||||
|
|
||||||
const r = ({ technician, state, activeStatuses, bodyshop }) => {
|
const r = ({ technician, state, activeStatuses, data, bodyshop }) => {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
title: i18n.t("jobs.actions.viewdetail"),
|
title: i18n.t("jobs.actions.viewdetail"),
|
||||||
@@ -561,6 +562,36 @@ const r = ({ technician, state, activeStatuses, bodyshop }) => {
|
|||||||
<JobPartsQueueCount parts={record.joblines_status} record={record} />
|
<JobPartsQueueCount parts={record.joblines_status} record={record} />
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: i18n.t("jobs.labels.estimator"),
|
||||||
|
dataIndex: "estimator",
|
||||||
|
key: "estimator",
|
||||||
|
sorter: (a, b) =>
|
||||||
|
alphaSort(
|
||||||
|
`${a.est_ct_fn || ""} ${a.est_ct_ln || ""}`.trim(),
|
||||||
|
`${b.est_ct_fn || ""} ${b.est_ct_ln || ""}`.trim()
|
||||||
|
),
|
||||||
|
sortOrder:
|
||||||
|
state.sortedInfo.columnKey === "estimator" && state.sortedInfo.order,
|
||||||
|
filters:
|
||||||
|
(data &&
|
||||||
|
data
|
||||||
|
.map((j) => `${j.est_ct_fn || ""} ${j.est_ct_ln || ""}`.trim())
|
||||||
|
.filter(onlyUnique)
|
||||||
|
.map((s) => {
|
||||||
|
return {
|
||||||
|
text: s || "N/A",
|
||||||
|
value: [s],
|
||||||
|
};
|
||||||
|
})) ||
|
||||||
|
[],
|
||||||
|
onFilter: (value, record) =>
|
||||||
|
value.includes(
|
||||||
|
`${record.est_ct_fn || ""} ${record.est_ct_ln || ""}`.trim()
|
||||||
|
),
|
||||||
|
render: (text, record) =>
|
||||||
|
`${record.est_ct_fn || ""} ${record.est_ct_ln || ""}`.trim(),
|
||||||
|
},
|
||||||
|
|
||||||
//Added as a place holder for St Claude. Not implemented as it requires another join for a field used by only 1 client.
|
//Added as a place holder for St Claude. Not implemented as it requires another join for a field used by only 1 client.
|
||||||
// {
|
// {
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ export function ProductionListTable({
|
|||||||
technician,
|
technician,
|
||||||
currentUser,
|
currentUser,
|
||||||
state,
|
state,
|
||||||
|
data,
|
||||||
setColumns,
|
setColumns,
|
||||||
setState,
|
setState,
|
||||||
}) {
|
}) {
|
||||||
@@ -41,6 +42,7 @@ export function ProductionListTable({
|
|||||||
bodyshop,
|
bodyshop,
|
||||||
technician,
|
technician,
|
||||||
state,
|
state,
|
||||||
|
data: data,
|
||||||
activeStatuses: bodyshop.md_ro_statuses.active_statuses,
|
activeStatuses: bodyshop.md_ro_statuses.active_statuses,
|
||||||
}).find((e) => e.key === k.key),
|
}).find((e) => e.key === k.key),
|
||||||
width: k.width,
|
width: k.width,
|
||||||
@@ -95,6 +97,7 @@ export function ProductionListTable({
|
|||||||
...ProductionListColumns({
|
...ProductionListColumns({
|
||||||
technician,
|
technician,
|
||||||
state,
|
state,
|
||||||
|
data: data,
|
||||||
activeStatuses: bodyshop.md_ro_statuses.active_statuses,
|
activeStatuses: bodyshop.md_ro_statuses.active_statuses,
|
||||||
}).find((e) => e.key === k.key),
|
}).find((e) => e.key === k.key),
|
||||||
width: k.width,
|
width: k.width,
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
Statistic,
|
Statistic,
|
||||||
Table,
|
Table,
|
||||||
} from "antd";
|
} from "antd";
|
||||||
import React, { useMemo, useState } from "react";
|
import React, { useEffect, useMemo, useState } from "react";
|
||||||
import ReactDragListView from "react-drag-listview";
|
import ReactDragListView from "react-drag-listview";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
@@ -79,6 +79,7 @@ export function ProductionListTable({
|
|||||||
bodyshop,
|
bodyshop,
|
||||||
technician,
|
technician,
|
||||||
state,
|
state,
|
||||||
|
data: data,
|
||||||
activeStatuses: bodyshop.md_ro_statuses.active_statuses,
|
activeStatuses: bodyshop.md_ro_statuses.active_statuses,
|
||||||
}).find((e) => e.key === k.key),
|
}).find((e) => e.key === k.key),
|
||||||
width: k.width ?? 100,
|
width: k.width ?? 100,
|
||||||
@@ -87,6 +88,33 @@ export function ProductionListTable({
|
|||||||
[]
|
[]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const newColumns =
|
||||||
|
(state &&
|
||||||
|
matchingColumnConfig &&
|
||||||
|
matchingColumnConfig.columns.columnKeys.map((k) => {
|
||||||
|
return {
|
||||||
|
...ProductionListColumns({
|
||||||
|
bodyshop,
|
||||||
|
technician,
|
||||||
|
state,
|
||||||
|
data: data,
|
||||||
|
activeStatuses: bodyshop.md_ro_statuses.active_statuses,
|
||||||
|
}).find((e) => e.key === k.key),
|
||||||
|
width: k.width ?? 100,
|
||||||
|
};
|
||||||
|
})) ||
|
||||||
|
[];
|
||||||
|
setColumns(newColumns);
|
||||||
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
|
}, [
|
||||||
|
//state,
|
||||||
|
matchingColumnConfig,
|
||||||
|
bodyshop,
|
||||||
|
technician,
|
||||||
|
data,
|
||||||
|
]); //State removed from dependency array as it causes race condition when removing columns from table view and is not needed.
|
||||||
|
|
||||||
const handleTableChange = (pagination, filters, sorter) => {
|
const handleTableChange = (pagination, filters, sorter) => {
|
||||||
setState({
|
setState({
|
||||||
...state,
|
...state,
|
||||||
@@ -104,7 +132,8 @@ export function ProductionListTable({
|
|||||||
|
|
||||||
const removeColumn = (e) => {
|
const removeColumn = (e) => {
|
||||||
const { key } = e;
|
const { key } = e;
|
||||||
setColumns(columns.filter((i) => i.key !== key));
|
const newColumns = columns.filter((i) => i.key !== key);
|
||||||
|
setColumns(newColumns);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleResize =
|
const handleResize =
|
||||||
@@ -227,6 +256,7 @@ export function ProductionListTable({
|
|||||||
<ProductionListColumnsAdd
|
<ProductionListColumnsAdd
|
||||||
columnState={[columns, setColumns]}
|
columnState={[columns, setColumns]}
|
||||||
tableState={state}
|
tableState={state}
|
||||||
|
data={data}
|
||||||
/>
|
/>
|
||||||
<ProductionListSaveConfigButton
|
<ProductionListSaveConfigButton
|
||||||
columns={columns}
|
columns={columns}
|
||||||
@@ -237,6 +267,7 @@ export function ProductionListTable({
|
|||||||
state={state}
|
state={state}
|
||||||
setState={setState}
|
setState={setState}
|
||||||
setColumns={setColumns}
|
setColumns={setColumns}
|
||||||
|
data={data}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Input
|
<Input
|
||||||
|
|||||||
@@ -55,10 +55,11 @@ const ret = {
|
|||||||
"shiftclock:view": 2,
|
"shiftclock:view": 2,
|
||||||
|
|
||||||
"shop:config": 4,
|
"shop:config": 4,
|
||||||
"shop:rbac": 5,
|
|
||||||
"shop:vendors": 2,
|
|
||||||
"shop:dashboard": 3,
|
"shop:dashboard": 3,
|
||||||
|
"shop:rbac": 5,
|
||||||
|
"shop:reportcenter": 2,
|
||||||
"shop:templates": 4,
|
"shop:templates": 4,
|
||||||
|
"shop:vendors": 2,
|
||||||
|
|
||||||
"temporarydocs:view": 2,
|
"temporarydocs:view": 2,
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { connect } from "react-redux";
|
|||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { toggleModalVisible } from "../../redux/modals/modals.actions";
|
import { toggleModalVisible } from "../../redux/modals/modals.actions";
|
||||||
import { selectReportCenter } from "../../redux/modals/modals.selectors";
|
import { selectReportCenter } from "../../redux/modals/modals.selectors";
|
||||||
|
import RbacWrapperComponent from "../rbac-wrapper/rbac-wrapper.component";
|
||||||
import ReportCenterModalComponent from "./report-center-modal.component";
|
import ReportCenterModalComponent from "./report-center-modal.component";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
@@ -33,7 +34,9 @@ export function ReportCenterModalContainer({
|
|||||||
destroyOnClose
|
destroyOnClose
|
||||||
width="80%"
|
width="80%"
|
||||||
>
|
>
|
||||||
<ReportCenterModalComponent />
|
<RbacWrapperComponent action="shop:reportcenter">
|
||||||
|
<ReportCenterModalComponent />
|
||||||
|
</RbacWrapperComponent>
|
||||||
</Modal>
|
</Modal>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export default connect(
|
|||||||
|
|
||||||
export function ScoreboardTimeTicketsStats({ bodyshop }) {
|
export function ScoreboardTimeTicketsStats({ bodyshop }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const startDate = moment().startOf("month")
|
const startDate = moment().startOf("month");
|
||||||
const endDate = moment().endOf("month");
|
const endDate = moment().endOf("month");
|
||||||
|
|
||||||
const fixedPeriods = useMemo(() => {
|
const fixedPeriods = useMemo(() => {
|
||||||
@@ -84,6 +84,8 @@ export function ScoreboardTimeTicketsStats({ bodyshop }) {
|
|||||||
end: endDate.format("YYYY-MM-DD"),
|
end: endDate.format("YYYY-MM-DD"),
|
||||||
fixedStart: fixedPeriods.start.format("YYYY-MM-DD"),
|
fixedStart: fixedPeriods.start.format("YYYY-MM-DD"),
|
||||||
fixedEnd: fixedPeriods.end.format("YYYY-MM-DD"),
|
fixedEnd: fixedPeriods.end.format("YYYY-MM-DD"),
|
||||||
|
jobStart: startDate,
|
||||||
|
jobEnd: endDate,
|
||||||
},
|
},
|
||||||
fetchPolicy: "network-only",
|
fetchPolicy: "network-only",
|
||||||
nextFetchPolicy: "network-only",
|
nextFetchPolicy: "network-only",
|
||||||
@@ -340,11 +342,21 @@ export function ScoreboardTimeTicketsStats({ bodyshop }) {
|
|||||||
larData.push({ ...r, ...lar });
|
larData.push({ ...r, ...lar });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const jobData = {};
|
||||||
|
data.jobs.forEach((job) => {
|
||||||
|
job.tthrs = job.joblines.reduce((acc, val) => acc + val.mod_lb_hrs, 0);
|
||||||
|
});
|
||||||
|
jobData.tthrs = data.jobs
|
||||||
|
.reduce((acc, val) => acc + val.tthrs, 0)
|
||||||
|
.toFixed(1);
|
||||||
|
jobData.count = data.jobs.length.toFixed(0);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
fixed: ret,
|
fixed: ret,
|
||||||
combinedData: combinedData,
|
combinedData: combinedData,
|
||||||
labData: labData,
|
labData: labData,
|
||||||
larData: larData,
|
larData: larData,
|
||||||
|
jobData: jobData,
|
||||||
};
|
};
|
||||||
}, [fixedPeriods, data, bodyshop]);
|
}, [fixedPeriods, data, bodyshop]);
|
||||||
|
|
||||||
@@ -356,7 +368,10 @@ export function ScoreboardTimeTicketsStats({ bodyshop }) {
|
|||||||
<ScoreboardTimeticketsTargetsTable />
|
<ScoreboardTimeticketsTargetsTable />
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<ScoreboardTicketsStats data={calculatedData.fixed} />
|
<ScoreboardTicketsStats
|
||||||
|
data={calculatedData.fixed}
|
||||||
|
jobData={calculatedData.jobData}
|
||||||
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<ScoreboardTimeTicketsChart
|
<ScoreboardTimeTicketsChart
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ function useLocalStorage(key, initialValue) {
|
|||||||
return [storedValue, setStoredValue];
|
return [storedValue, setStoredValue];
|
||||||
}
|
}
|
||||||
|
|
||||||
export function ScoreboardTicketsStats({ data, bodyshop }) {
|
export function ScoreboardTicketsStats({ data, jobData, bodyshop }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [isLarge, setIsLarge] = useLocalStorage("isLargeStatistic", false);
|
const [isLarge, setIsLarge] = useLocalStorage("isLargeStatistic", false);
|
||||||
|
|
||||||
@@ -408,7 +408,7 @@ export function ScoreboardTicketsStats({ data, bodyshop }) {
|
|||||||
{/* Monthly Stats */}
|
{/* Monthly Stats */}
|
||||||
<Row gutter={[16, 16]}>
|
<Row gutter={[16, 16]}>
|
||||||
{/* This Month */}
|
{/* This Month */}
|
||||||
<Col span={8} align="center">
|
<Col span={7} align="center">
|
||||||
<Card size="small" title={t("scoreboard.labels.thismonth")}>
|
<Card size="small" title={t("scoreboard.labels.thismonth")}>
|
||||||
<Row gutter={[16, 16]}>
|
<Row gutter={[16, 16]}>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
@@ -482,7 +482,7 @@ export function ScoreboardTicketsStats({ data, bodyshop }) {
|
|||||||
</Card>
|
</Card>
|
||||||
</Col>
|
</Col>
|
||||||
{/* Last Month */}
|
{/* Last Month */}
|
||||||
<Col span={8} align="center">
|
<Col span={7} align="center">
|
||||||
<Card size="small" title={t("scoreboard.labels.lastmonth")}>
|
<Card size="small" title={t("scoreboard.labels.lastmonth")}>
|
||||||
<Row gutter={[16, 16]}>
|
<Row gutter={[16, 16]}>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
@@ -556,7 +556,7 @@ export function ScoreboardTicketsStats({ data, bodyshop }) {
|
|||||||
</Card>
|
</Card>
|
||||||
</Col>
|
</Col>
|
||||||
{/* Efficiency Over Period */}
|
{/* Efficiency Over Period */}
|
||||||
<Col span={8} align="center">
|
<Col span={7} align="center">
|
||||||
<Card
|
<Card
|
||||||
size="small"
|
size="small"
|
||||||
title={t("scoreboard.labels.efficiencyoverperiod")}
|
title={t("scoreboard.labels.efficiencyoverperiod")}
|
||||||
@@ -604,6 +604,40 @@ export function ScoreboardTicketsStats({ data, bodyshop }) {
|
|||||||
</Row>
|
</Row>
|
||||||
</Card>
|
</Card>
|
||||||
</Col>
|
</Col>
|
||||||
|
<Col span={3} align="center">
|
||||||
|
<Card
|
||||||
|
size="small"
|
||||||
|
title={t("scoreboard.labels.jobscompletednotinvoiced")}
|
||||||
|
>
|
||||||
|
<Row gutter={[16, 16]}>
|
||||||
|
<Col span={24}>
|
||||||
|
<Statistic
|
||||||
|
value={jobData.count}
|
||||||
|
valueStyle={{
|
||||||
|
fontSize: statisticSize,
|
||||||
|
fontWeight: statisticWeight,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
<Row gutter={[16, 16]}>
|
||||||
|
<Col span={24}>
|
||||||
|
<Statistic
|
||||||
|
title={
|
||||||
|
<Typography.Text strong>
|
||||||
|
{t("scoreboard.labels.totalhrs")}
|
||||||
|
</Typography.Text>
|
||||||
|
}
|
||||||
|
value={jobData.tthrs}
|
||||||
|
valueStyle={{
|
||||||
|
fontSize: statisticSize,
|
||||||
|
fontWeight: statisticWeight,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
</Card>
|
||||||
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
</Space>
|
</Space>
|
||||||
{/* Disclaimer */}
|
{/* Disclaimer */}
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ export default function ScoreboardTimeTickets() {
|
|||||||
end: endDate.format("YYYY-MM-DD"),
|
end: endDate.format("YYYY-MM-DD"),
|
||||||
fixedStart: fixedPeriods.start.format("YYYY-MM-DD"),
|
fixedStart: fixedPeriods.start.format("YYYY-MM-DD"),
|
||||||
fixedEnd: fixedPeriods.end.format("YYYY-MM-DD"),
|
fixedEnd: fixedPeriods.end.format("YYYY-MM-DD"),
|
||||||
|
jobStart: startDate,
|
||||||
|
jobEnd: endDate,
|
||||||
},
|
},
|
||||||
fetchPolicy: "network-only",
|
fetchPolicy: "network-only",
|
||||||
nextFetchPolicy: "network-only",
|
nextFetchPolicy: "network-only",
|
||||||
|
|||||||
@@ -28,18 +28,6 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
return (
|
return (
|
||||||
<RbacWrapper action="shop:rbac">
|
<RbacWrapper action="shop:rbac">
|
||||||
<LayoutFormRow>
|
<LayoutFormRow>
|
||||||
<Form.Item
|
|
||||||
label={t("bodyshop.fields.rbac.accounting.payables")}
|
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
//message: t("general.validation.required"),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
name={["md_rbac", "accounting:payables"]}
|
|
||||||
>
|
|
||||||
<InputNumber />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.accounting.exportlog")}
|
label={t("bodyshop.fields.rbac.accounting.exportlog")}
|
||||||
rules={[
|
rules={[
|
||||||
@@ -52,6 +40,18 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.rbac.accounting.payables")}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
name={["md_rbac", "accounting:payables"]}
|
||||||
|
>
|
||||||
|
<InputNumber />
|
||||||
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.accounting.payments")}
|
label={t("bodyshop.fields.rbac.accounting.payments")}
|
||||||
rules={[
|
rules={[
|
||||||
@@ -77,26 +77,62 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.csi.page")}
|
label={t("bodyshop.fields.rbac.bills.delete")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
//message: t("general.validation.required"),
|
//message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
name={["md_rbac", "csi:page"]}
|
name={["md_rbac", "bills:delete"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.csi.export")}
|
label={t("bodyshop.fields.rbac.bills.enter")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
//message: t("general.validation.required"),
|
//message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
name={["md_rbac", "csi:export"]}
|
name={["md_rbac", "bills:enter"]}
|
||||||
|
>
|
||||||
|
<InputNumber />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.rbac.bills.list")}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
name={["md_rbac", "bills:list"]}
|
||||||
|
>
|
||||||
|
<InputNumber />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.rbac.bills.reexport")}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
name={["md_rbac", "bills:reexport"]}
|
||||||
|
>
|
||||||
|
<InputNumber />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.rbac.bills.view")}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
name={["md_rbac", "bills:view"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
@@ -173,26 +209,38 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.jobs.list-active")}
|
label={t("bodyshop.fields.rbac.csi.export")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
//message: t("general.validation.required"),
|
//message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
name={["md_rbac", "jobs:list-active"]}
|
name={["md_rbac", "csi:export"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.jobs.list-ready")}
|
label={t("bodyshop.fields.rbac.csi.page")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
//message: t("general.validation.required"),
|
//message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
name={["md_rbac", "jobs:list-ready"]}
|
name={["md_rbac", "csi:page"]}
|
||||||
|
>
|
||||||
|
<InputNumber />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.rbac.employees.page")}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
name={["md_rbac", "employees:page"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
@@ -208,30 +256,6 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
|
||||||
label={t("bodyshop.fields.rbac.jobs.partsqueue")}
|
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
//message: t("general.validation.required"),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
name={["md_rbac", "jobs:partsqueue"]}
|
|
||||||
>
|
|
||||||
<InputNumber />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item
|
|
||||||
label={t("bodyshop.fields.rbac.jobs.list-all")}
|
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
//message: t("general.validation.required"),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
name={["md_rbac", "jobs:list-all"]}
|
|
||||||
>
|
|
||||||
<InputNumber />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.jobs.available-list")}
|
label={t("bodyshop.fields.rbac.jobs.available-list")}
|
||||||
rules={[
|
rules={[
|
||||||
@@ -245,26 +269,14 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.jobs.create")}
|
label={t("bodyshop.fields.rbac.jobs.checklist-view")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
//message: t("general.validation.required"),
|
//message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
name={["md_rbac", "jobs:create"]}
|
name={["md_rbac", "jobs:checklist-view"]}
|
||||||
>
|
|
||||||
<InputNumber />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item
|
|
||||||
label={t("bodyshop.fields.rbac.jobs.intake")}
|
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
//message: t("general.validation.required"),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
name={["md_rbac", "jobs:intake"]}
|
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
@@ -280,6 +292,18 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.rbac.jobs.create")}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
name={["md_rbac", "jobs:create"]}
|
||||||
|
>
|
||||||
|
<InputNumber />
|
||||||
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.jobs.deliver")}
|
label={t("bodyshop.fields.rbac.jobs.deliver")}
|
||||||
rules={[
|
rules={[
|
||||||
@@ -305,14 +329,62 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.jobs.checklist-view")}
|
label={t("bodyshop.fields.rbac.jobs.intake")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
//message: t("general.validation.required"),
|
//message: t("general.validation.required"),
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
name={["md_rbac", "jobs:checklist-view"]}
|
name={["md_rbac", "jobs:intake"]}
|
||||||
|
>
|
||||||
|
<InputNumber />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.rbac.jobs.list-active")}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
name={["md_rbac", "jobs:list-active"]}
|
||||||
|
>
|
||||||
|
<InputNumber />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.rbac.jobs.list-all")}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
name={["md_rbac", "jobs:list-all"]}
|
||||||
|
>
|
||||||
|
<InputNumber />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.rbac.jobs.list-ready")}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
name={["md_rbac", "jobs:list-ready"]}
|
||||||
|
>
|
||||||
|
<InputNumber />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.rbac.jobs.partsqueue")}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
name={["md_rbac", "jobs:partsqueue"]}
|
||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
@@ -329,55 +401,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.bills.enter")}
|
label={t("bodyshop.fields.rbac.owners.detail")}
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
//message: t("general.validation.required"),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
name={["md_rbac", "bills:enter"]}
|
|
||||||
>
|
|
||||||
<InputNumber />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item
|
|
||||||
label={t("bodyshop.fields.rbac.bills.delete")}
|
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
//message: t("general.validation.required"),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
name={["md_rbac", "bills:delete"]}
|
|
||||||
>
|
|
||||||
<InputNumber />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item
|
|
||||||
label={t("bodyshop.fields.rbac.bills.reexport")}
|
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
//message: t("general.validation.required"),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
name={["md_rbac", "bills:reexport"]}
|
|
||||||
>
|
|
||||||
<InputNumber />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item
|
|
||||||
label={t("bodyshop.fields.rbac.bills.view")}
|
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
//message: t("general.validation.required"),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
name={["md_rbac", "bills:view"]}
|
|
||||||
>
|
|
||||||
<InputNumber />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item
|
|
||||||
label={t("bodyshop.fields.rbac.bills.list")}
|
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
@@ -424,18 +448,6 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
|
||||||
label={t("bodyshop.fields.rbac.owners.detail")}
|
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
//message: t("general.validation.required"),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
name={["md_rbac", "owners:detail"]}
|
|
||||||
>
|
|
||||||
<InputNumber />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.payments.enter")}
|
label={t("bodyshop.fields.rbac.payments.enter")}
|
||||||
rules={[
|
rules={[
|
||||||
@@ -460,6 +472,30 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.rbac.phonebook.edit")}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
name={["md_rbac", "phonebook:edit"]}
|
||||||
|
>
|
||||||
|
<InputNumber />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.rbac.phonebook.view")}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
name={["md_rbac", "phonebook:view"]}
|
||||||
|
>
|
||||||
|
<InputNumber />
|
||||||
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.production.board")}
|
label={t("bodyshop.fields.rbac.production.board")}
|
||||||
rules={[
|
rules={[
|
||||||
@@ -521,7 +557,7 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.timetickets.edit")}
|
label={t("bodyshop.fields.rbac.shop.config")}
|
||||||
rules={[
|
rules={[
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
@@ -604,18 +640,6 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
|
||||||
label={t("bodyshop.fields.rbac.shop.config")}
|
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
//message: t("general.validation.required"),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
name={["md_rbac", "shop:config"]}
|
|
||||||
>
|
|
||||||
<InputNumber />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.shop.rbac")}
|
label={t("bodyshop.fields.rbac.shop.rbac")}
|
||||||
rules={[
|
rules={[
|
||||||
@@ -628,6 +652,18 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.rbac.shop.reportcenter")}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
name={["md_rbac", "shop:reportcenter"]}
|
||||||
|
>
|
||||||
|
<InputNumber />
|
||||||
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.shop.templates")}
|
label={t("bodyshop.fields.rbac.shop.templates")}
|
||||||
rules={[
|
rules={[
|
||||||
@@ -640,6 +676,42 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.rbac.shop.vendors")}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
name={["md_rbac", "shop:vendors"]}
|
||||||
|
>
|
||||||
|
<InputNumber />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.rbac.temporarydocs.view")}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
name={["md_rbac", "temporarydocs:view"]}
|
||||||
|
>
|
||||||
|
<InputNumber />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.rbac.timetickets.edit")}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
name={["md_rbac", "timetickets:edit"]}
|
||||||
|
>
|
||||||
|
<InputNumber />
|
||||||
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.timetickets.enter")}
|
label={t("bodyshop.fields.rbac.timetickets.enter")}
|
||||||
rules={[
|
rules={[
|
||||||
@@ -664,6 +736,18 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.rbac.timetickets.shiftedit")}
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
name={["md_rbac", "timetickets:shiftedit"]}
|
||||||
|
>
|
||||||
|
<InputNumber />
|
||||||
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("bodyshop.fields.rbac.users.editaccess")}
|
label={t("bodyshop.fields.rbac.users.editaccess")}
|
||||||
rules={[
|
rules={[
|
||||||
@@ -676,42 +760,6 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
>
|
>
|
||||||
<InputNumber />
|
<InputNumber />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
|
||||||
label={t("bodyshop.fields.rbac.temporarydocs.view")}
|
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
//message: t("general.validation.required"),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
name={["md_rbac", "temporarydocs:view"]}
|
|
||||||
>
|
|
||||||
<InputNumber />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item
|
|
||||||
label={t("bodyshop.fields.rbac.phonebook.view")}
|
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
//message: t("general.validation.required"),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
name={["md_rbac", "phonebook:view"]}
|
|
||||||
>
|
|
||||||
<InputNumber />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item
|
|
||||||
label={t("bodyshop.fields.rbac.phonebook.edit")}
|
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
//message: t("general.validation.required"),
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
name={["md_rbac", "phonebook:edit"]}
|
|
||||||
>
|
|
||||||
<InputNumber />
|
|
||||||
</Form.Item>
|
|
||||||
{Simple_Inventory.treatment === "on" && (
|
{Simple_Inventory.treatment === "on" && (
|
||||||
<>
|
<>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ import { DeleteFilled } from "@ant-design/icons";
|
|||||||
import { useMutation, useQuery } from "@apollo/client";
|
import { useMutation, useQuery } from "@apollo/client";
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
Space,
|
|
||||||
Card,
|
Card,
|
||||||
Form,
|
Form,
|
||||||
Input,
|
Input,
|
||||||
InputNumber,
|
InputNumber,
|
||||||
|
Space,
|
||||||
Switch,
|
Switch,
|
||||||
notification,
|
notification,
|
||||||
} from "antd";
|
} from "antd";
|
||||||
@@ -157,6 +157,18 @@ export function ShopEmployeeTeamsFormComponent({ bodyshop }) {
|
|||||||
>
|
>
|
||||||
<Switch />
|
<Switch />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("employee_teams.fields.max_load")}
|
||||||
|
name="max_load"
|
||||||
|
rules={[
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
//message: t("general.validation.required"),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<InputNumber min={0} precision={1} />
|
||||||
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
<Form.List name={["employee_team_members"]}>
|
<Form.List name={["employee_team_members"]}>
|
||||||
{(fields, { add, remove, move }) => {
|
{(fields, { add, remove, move }) => {
|
||||||
@@ -199,7 +211,7 @@ export function ShopEmployeeTeamsFormComponent({ bodyshop }) {
|
|||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<InputNumber min={0} max={100} precision={2}/>
|
<InputNumber min={0} max={100} precision={2} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("joblines.fields.lbr_types.LAA")}
|
label={t("joblines.fields.lbr_types.LAA")}
|
||||||
|
|||||||
@@ -30,15 +30,15 @@ export const QUERY_AVAILABLE_CC = gql`
|
|||||||
fuel
|
fuel
|
||||||
id
|
id
|
||||||
make
|
make
|
||||||
model
|
|
||||||
plate
|
|
||||||
status
|
|
||||||
year
|
|
||||||
dailycost
|
|
||||||
mileage
|
mileage
|
||||||
|
model
|
||||||
notes
|
notes
|
||||||
nextservicekm
|
nextservicekm
|
||||||
nextservicedate
|
nextservicedate
|
||||||
|
plate
|
||||||
|
readiness
|
||||||
|
status
|
||||||
|
year
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
@@ -68,19 +68,20 @@ export const QUERY_ALL_CC = gql`
|
|||||||
insuranceexpires
|
insuranceexpires
|
||||||
leaseenddate
|
leaseenddate
|
||||||
make
|
make
|
||||||
|
mileage
|
||||||
model
|
model
|
||||||
nextservicedate
|
nextservicedate
|
||||||
nextservicekm
|
nextservicekm
|
||||||
notes
|
notes
|
||||||
plate
|
plate
|
||||||
purchasedate
|
purchasedate
|
||||||
|
readiness
|
||||||
registrationexpires
|
registrationexpires
|
||||||
serviceenddate
|
serviceenddate
|
||||||
servicestartdate
|
servicestartdate
|
||||||
status
|
status
|
||||||
vin
|
vin
|
||||||
year
|
year
|
||||||
mileage
|
|
||||||
cccontracts(
|
cccontracts(
|
||||||
where: { status: { _eq: "contracts.status.out" } }
|
where: { status: { _eq: "contracts.status.out" } }
|
||||||
order_by: { contract_date: desc }
|
order_by: { contract_date: desc }
|
||||||
@@ -90,10 +91,10 @@ export const QUERY_ALL_CC = gql`
|
|||||||
scheduledreturn
|
scheduledreturn
|
||||||
job {
|
job {
|
||||||
id
|
id
|
||||||
ro_number
|
|
||||||
ownr_fn
|
ownr_fn
|
||||||
ownr_ln
|
ownr_ln
|
||||||
ownr_co_nm
|
ownr_co_nm
|
||||||
|
ro_number
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -119,19 +120,20 @@ export const QUERY_CC_BY_PK = gql`
|
|||||||
insuranceexpires
|
insuranceexpires
|
||||||
leaseenddate
|
leaseenddate
|
||||||
make
|
make
|
||||||
|
mileage
|
||||||
model
|
model
|
||||||
nextservicedate
|
nextservicedate
|
||||||
nextservicekm
|
nextservicekm
|
||||||
notes
|
notes
|
||||||
plate
|
plate
|
||||||
purchasedate
|
purchasedate
|
||||||
|
readiness
|
||||||
registrationexpires
|
registrationexpires
|
||||||
serviceenddate
|
serviceenddate
|
||||||
servicestartdate
|
servicestartdate
|
||||||
status
|
status
|
||||||
vin
|
vin
|
||||||
year
|
year
|
||||||
mileage
|
|
||||||
cccontracts_aggregate {
|
cccontracts_aggregate {
|
||||||
aggregate {
|
aggregate {
|
||||||
count(distinct: true)
|
count(distinct: true)
|
||||||
@@ -139,21 +141,20 @@ export const QUERY_CC_BY_PK = gql`
|
|||||||
}
|
}
|
||||||
cccontracts(offset: $offset, limit: $limit, order_by: $order) {
|
cccontracts(offset: $offset, limit: $limit, order_by: $order) {
|
||||||
agreementnumber
|
agreementnumber
|
||||||
|
driver_fn
|
||||||
|
driver_ln
|
||||||
id
|
id
|
||||||
status
|
|
||||||
start
|
|
||||||
scheduledreturn
|
|
||||||
kmstart
|
kmstart
|
||||||
kmend
|
kmend
|
||||||
driver_ln
|
scheduledreturn
|
||||||
driver_fn
|
start
|
||||||
|
status
|
||||||
job {
|
job {
|
||||||
ro_number
|
id
|
||||||
|
|
||||||
ownr_ln
|
ownr_ln
|
||||||
ownr_fn
|
ownr_fn
|
||||||
ownr_co_nm
|
ownr_co_nm
|
||||||
id
|
ro_number
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ export const QUERY_TEAMS = gql`
|
|||||||
query QUERY_TEAMS {
|
query QUERY_TEAMS {
|
||||||
employee_teams(order_by: { name: asc }) {
|
employee_teams(order_by: { name: asc }) {
|
||||||
id
|
id
|
||||||
|
max_load
|
||||||
name
|
name
|
||||||
employee_team_members {
|
employee_team_members {
|
||||||
id
|
id
|
||||||
@@ -25,9 +26,9 @@ export const UPDATE_EMPLOYEE_TEAM = gql`
|
|||||||
) {
|
) {
|
||||||
update_employee_team_members_many(updates: $teamMemberUpdates) {
|
update_employee_team_members_many(updates: $teamMemberUpdates) {
|
||||||
returning {
|
returning {
|
||||||
|
employeeid
|
||||||
id
|
id
|
||||||
labor_rates
|
labor_rates
|
||||||
employeeid
|
|
||||||
percentage
|
percentage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -36,9 +37,9 @@ export const UPDATE_EMPLOYEE_TEAM = gql`
|
|||||||
}
|
}
|
||||||
insert_employee_team_members(objects: $teamMemberInserts) {
|
insert_employee_team_members(objects: $teamMemberInserts) {
|
||||||
returning {
|
returning {
|
||||||
|
employeeid
|
||||||
id
|
id
|
||||||
labor_rates
|
labor_rates
|
||||||
employeeid
|
|
||||||
percentage
|
percentage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -47,12 +48,14 @@ export const UPDATE_EMPLOYEE_TEAM = gql`
|
|||||||
_set: $employeeTeam
|
_set: $employeeTeam
|
||||||
) {
|
) {
|
||||||
active
|
active
|
||||||
name
|
|
||||||
id
|
id
|
||||||
|
max_load
|
||||||
|
name
|
||||||
employee_team_members {
|
employee_team_members {
|
||||||
percentage
|
employeeid
|
||||||
labor_rates
|
|
||||||
id
|
id
|
||||||
|
labor_rates
|
||||||
|
percentage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -62,13 +65,14 @@ export const INSERT_EMPLOYEE_TEAM = gql`
|
|||||||
mutation INSERT_EMPLOYEE_TEAM($employeeTeam: employee_teams_insert_input!) {
|
mutation INSERT_EMPLOYEE_TEAM($employeeTeam: employee_teams_insert_input!) {
|
||||||
insert_employee_teams_one(object: $employeeTeam) {
|
insert_employee_teams_one(object: $employeeTeam) {
|
||||||
active
|
active
|
||||||
name
|
|
||||||
id
|
id
|
||||||
|
max_load
|
||||||
|
name
|
||||||
employee_team_members {
|
employee_team_members {
|
||||||
employeeid
|
employeeid
|
||||||
percentage
|
|
||||||
labor_rates
|
|
||||||
id
|
id
|
||||||
|
labor_rates
|
||||||
|
percentage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -77,14 +81,15 @@ export const INSERT_EMPLOYEE_TEAM = gql`
|
|||||||
export const QUERY_EMPLOYEE_TEAM_BY_ID = gql`
|
export const QUERY_EMPLOYEE_TEAM_BY_ID = gql`
|
||||||
query QUERY_EMPLOYEE_TEAM_BY_ID($id: uuid!) {
|
query QUERY_EMPLOYEE_TEAM_BY_ID($id: uuid!) {
|
||||||
employee_teams_by_pk(id: $id) {
|
employee_teams_by_pk(id: $id) {
|
||||||
id
|
|
||||||
name
|
|
||||||
active
|
active
|
||||||
|
id
|
||||||
|
max_load
|
||||||
|
name
|
||||||
employee_team_members {
|
employee_team_members {
|
||||||
employeeid
|
employeeid
|
||||||
percentage
|
|
||||||
labor_rates
|
|
||||||
id
|
id
|
||||||
|
labor_rates
|
||||||
|
percentage
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -364,6 +364,8 @@ export const QUERY_JOBS_IN_PRODUCTION = gql`
|
|||||||
employee_refinish
|
employee_refinish
|
||||||
employee_prep
|
employee_prep
|
||||||
employee_csr
|
employee_csr
|
||||||
|
est_ct_fn
|
||||||
|
est_ct_ln
|
||||||
suspended
|
suspended
|
||||||
date_repairstarted
|
date_repairstarted
|
||||||
joblines_status {
|
joblines_status {
|
||||||
|
|||||||
@@ -152,9 +152,14 @@ export const QUERY_TIME_TICKETS_IN_RANGE_SB = gql`
|
|||||||
$end: date!
|
$end: date!
|
||||||
$fixedStart: date!
|
$fixedStart: date!
|
||||||
$fixedEnd: date!
|
$fixedEnd: date!
|
||||||
|
$jobStart: timestamptz!
|
||||||
|
$jobEnd: timestamptz!
|
||||||
) {
|
) {
|
||||||
timetickets(
|
timetickets(
|
||||||
where: { date: { _gte: $start, _lte: $end }, cost_center: {_neq: "timetickets.labels.shift"} }
|
where: {
|
||||||
|
date: { _gte: $start, _lte: $end }
|
||||||
|
cost_center: { _neq: "timetickets.labels.shift" }
|
||||||
|
}
|
||||||
order_by: { date: desc_nulls_first }
|
order_by: { date: desc_nulls_first }
|
||||||
) {
|
) {
|
||||||
actualhrs
|
actualhrs
|
||||||
@@ -189,7 +194,10 @@ export const QUERY_TIME_TICKETS_IN_RANGE_SB = gql`
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
fixedperiod: timetickets(
|
fixedperiod: timetickets(
|
||||||
where: { date: { _gte: $fixedStart, _lte: $fixedEnd }, cost_center: {_neq: "timetickets.labels.shift"} }
|
where: {
|
||||||
|
date: { _gte: $fixedStart, _lte: $fixedEnd }
|
||||||
|
cost_center: { _neq: "timetickets.labels.shift" }
|
||||||
|
}
|
||||||
order_by: { date: desc_nulls_first }
|
order_by: { date: desc_nulls_first }
|
||||||
) {
|
) {
|
||||||
actualhrs
|
actualhrs
|
||||||
@@ -218,6 +226,25 @@ export const QUERY_TIME_TICKETS_IN_RANGE_SB = gql`
|
|||||||
last_name
|
last_name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
jobs(
|
||||||
|
where: {
|
||||||
|
date_invoiced: { _is_null: true }
|
||||||
|
ro_number: { _is_null: false }
|
||||||
|
voided: { _eq: false }
|
||||||
|
_or: [
|
||||||
|
{ actual_completion: { _gte: $jobStart, _lte: $jobEnd } }
|
||||||
|
{ actual_delivery: { _gte: $jobStart, _lte: $jobEnd } }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
) {
|
||||||
|
id
|
||||||
|
joblines(order_by: { line_no: asc }, where: { removed: { _eq: false } }) {
|
||||||
|
convertedtolbr
|
||||||
|
convertedtolbr_data
|
||||||
|
mod_lb_hrs
|
||||||
|
mod_lbr_ty
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
import { useMutation, useQuery } from "@apollo/client";
|
import { useMutation, useQuery } from "@apollo/client";
|
||||||
import { Form, notification } from "antd";
|
import { Form, notification } from "antd";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
|
import queryString from "query-string";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { useParams } from "react-router-dom";
|
import { useLocation, useParams } from "react-router-dom";
|
||||||
import AlertComponent from "../../components/alert/alert.component";
|
import AlertComponent from "../../components/alert/alert.component";
|
||||||
|
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
|
||||||
|
import NotFound from "../../components/not-found/not-found.component";
|
||||||
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
|
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
|
||||||
import { QUERY_CC_BY_PK, UPDATE_CC } from "../../graphql/courtesy-car.queries";
|
import { QUERY_CC_BY_PK, UPDATE_CC } from "../../graphql/courtesy-car.queries";
|
||||||
import {
|
import {
|
||||||
@@ -13,13 +16,10 @@ import {
|
|||||||
setBreadcrumbs,
|
setBreadcrumbs,
|
||||||
setSelectedHeader,
|
setSelectedHeader,
|
||||||
} from "../../redux/application/application.actions";
|
} from "../../redux/application/application.actions";
|
||||||
|
import { pageLimit } from "../../utils/config";
|
||||||
import { CreateRecentItem } from "../../utils/create-recent-item";
|
import { CreateRecentItem } from "../../utils/create-recent-item";
|
||||||
|
import UndefinedToNull from "./../../utils/undefinedtonull";
|
||||||
import CourtesyCarDetailPageComponent from "./courtesy-car-detail.page.component";
|
import CourtesyCarDetailPageComponent from "./courtesy-car-detail.page.component";
|
||||||
import NotFound from "../../components/not-found/not-found.component";
|
|
||||||
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
|
|
||||||
import queryString from "query-string";
|
|
||||||
import { useLocation } from "react-router-dom";
|
|
||||||
import {pageLimit} from "../../utils/config";
|
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)),
|
setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)),
|
||||||
@@ -112,7 +112,10 @@ export function CourtesyCarDetailPageContainer({
|
|||||||
setSaveLoading(true);
|
setSaveLoading(true);
|
||||||
|
|
||||||
const result = await updateCourtesyCar({
|
const result = await updateCourtesyCar({
|
||||||
variables: { cc: { ...values }, ccId: ccId },
|
variables: {
|
||||||
|
cc: { ...UndefinedToNull(values, ["readiness"]) },
|
||||||
|
ccId: ccId,
|
||||||
|
},
|
||||||
refetchQueries: ["QUERY_CC_BY_PK"],
|
refetchQueries: ["QUERY_CC_BY_PK"],
|
||||||
awaitRefetchQueries: true,
|
awaitRefetchQueries: true,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -36,14 +36,22 @@ import JobsCloseLines from "../../components/jobs-close-lines/jobs-close-lines.c
|
|||||||
import LayoutFormRow from "../../components/layout-form-row/layout-form-row.component";
|
import LayoutFormRow from "../../components/layout-form-row/layout-form-row.component";
|
||||||
import { generateJobLinesUpdatesForInvoicing } from "../../graphql/jobs-lines.queries";
|
import { generateJobLinesUpdatesForInvoicing } from "../../graphql/jobs-lines.queries";
|
||||||
import { UPDATE_JOB } from "../../graphql/jobs.queries";
|
import { UPDATE_JOB } from "../../graphql/jobs.queries";
|
||||||
|
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||||
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
|
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
jobRO: selectJobReadOnly,
|
jobRO: selectJobReadOnly,
|
||||||
});
|
});
|
||||||
|
|
||||||
export function JobsCloseComponent({ job, bodyshop, jobRO }) {
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
|
insertAuditTrail: ({ jobid, operation }) =>
|
||||||
|
dispatch(insertAuditTrail({ jobid, operation })),
|
||||||
|
});
|
||||||
|
|
||||||
|
export function JobsCloseComponent({ job, bodyshop, jobRO, insertAuditTrail, }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
const client = useApolloClient();
|
const client = useApolloClient();
|
||||||
@@ -110,6 +118,10 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) {
|
|||||||
notification["success"]({
|
notification["success"]({
|
||||||
message: t("jobs.successes.closed"),
|
message: t("jobs.successes.closed"),
|
||||||
});
|
});
|
||||||
|
insertAuditTrail({
|
||||||
|
jobid: job.id,
|
||||||
|
operation: AuditTrailMapping.jobinvoiced(),
|
||||||
|
});
|
||||||
// history.push(`/manage/jobs/${job.id}`);
|
// history.push(`/manage/jobs/${job.id}`);
|
||||||
} else {
|
} else {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
@@ -527,4 +539,4 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
export default connect(mapStateToProps, null)(JobsCloseComponent);
|
export default connect(mapStateToProps, mapDispatchToProps)(JobsCloseComponent);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import _ from "lodash";
|
|
||||||
import { useLazyQuery, useMutation } from "@apollo/client";
|
import { useLazyQuery, useMutation } from "@apollo/client";
|
||||||
import { Form, notification } from "antd";
|
import { Form, notification } from "antd";
|
||||||
|
import _ from "lodash";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
@@ -90,6 +90,7 @@ function JobsCreateContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
|
|||||||
{},
|
{},
|
||||||
values,
|
values,
|
||||||
{ date_open: new Date() },
|
{ date_open: new Date() },
|
||||||
|
{ date_estimated: new Date() },
|
||||||
{
|
{
|
||||||
vehicle:
|
vehicle:
|
||||||
state.vehicle.selectedid || state.vehicle.none
|
state.vehicle.selectedid || state.vehicle.none
|
||||||
|
|||||||
@@ -105,6 +105,7 @@
|
|||||||
"admin_jobuninvoice": "ADMIN: Job has been uninvoiced.",
|
"admin_jobuninvoice": "ADMIN: Job has been uninvoiced.",
|
||||||
"admin_jobunvoid": "ADMIN: Job has been unvoided.",
|
"admin_jobunvoid": "ADMIN: Job has been unvoided.",
|
||||||
"assignedlinehours": "Assigned job lines totaling {{hours}} units to {{team}}.",
|
"assignedlinehours": "Assigned job lines totaling {{hours}} units to {{team}}.",
|
||||||
|
"alerttoggle": "Alert Toggle set to {{status}}",
|
||||||
"appointmentcancel": "Appointment canceled. Lost Reason: {{lost_sale_reason}}.",
|
"appointmentcancel": "Appointment canceled. Lost Reason: {{lost_sale_reason}}.",
|
||||||
"appointmentinsert": "Appointment created. Appointment Date: {{start}}.",
|
"appointmentinsert": "Appointment created. Appointment Date: {{start}}.",
|
||||||
"billposted": "Bill with invoice number {{invoice_number}} posted.",
|
"billposted": "Bill with invoice number {{invoice_number}} posted.",
|
||||||
@@ -113,6 +114,7 @@
|
|||||||
"jobassignmentchange": "Employee {{name}} assigned to {{operation}}",
|
"jobassignmentchange": "Employee {{name}} assigned to {{operation}}",
|
||||||
"jobassignmentremoved": "Employee assignment removed for {{operation}}",
|
"jobassignmentremoved": "Employee assignment removed for {{operation}}",
|
||||||
"jobchecklist": "Checklist type \"{{type}}\" completed. In production set to {{inproduction}}. Status set to {{status}}.",
|
"jobchecklist": "Checklist type \"{{type}}\" completed. In production set to {{inproduction}}. Status set to {{status}}.",
|
||||||
|
"jobinvoiced": "Job has been invoiced.",
|
||||||
"jobconverted": "Job converted and assigned number {{ro_number}}.",
|
"jobconverted": "Job converted and assigned number {{ro_number}}.",
|
||||||
"jobfieldchanged": "Job field $t(jobs.fields.{{field}}) changed to {{value}}.",
|
"jobfieldchanged": "Job field $t(jobs.fields.{{field}}) changed to {{value}}.",
|
||||||
"jobimported": "Job imported.",
|
"jobimported": "Job imported.",
|
||||||
@@ -207,6 +209,7 @@
|
|||||||
"entered_total": "Total of Entered Lines",
|
"entered_total": "Total of Entered Lines",
|
||||||
"enteringcreditmemo": "You are entering a credit memo. Please ensure you are also entering positive values.",
|
"enteringcreditmemo": "You are entering a credit memo. Please ensure you are also entering positive values.",
|
||||||
"federal_tax": "Federal Tax",
|
"federal_tax": "Federal Tax",
|
||||||
|
"federal_tax_exempt": "Federal Tax Exempt?",
|
||||||
"generatepartslabel": "Generate Parts Labels after Saving?",
|
"generatepartslabel": "Generate Parts Labels after Saving?",
|
||||||
"iouexists": "An IOU exists that is associated to this RO.",
|
"iouexists": "An IOU exists that is associated to this RO.",
|
||||||
"local_tax": "Local Tax",
|
"local_tax": "Local Tax",
|
||||||
@@ -215,6 +218,7 @@
|
|||||||
"new": "New Bill",
|
"new": "New Bill",
|
||||||
"noneselected": "No bill selected.",
|
"noneselected": "No bill selected.",
|
||||||
"onlycmforinvoiced": "Only credit memos can be entered for any Job that has been invoiced, exported, or voided.",
|
"onlycmforinvoiced": "Only credit memos can be entered for any Job that has been invoiced, exported, or voided.",
|
||||||
|
"printlabels": "Print Labels",
|
||||||
"retailtotal": "Bills Retail Total",
|
"retailtotal": "Bills Retail Total",
|
||||||
"savewithdiscrepancy": "You are about to save this bill with a discrepancy. The system will continue to use the calculated amount using the bill lines. Press cancel to return to the bill.",
|
"savewithdiscrepancy": "You are about to save this bill with a discrepancy. The system will continue to use the calculated amount using the bill lines. Press cancel to return to the bill.",
|
||||||
"state_tax": "State Tax",
|
"state_tax": "State Tax",
|
||||||
@@ -454,6 +458,7 @@
|
|||||||
"config": "Shop -> Config",
|
"config": "Shop -> Config",
|
||||||
"dashboard": "Shop -> Dashboard",
|
"dashboard": "Shop -> Dashboard",
|
||||||
"rbac": "Shop -> RBAC",
|
"rbac": "Shop -> RBAC",
|
||||||
|
"reportcenter": "Shop -> Report Center",
|
||||||
"templates": "Shop -> Templates",
|
"templates": "Shop -> Templates",
|
||||||
"vendors": "Shop -> Vendors"
|
"vendors": "Shop -> Vendors"
|
||||||
},
|
},
|
||||||
@@ -794,6 +799,7 @@
|
|||||||
"notes": "Notes",
|
"notes": "Notes",
|
||||||
"plate": "Plate Number",
|
"plate": "Plate Number",
|
||||||
"purchasedate": "Purchase Date",
|
"purchasedate": "Purchase Date",
|
||||||
|
"readiness": "Readiness",
|
||||||
"registrationexpires": "Registration Expires On",
|
"registrationexpires": "Registration Expires On",
|
||||||
"serviceenddate": "Usage End Date",
|
"serviceenddate": "Usage End Date",
|
||||||
"servicestartdate": "Usage Start Date",
|
"servicestartdate": "Usage Start Date",
|
||||||
@@ -830,6 +836,10 @@
|
|||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
"saved": "Courtesy Car saved successfully."
|
"saved": "Courtesy Car saved successfully."
|
||||||
|
},
|
||||||
|
"readiness": {
|
||||||
|
"notready": "Not Ready",
|
||||||
|
"ready": "Ready"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"csi": {
|
"csi": {
|
||||||
@@ -966,6 +976,7 @@
|
|||||||
"fields": {
|
"fields": {
|
||||||
"active": "Active",
|
"active": "Active",
|
||||||
"employeeid": "Employee",
|
"employeeid": "Employee",
|
||||||
|
"max_load": "Max Load",
|
||||||
"name": "Team Name",
|
"name": "Team Name",
|
||||||
"percentage": "Percent"
|
"percentage": "Percent"
|
||||||
}
|
}
|
||||||
@@ -2112,6 +2123,9 @@
|
|||||||
"sentby": "Sent by {{by}} at {{time}}",
|
"sentby": "Sent by {{by}} at {{time}}",
|
||||||
"typeamessage": "Send a message...",
|
"typeamessage": "Send a message...",
|
||||||
"unarchive": "Unarchive"
|
"unarchive": "Unarchive"
|
||||||
|
},
|
||||||
|
"render": {
|
||||||
|
"conversation_list": "Conversation List"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notes": {
|
"notes": {
|
||||||
@@ -2700,6 +2714,7 @@
|
|||||||
"jobs_reconcile": "Parts/Sublet/Labor Reconciliation",
|
"jobs_reconcile": "Parts/Sublet/Labor Reconciliation",
|
||||||
"jobs_scheduled_completion": "Jobs Scheduled Completion",
|
"jobs_scheduled_completion": "Jobs Scheduled Completion",
|
||||||
"lag_time": "Lag Time",
|
"lag_time": "Lag Time",
|
||||||
|
"load_level": "Load Level",
|
||||||
"lost_sales": "Lost Sales",
|
"lost_sales": "Lost Sales",
|
||||||
"open_orders": "Open Orders by Date",
|
"open_orders": "Open Orders by Date",
|
||||||
"open_orders_csr": "Open Orders by CSR",
|
"open_orders_csr": "Open Orders by CSR",
|
||||||
@@ -2792,6 +2807,7 @@
|
|||||||
"efficiencyoverperiod": "Efficiency over Selected Dates",
|
"efficiencyoverperiod": "Efficiency over Selected Dates",
|
||||||
"entries": "Scoreboard Entries",
|
"entries": "Scoreboard Entries",
|
||||||
"jobs": "Jobs",
|
"jobs": "Jobs",
|
||||||
|
"jobscompletednotinvoiced": "Completed Not Invoiced",
|
||||||
"lastmonth": "Last Month",
|
"lastmonth": "Last Month",
|
||||||
"lastweek": "Last Week",
|
"lastweek": "Last Week",
|
||||||
"monthlytarget": "Monthly",
|
"monthlytarget": "Monthly",
|
||||||
@@ -2806,6 +2822,7 @@
|
|||||||
"timetickets": "Time Tickets",
|
"timetickets": "Time Tickets",
|
||||||
"timeticketsemployee": "Time Tickets by Employee",
|
"timeticketsemployee": "Time Tickets by Employee",
|
||||||
"todateactual": "Actual (MTD)",
|
"todateactual": "Actual (MTD)",
|
||||||
|
"totalhrs": "Total Hours",
|
||||||
"totaloverperiod": "Total over Selected Dates",
|
"totaloverperiod": "Total over Selected Dates",
|
||||||
"weeklyactual": "Actual (W)",
|
"weeklyactual": "Actual (W)",
|
||||||
"weeklytarget": "Weekly",
|
"weeklytarget": "Weekly",
|
||||||
|
|||||||
@@ -104,6 +104,7 @@
|
|||||||
"admin_jobmarkforreexport": "",
|
"admin_jobmarkforreexport": "",
|
||||||
"admin_jobuninvoice": "",
|
"admin_jobuninvoice": "",
|
||||||
"admin_jobunvoid": "",
|
"admin_jobunvoid": "",
|
||||||
|
"alerttoggle": "",
|
||||||
"appointmentcancel": "",
|
"appointmentcancel": "",
|
||||||
"appointmentinsert": "",
|
"appointmentinsert": "",
|
||||||
"assignedlinehours": "",
|
"assignedlinehours": "",
|
||||||
@@ -113,6 +114,7 @@
|
|||||||
"jobassignmentchange": "",
|
"jobassignmentchange": "",
|
||||||
"jobassignmentremoved": "",
|
"jobassignmentremoved": "",
|
||||||
"jobchecklist": "",
|
"jobchecklist": "",
|
||||||
|
"jobinvoiced": "",
|
||||||
"jobconverted": "",
|
"jobconverted": "",
|
||||||
"jobfieldchanged": "",
|
"jobfieldchanged": "",
|
||||||
"jobimported": "",
|
"jobimported": "",
|
||||||
@@ -207,6 +209,7 @@
|
|||||||
"entered_total": "",
|
"entered_total": "",
|
||||||
"enteringcreditmemo": "",
|
"enteringcreditmemo": "",
|
||||||
"federal_tax": "",
|
"federal_tax": "",
|
||||||
|
"federal_tax_exempt": "",
|
||||||
"generatepartslabel": "",
|
"generatepartslabel": "",
|
||||||
"iouexists": "",
|
"iouexists": "",
|
||||||
"local_tax": "",
|
"local_tax": "",
|
||||||
@@ -215,6 +218,7 @@
|
|||||||
"new": "",
|
"new": "",
|
||||||
"noneselected": "",
|
"noneselected": "",
|
||||||
"onlycmforinvoiced": "",
|
"onlycmforinvoiced": "",
|
||||||
|
"printlabels": "",
|
||||||
"retailtotal": "",
|
"retailtotal": "",
|
||||||
"savewithdiscrepancy": "",
|
"savewithdiscrepancy": "",
|
||||||
"state_tax": "",
|
"state_tax": "",
|
||||||
@@ -454,6 +458,7 @@
|
|||||||
"config": "",
|
"config": "",
|
||||||
"dashboard": "",
|
"dashboard": "",
|
||||||
"rbac": "",
|
"rbac": "",
|
||||||
|
"reportcenter": "",
|
||||||
"templates": "",
|
"templates": "",
|
||||||
"vendors": ""
|
"vendors": ""
|
||||||
},
|
},
|
||||||
@@ -794,6 +799,7 @@
|
|||||||
"notes": "",
|
"notes": "",
|
||||||
"plate": "",
|
"plate": "",
|
||||||
"purchasedate": "",
|
"purchasedate": "",
|
||||||
|
"readiness": "",
|
||||||
"registrationexpires": "",
|
"registrationexpires": "",
|
||||||
"serviceenddate": "",
|
"serviceenddate": "",
|
||||||
"servicestartdate": "",
|
"servicestartdate": "",
|
||||||
@@ -830,6 +836,10 @@
|
|||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
"saved": ""
|
"saved": ""
|
||||||
|
},
|
||||||
|
"readiness": {
|
||||||
|
"notready": "",
|
||||||
|
"ready": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"csi": {
|
"csi": {
|
||||||
@@ -966,6 +976,7 @@
|
|||||||
"fields": {
|
"fields": {
|
||||||
"active": "",
|
"active": "",
|
||||||
"employeeid": "",
|
"employeeid": "",
|
||||||
|
"max_load": "",
|
||||||
"name": "",
|
"name": "",
|
||||||
"percentage": ""
|
"percentage": ""
|
||||||
}
|
}
|
||||||
@@ -2112,6 +2123,9 @@
|
|||||||
"sentby": "",
|
"sentby": "",
|
||||||
"typeamessage": "Enviar un mensaje...",
|
"typeamessage": "Enviar un mensaje...",
|
||||||
"unarchive": ""
|
"unarchive": ""
|
||||||
|
},
|
||||||
|
"render": {
|
||||||
|
"conversation_list": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notes": {
|
"notes": {
|
||||||
@@ -2700,6 +2714,7 @@
|
|||||||
"jobs_reconcile": "",
|
"jobs_reconcile": "",
|
||||||
"jobs_scheduled_completion": "",
|
"jobs_scheduled_completion": "",
|
||||||
"lag_time": "",
|
"lag_time": "",
|
||||||
|
"load_level": "",
|
||||||
"lost_sales": "",
|
"lost_sales": "",
|
||||||
"open_orders": "",
|
"open_orders": "",
|
||||||
"open_orders_csr": "",
|
"open_orders_csr": "",
|
||||||
@@ -2792,6 +2807,7 @@
|
|||||||
"efficiencyoverperiod": "",
|
"efficiencyoverperiod": "",
|
||||||
"entries": "",
|
"entries": "",
|
||||||
"jobs": "",
|
"jobs": "",
|
||||||
|
"jobscompletednotinvoiced": "",
|
||||||
"lastmonth": "",
|
"lastmonth": "",
|
||||||
"lastweek": "",
|
"lastweek": "",
|
||||||
"monthlytarget": "",
|
"monthlytarget": "",
|
||||||
@@ -2806,6 +2822,7 @@
|
|||||||
"timetickets": "",
|
"timetickets": "",
|
||||||
"timeticketsemployee": "",
|
"timeticketsemployee": "",
|
||||||
"todateactual": "",
|
"todateactual": "",
|
||||||
|
"totalhrs": "",
|
||||||
"totaloverperiod": "",
|
"totaloverperiod": "",
|
||||||
"weeklyactual": "",
|
"weeklyactual": "",
|
||||||
"weeklytarget": "",
|
"weeklytarget": "",
|
||||||
|
|||||||
@@ -104,6 +104,7 @@
|
|||||||
"admin_jobmarkforreexport": "",
|
"admin_jobmarkforreexport": "",
|
||||||
"admin_jobuninvoice": "",
|
"admin_jobuninvoice": "",
|
||||||
"admin_jobunvoid": "",
|
"admin_jobunvoid": "",
|
||||||
|
"alerttoggle": "",
|
||||||
"appointmentcancel": "",
|
"appointmentcancel": "",
|
||||||
"appointmentinsert": "",
|
"appointmentinsert": "",
|
||||||
"assignedlinehours": "",
|
"assignedlinehours": "",
|
||||||
@@ -113,6 +114,7 @@
|
|||||||
"jobassignmentchange": "",
|
"jobassignmentchange": "",
|
||||||
"jobassignmentremoved": "",
|
"jobassignmentremoved": "",
|
||||||
"jobchecklist": "",
|
"jobchecklist": "",
|
||||||
|
"jobinvoiced": "",
|
||||||
"jobconverted": "",
|
"jobconverted": "",
|
||||||
"jobfieldchanged": "",
|
"jobfieldchanged": "",
|
||||||
"jobimported": "",
|
"jobimported": "",
|
||||||
@@ -207,6 +209,7 @@
|
|||||||
"entered_total": "",
|
"entered_total": "",
|
||||||
"enteringcreditmemo": "",
|
"enteringcreditmemo": "",
|
||||||
"federal_tax": "",
|
"federal_tax": "",
|
||||||
|
"federal_tax_exempt": "",
|
||||||
"generatepartslabel": "",
|
"generatepartslabel": "",
|
||||||
"iouexists": "",
|
"iouexists": "",
|
||||||
"local_tax": "",
|
"local_tax": "",
|
||||||
@@ -215,6 +218,7 @@
|
|||||||
"new": "",
|
"new": "",
|
||||||
"noneselected": "",
|
"noneselected": "",
|
||||||
"onlycmforinvoiced": "",
|
"onlycmforinvoiced": "",
|
||||||
|
"printlabels": "",
|
||||||
"retailtotal": "",
|
"retailtotal": "",
|
||||||
"savewithdiscrepancy": "",
|
"savewithdiscrepancy": "",
|
||||||
"state_tax": "",
|
"state_tax": "",
|
||||||
@@ -454,6 +458,7 @@
|
|||||||
"config": "",
|
"config": "",
|
||||||
"dashboard": "",
|
"dashboard": "",
|
||||||
"rbac": "",
|
"rbac": "",
|
||||||
|
"reportcenter": "",
|
||||||
"templates": "",
|
"templates": "",
|
||||||
"vendors": ""
|
"vendors": ""
|
||||||
},
|
},
|
||||||
@@ -794,6 +799,7 @@
|
|||||||
"notes": "",
|
"notes": "",
|
||||||
"plate": "",
|
"plate": "",
|
||||||
"purchasedate": "",
|
"purchasedate": "",
|
||||||
|
"readiness": "",
|
||||||
"registrationexpires": "",
|
"registrationexpires": "",
|
||||||
"serviceenddate": "",
|
"serviceenddate": "",
|
||||||
"servicestartdate": "",
|
"servicestartdate": "",
|
||||||
@@ -830,6 +836,10 @@
|
|||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
"saved": ""
|
"saved": ""
|
||||||
|
},
|
||||||
|
"readiness": {
|
||||||
|
"notready": "",
|
||||||
|
"ready": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"csi": {
|
"csi": {
|
||||||
@@ -966,6 +976,7 @@
|
|||||||
"fields": {
|
"fields": {
|
||||||
"active": "",
|
"active": "",
|
||||||
"employeeid": "",
|
"employeeid": "",
|
||||||
|
"max_load": "",
|
||||||
"name": "",
|
"name": "",
|
||||||
"percentage": ""
|
"percentage": ""
|
||||||
}
|
}
|
||||||
@@ -2112,6 +2123,9 @@
|
|||||||
"sentby": "",
|
"sentby": "",
|
||||||
"typeamessage": "Envoyer un message...",
|
"typeamessage": "Envoyer un message...",
|
||||||
"unarchive": ""
|
"unarchive": ""
|
||||||
|
},
|
||||||
|
"render": {
|
||||||
|
"conversation_list": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"notes": {
|
"notes": {
|
||||||
@@ -2700,6 +2714,7 @@
|
|||||||
"jobs_reconcile": "",
|
"jobs_reconcile": "",
|
||||||
"jobs_scheduled_completion": "",
|
"jobs_scheduled_completion": "",
|
||||||
"lag_time": "",
|
"lag_time": "",
|
||||||
|
"load_level": "",
|
||||||
"lost_sales": "",
|
"lost_sales": "",
|
||||||
"open_orders": "",
|
"open_orders": "",
|
||||||
"open_orders_csr": "",
|
"open_orders_csr": "",
|
||||||
@@ -2792,6 +2807,7 @@
|
|||||||
"efficiencyoverperiod": "",
|
"efficiencyoverperiod": "",
|
||||||
"entries": "",
|
"entries": "",
|
||||||
"jobs": "",
|
"jobs": "",
|
||||||
|
"jobscompletednotinvoiced": "",
|
||||||
"lastmonth": "",
|
"lastmonth": "",
|
||||||
"lastweek": "",
|
"lastweek": "",
|
||||||
"monthlytarget": "",
|
"monthlytarget": "",
|
||||||
@@ -2806,6 +2822,7 @@
|
|||||||
"timetickets": "",
|
"timetickets": "",
|
||||||
"timeticketsemployee": "",
|
"timeticketsemployee": "",
|
||||||
"todateactual": "",
|
"todateactual": "",
|
||||||
|
"totalhrs": "",
|
||||||
"totaloverperiod": "",
|
"totaloverperiod": "",
|
||||||
"weeklyactual": "",
|
"weeklyactual": "",
|
||||||
"weeklytarget": "",
|
"weeklytarget": "",
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import i18n from "i18next";
|
import i18n from "i18next";
|
||||||
|
|
||||||
const AuditTrailMapping = {
|
const AuditTrailMapping = {
|
||||||
|
alertToggle: (status) => i18n.t("audit_trail.messages.alerttoggle", { status }),
|
||||||
appointmentcancel: (lost_sale_reason) =>
|
appointmentcancel: (lost_sale_reason) =>
|
||||||
i18n.t("audit_trail.messages.appointmentcancel", { lost_sale_reason }),
|
i18n.t("audit_trail.messages.appointmentcancel", { lost_sale_reason }),
|
||||||
appointmentinsert: (start) =>
|
appointmentinsert: (start) =>
|
||||||
@@ -11,6 +12,8 @@ const AuditTrailMapping = {
|
|||||||
"ADMIN: " + i18n.t("audit_trail.messages.jobstatuschange", { status }),
|
"ADMIN: " + i18n.t("audit_trail.messages.jobstatuschange", { status }),
|
||||||
jobsupplement: () => i18n.t("audit_trail.messages.jobsupplement"),
|
jobsupplement: () => i18n.t("audit_trail.messages.jobsupplement"),
|
||||||
jobimported: () => i18n.t("audit_trail.messages.jobimported"),
|
jobimported: () => i18n.t("audit_trail.messages.jobimported"),
|
||||||
|
jobinvoiced: () =>
|
||||||
|
i18n.t("audit_trail.messages.jobinvoiced"),
|
||||||
jobconverted: (ro_number) =>
|
jobconverted: (ro_number) =>
|
||||||
i18n.t("audit_trail.messages.jobconverted", { ro_number }),
|
i18n.t("audit_trail.messages.jobconverted", { ro_number }),
|
||||||
jobfieldchange: (field, value) =>
|
jobfieldchange: (field, value) =>
|
||||||
|
|||||||
@@ -2179,6 +2179,19 @@ export const TemplateList = (type, context) => {
|
|||||||
},
|
},
|
||||||
group: "customers",
|
group: "customers",
|
||||||
},
|
},
|
||||||
|
load_level: {
|
||||||
|
title: i18n.t("reportcenter.templates.load_level"),
|
||||||
|
subject: i18n.t("reportcenter.templates.load_level"),
|
||||||
|
key: "load_level",
|
||||||
|
//idtype: "vendor",
|
||||||
|
disabled: false,
|
||||||
|
rangeFilter: {
|
||||||
|
object: i18n.t("reportcenter.labels.objects.jobs"),
|
||||||
|
field: i18n.t("jobs.fields.date_open"),
|
||||||
|
},
|
||||||
|
group: "jobs",
|
||||||
|
enhanced_payroll: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
...(!type || type === "courtesycarcontract"
|
...(!type || type === "courtesycarcontract"
|
||||||
@@ -2255,6 +2268,17 @@ export const TemplateList = (type, context) => {
|
|||||||
// },
|
// },
|
||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
|
...(!type || type === "messaging"
|
||||||
|
? {
|
||||||
|
conversation_list: {
|
||||||
|
title: i18n.t("messaging.render.conversation_list"),
|
||||||
|
description: "",
|
||||||
|
subject: i18n.t("messaging.render.conversation_list"),
|
||||||
|
key: "conversation_list",
|
||||||
|
disabled: false,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
: {}),
|
||||||
...(!type || type === "vendor"
|
...(!type || type === "vendor"
|
||||||
? {
|
? {
|
||||||
purchases_by_vendor_detailed: {
|
purchases_by_vendor_detailed: {
|
||||||
|
|||||||
@@ -1388,60 +1388,62 @@
|
|||||||
- active:
|
- active:
|
||||||
_eq: true
|
_eq: true
|
||||||
columns:
|
columns:
|
||||||
- id
|
|
||||||
- created_at
|
|
||||||
- updated_at
|
|
||||||
- bodyshopid
|
- bodyshopid
|
||||||
- make
|
|
||||||
- model
|
|
||||||
- year
|
|
||||||
- plate
|
|
||||||
- color
|
- color
|
||||||
- vin
|
- created_at
|
||||||
- fleetnumber
|
|
||||||
- purchasedate
|
|
||||||
- servicestartdate
|
|
||||||
- serviceenddate
|
|
||||||
- leaseenddate
|
|
||||||
- status
|
|
||||||
- nextservicekm
|
|
||||||
- nextservicedate
|
|
||||||
- damage
|
|
||||||
- notes
|
|
||||||
- fuel
|
|
||||||
- registrationexpires
|
|
||||||
- insuranceexpires
|
|
||||||
- dailycost
|
- dailycost
|
||||||
|
- damage
|
||||||
|
- fleetnumber
|
||||||
|
- fuel
|
||||||
|
- id
|
||||||
|
- insuranceexpires
|
||||||
|
- leaseenddate
|
||||||
|
- make
|
||||||
- mileage
|
- mileage
|
||||||
|
- model
|
||||||
|
- nextservicedate
|
||||||
|
- nextservicekm
|
||||||
|
- notes
|
||||||
|
- plate
|
||||||
|
- purchasedate
|
||||||
|
- readiness
|
||||||
|
- registrationexpires
|
||||||
|
- serviceenddate
|
||||||
|
- servicestartdate
|
||||||
|
- status
|
||||||
|
- updated_at
|
||||||
|
- vin
|
||||||
|
- year
|
||||||
select_permissions:
|
select_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
columns:
|
columns:
|
||||||
|
- bodyshopid
|
||||||
|
- color
|
||||||
|
- created_at
|
||||||
|
- dailycost
|
||||||
|
- damage
|
||||||
|
- fleetnumber
|
||||||
|
- fuel
|
||||||
|
- id
|
||||||
- insuranceexpires
|
- insuranceexpires
|
||||||
- leaseenddate
|
- leaseenddate
|
||||||
|
- make
|
||||||
|
- mileage
|
||||||
|
- model
|
||||||
- nextservicedate
|
- nextservicedate
|
||||||
|
- nextservicekm
|
||||||
|
- notes
|
||||||
|
- plate
|
||||||
- purchasedate
|
- purchasedate
|
||||||
|
- readiness
|
||||||
- registrationexpires
|
- registrationexpires
|
||||||
- serviceenddate
|
- serviceenddate
|
||||||
- servicestartdate
|
- servicestartdate
|
||||||
- dailycost
|
|
||||||
- fuel
|
|
||||||
- mileage
|
|
||||||
- nextservicekm
|
|
||||||
- color
|
|
||||||
- damage
|
|
||||||
- fleetnumber
|
|
||||||
- make
|
|
||||||
- model
|
|
||||||
- notes
|
|
||||||
- plate
|
|
||||||
- status
|
- status
|
||||||
|
- updated_at
|
||||||
- vin
|
- vin
|
||||||
- year
|
- year
|
||||||
- created_at
|
|
||||||
- updated_at
|
|
||||||
- bodyshopid
|
|
||||||
- id
|
|
||||||
filter:
|
filter:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
associations:
|
associations:
|
||||||
@@ -1456,31 +1458,32 @@
|
|||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
columns:
|
columns:
|
||||||
|
- bodyshopid
|
||||||
|
- color
|
||||||
|
- created_at
|
||||||
|
- dailycost
|
||||||
|
- damage
|
||||||
|
- fleetnumber
|
||||||
|
- fuel
|
||||||
|
- id
|
||||||
- insuranceexpires
|
- insuranceexpires
|
||||||
- leaseenddate
|
- leaseenddate
|
||||||
|
- make
|
||||||
|
- mileage
|
||||||
|
- model
|
||||||
- nextservicedate
|
- nextservicedate
|
||||||
|
- nextservicekm
|
||||||
|
- notes
|
||||||
|
- plate
|
||||||
- purchasedate
|
- purchasedate
|
||||||
|
- readiness
|
||||||
- registrationexpires
|
- registrationexpires
|
||||||
- serviceenddate
|
- serviceenddate
|
||||||
- servicestartdate
|
- servicestartdate
|
||||||
- dailycost
|
|
||||||
- fuel
|
|
||||||
- mileage
|
|
||||||
- nextservicekm
|
|
||||||
- color
|
|
||||||
- damage
|
|
||||||
- fleetnumber
|
|
||||||
- make
|
|
||||||
- model
|
|
||||||
- notes
|
|
||||||
- plate
|
|
||||||
- status
|
- status
|
||||||
|
- updated_at
|
||||||
- vin
|
- vin
|
||||||
- year
|
- year
|
||||||
- created_at
|
|
||||||
- updated_at
|
|
||||||
- bodyshopid
|
|
||||||
- id
|
|
||||||
filter:
|
filter:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
associations:
|
associations:
|
||||||
@@ -2020,24 +2023,24 @@
|
|||||||
- active:
|
- active:
|
||||||
_eq: true
|
_eq: true
|
||||||
columns:
|
columns:
|
||||||
- labor_rates
|
|
||||||
- percentage
|
|
||||||
- created_at
|
- created_at
|
||||||
- updated_at
|
|
||||||
- employeeid
|
- employeeid
|
||||||
- id
|
- id
|
||||||
|
- labor_rates
|
||||||
|
- percentage
|
||||||
- teamid
|
- teamid
|
||||||
|
- updated_at
|
||||||
select_permissions:
|
select_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
columns:
|
columns:
|
||||||
- labor_rates
|
|
||||||
- percentage
|
|
||||||
- created_at
|
- created_at
|
||||||
- updated_at
|
|
||||||
- employeeid
|
- employeeid
|
||||||
- id
|
- id
|
||||||
|
- labor_rates
|
||||||
|
- percentage
|
||||||
- teamid
|
- teamid
|
||||||
|
- updated_at
|
||||||
filter:
|
filter:
|
||||||
employee_team:
|
employee_team:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
@@ -2052,13 +2055,13 @@
|
|||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
columns:
|
columns:
|
||||||
- labor_rates
|
|
||||||
- percentage
|
|
||||||
- created_at
|
- created_at
|
||||||
- updated_at
|
|
||||||
- employeeid
|
- employeeid
|
||||||
- id
|
- id
|
||||||
|
- labor_rates
|
||||||
|
- percentage
|
||||||
- teamid
|
- teamid
|
||||||
|
- updated_at
|
||||||
filter:
|
filter:
|
||||||
employee_team:
|
employee_team:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
@@ -2120,21 +2123,23 @@
|
|||||||
_eq: true
|
_eq: true
|
||||||
columns:
|
columns:
|
||||||
- active
|
- active
|
||||||
- name
|
|
||||||
- created_at
|
|
||||||
- updated_at
|
|
||||||
- bodyshopid
|
- bodyshopid
|
||||||
|
- created_at
|
||||||
- id
|
- id
|
||||||
|
- max_load
|
||||||
|
- name
|
||||||
|
- updated_at
|
||||||
select_permissions:
|
select_permissions:
|
||||||
- role: user
|
- role: user
|
||||||
permission:
|
permission:
|
||||||
columns:
|
columns:
|
||||||
- active
|
- active
|
||||||
- name
|
|
||||||
- created_at
|
|
||||||
- updated_at
|
|
||||||
- bodyshopid
|
- bodyshopid
|
||||||
|
- created_at
|
||||||
- id
|
- id
|
||||||
|
- max_load
|
||||||
|
- name
|
||||||
|
- updated_at
|
||||||
filter:
|
filter:
|
||||||
bodyshop:
|
bodyshop:
|
||||||
associations:
|
associations:
|
||||||
@@ -2150,6 +2155,7 @@
|
|||||||
columns:
|
columns:
|
||||||
- active
|
- active
|
||||||
- bodyshopid
|
- bodyshopid
|
||||||
|
- max_load
|
||||||
- name
|
- name
|
||||||
- updated_at
|
- updated_at
|
||||||
filter:
|
filter:
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
-- Could not auto-generate a down migration.
|
||||||
|
-- Please write an appropriate down migration for the SQL below:
|
||||||
|
-- alter table "public"."courtesycars" add column "readiness" text
|
||||||
|
-- null;
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
alter table "public"."courtesycars" add column "readiness" text
|
||||||
|
null;
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
-- Could not auto-generate a down migration.
|
||||||
|
-- Please write an appropriate down migration for the SQL below:
|
||||||
|
-- alter table "public"."employee_team_members" add column "max_load" numeric
|
||||||
|
-- not null default '10000';
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
alter table "public"."employee_team_members" add column "max_load" numeric
|
||||||
|
not null default '10000';
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
alter table "public"."employee_team_members" alter column "max_load" set default '10000'::numeric;
|
||||||
|
alter table "public"."employee_team_members" alter column "max_load" drop not null;
|
||||||
|
alter table "public"."employee_team_members" add column "max_load" numeric;
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
alter table "public"."employee_team_members" drop column "max_load" cascade;
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
-- Could not auto-generate a down migration.
|
||||||
|
-- Please write an appropriate down migration for the SQL below:
|
||||||
|
-- alter table "public"."employee_teams" add column "max_load" numeric
|
||||||
|
-- not null default '10000';
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
alter table "public"."employee_teams" add column "max_load" numeric
|
||||||
|
not null default '10000';
|
||||||
@@ -50,7 +50,7 @@ exports.createUser = async (req, res) => {
|
|||||||
`,
|
`,
|
||||||
{
|
{
|
||||||
user: {
|
user: {
|
||||||
email,
|
email: email.toLowerCase(),
|
||||||
authid: userRecord.uid,
|
authid: userRecord.uid,
|
||||||
associations: {
|
associations: {
|
||||||
data: [{ shopid, authlevel, active: true }],
|
data: [{ shopid, authlevel, active: true }],
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ exports.payment_refund = async (req, res) => {
|
|||||||
exports.generate_payment_url = async (req, res) => {
|
exports.generate_payment_url = async (req, res) => {
|
||||||
logger.log("intellipay-payment-url", "DEBUG", req.user?.email, null, null);
|
logger.log("intellipay-payment-url", "DEBUG", req.user?.email, null, null);
|
||||||
const shopCredentials = await getShopCredentials(req.body.bodyshop);
|
const shopCredentials = await getShopCredentials(req.body.bodyshop);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const options = {
|
const options = {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
@@ -139,7 +140,12 @@ exports.generate_payment_url = async (req, res) => {
|
|||||||
//TODO: Move these to environment variables/database.
|
//TODO: Move these to environment variables/database.
|
||||||
data: qs.stringify({
|
data: qs.stringify({
|
||||||
...shopCredentials,
|
...shopCredentials,
|
||||||
...req.body,
|
//...req.body,
|
||||||
|
amount: Dinero({ amount: Math.round(req.body.amount * 100) }).toFormat(
|
||||||
|
"0.00"
|
||||||
|
),
|
||||||
|
account: req.body.account,
|
||||||
|
invoice: req.body.invoice,
|
||||||
createshorturl: true,
|
createshorturl: true,
|
||||||
//The postback URL is set at the CP teller global terminal settings page.
|
//The postback URL is set at the CP teller global terminal settings page.
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user