Merged in rome/release/2023-12-01 (pull request #1105)
Rome/release/2023 12 01 Approved-by: Patrick Fic
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
<babeledit_project version="1.2" be_version="2.7.1">
|
<babeledit_project be_version="2.7.1" version="1.2">
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
BabelEdit project file
|
BabelEdit project file
|
||||||
@@ -18453,6 +18453,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>tvmode</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>unknown</name>
|
<name>unknown</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -20080,6 +20101,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>create_ppc</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>db_price</name>
|
<name>db_price</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -46941,6 +46983,27 @@
|
|||||||
<folder_node>
|
<folder_node>
|
||||||
<name>labels</name>
|
<name>labels</name>
|
||||||
<children>
|
<children>
|
||||||
|
<concept_node>
|
||||||
|
<name>allemployeetimetickets</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>asoftodaytarget</name>
|
<name>asoftodaytarget</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -46962,6 +47025,48 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>body</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>bodycharttitle</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>calendarperiod</name>
|
<name>calendarperiod</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -46983,6 +47088,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>combinedcharttitle</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>dailyactual</name>
|
<name>dailyactual</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -47151,6 +47277,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>priorweek</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>productivestatistics</name>
|
<name>productivestatistics</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -47193,6 +47340,48 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>refinish</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>refinishcharttitle</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>targets</name>
|
<name>targets</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -47277,6 +47466,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>timeticketsemployee</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>es-MX</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
<translation>
|
||||||
|
<language>fr-CA</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>todateactual</name>
|
<name>todateactual</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import { createStructuredSelector } from "reselect";
|
|||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import ExportLogsCountDisplay from "../export-logs-count-display/export-logs-count-display.component";
|
import ExportLogsCountDisplay from "../export-logs-count-display/export-logs-count-display.component";
|
||||||
import BillMarkSelectedExported from "../payable-mark-selected-exported/payable-mark-selected-exported.component";
|
import BillMarkSelectedExported from "../payable-mark-selected-exported/payable-mark-selected-exported.component";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -210,7 +211,7 @@ export function AccountingPayablesTableComponent({
|
|||||||
<Table
|
<Table
|
||||||
loading={loading}
|
loading={loading}
|
||||||
dataSource={dataSource}
|
dataSource={dataSource}
|
||||||
pagination={{ position: "top", pageSize: 50 }}
|
pagination={{ position: "top", pageSize: pageLimit }}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
onChange={handleTableChange}
|
onChange={handleTableChange}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import PaymentExportButton from "../payment-export-button/payment-export-button.
|
|||||||
import PaymentMarkSelectedExported from "../payment-mark-selected-exported/payment-mark-selected-exported.component";
|
import PaymentMarkSelectedExported from "../payment-mark-selected-exported/payment-mark-selected-exported.component";
|
||||||
import PaymentsExportAllButton from "../payments-export-all-button/payments-export-all-button.component";
|
import PaymentsExportAllButton from "../payments-export-all-button/payments-export-all-button.component";
|
||||||
import QboAuthorizeComponent from "../qbo-authorize/qbo-authorize.component";
|
import QboAuthorizeComponent from "../qbo-authorize/qbo-authorize.component";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -209,7 +210,7 @@ export function AccountingPayablesTableComponent({
|
|||||||
<Table
|
<Table
|
||||||
loading={loading}
|
loading={loading}
|
||||||
dataSource={dataSource}
|
dataSource={dataSource}
|
||||||
pagination={{ position: "top", pageSize: 50 }}
|
pagination={{ position: "top", pageSize: pageLimit }}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
onChange={handleTableChange}
|
onChange={handleTableChange}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { alphaSort } from "../../utils/sorters";
|
|||||||
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import AuditTrailValuesComponent from "../audit-trail-values/audit-trail-values.component";
|
import AuditTrailValuesComponent from "../audit-trail-values/audit-trail-values.component";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
|
|
||||||
export default function AuditTrailListComponent({ loading, data }) {
|
export default function AuditTrailListComponent({ loading, data }) {
|
||||||
const [state, setState] = useState({
|
const [state, setState] = useState({
|
||||||
@@ -74,7 +75,7 @@ export default function AuditTrailListComponent({ loading, data }) {
|
|||||||
<Table
|
<Table
|
||||||
{...formItemLayout}
|
{...formItemLayout}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
pagination={{ position: "top", defaultPageSize: 25 }}
|
pagination={{ position: "top", defaultPageSize: pageLimit }}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
dataSource={data}
|
dataSource={data}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import React, { useState } from "react";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
||||||
import { alphaSort } from "../../utils/sorters";
|
import { alphaSort } from "../../utils/sorters";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
|
|
||||||
export default function EmailAuditTrailListComponent({ loading, data }) {
|
export default function EmailAuditTrailListComponent({ loading, data }) {
|
||||||
const [state, setState] = useState({
|
const [state, setState] = useState({
|
||||||
@@ -53,7 +54,7 @@ export default function EmailAuditTrailListComponent({ loading, data }) {
|
|||||||
<Table
|
<Table
|
||||||
{...formItemLayout}
|
{...formItemLayout}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
pagination={{ position: "top", defaultPageSize: 25 }}
|
pagination={{ position: "top", defaultPageSize: pageLimit }}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
dataSource={data}
|
dataSource={data}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { useApolloClient, useMutation } from "@apollo/client";
|
import { useApolloClient, useMutation } from "@apollo/client";
|
||||||
|
import { useTreatments } from "@splitsoftware/splitio-react";
|
||||||
import { Button, Checkbox, Form, Modal, Space, notification } from "antd";
|
import { Button, Checkbox, Form, Modal, Space, notification } from "antd";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import React, { useEffect, useMemo, useState } from "react";
|
import React, { useEffect, useMemo, useState } from "react";
|
||||||
@@ -29,7 +30,6 @@ import BillFormContainer from "../bill-form/bill-form.container";
|
|||||||
import { CalculateBillTotal } from "../bill-form/bill-form.totals.utility";
|
import { CalculateBillTotal } from "../bill-form/bill-form.totals.utility";
|
||||||
import { handleUpload as handleLocalUpload } from "../documents-local-upload/documents-local-upload.utility";
|
import { handleUpload as handleLocalUpload } from "../documents-local-upload/documents-local-upload.utility";
|
||||||
import { handleUpload } from "../documents-upload/documents-upload.utility";
|
import { handleUpload } from "../documents-upload/documents-upload.utility";
|
||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
billEnterModal: selectBillEnterModal,
|
billEnterModal: selectBillEnterModal,
|
||||||
@@ -72,6 +72,11 @@ function BillEnterModalContainer({
|
|||||||
const formValues = useMemo(() => {
|
const formValues = useMemo(() => {
|
||||||
return {
|
return {
|
||||||
...billEnterModal.context.bill,
|
...billEnterModal.context.bill,
|
||||||
|
//Added as a part of IO-2436 for capturing parts price changes.
|
||||||
|
billlines: billEnterModal.context?.bill?.billlines?.map((line) => ({
|
||||||
|
...line,
|
||||||
|
original_actual_price: line.actual_price,
|
||||||
|
})),
|
||||||
jobid:
|
jobid:
|
||||||
(billEnterModal.context.job && billEnterModal.context.job.id) || null,
|
(billEnterModal.context.job && billEnterModal.context.job.id) || null,
|
||||||
federal_tax_rate:
|
federal_tax_rate:
|
||||||
@@ -120,6 +125,8 @@ function BillEnterModalContainer({
|
|||||||
lbr_adjustment,
|
lbr_adjustment,
|
||||||
location: lineLocation,
|
location: lineLocation,
|
||||||
part_type,
|
part_type,
|
||||||
|
create_ppc,
|
||||||
|
original_actual_price,
|
||||||
...restI
|
...restI
|
||||||
} = i;
|
} = i;
|
||||||
|
|
||||||
@@ -292,6 +299,14 @@ function BillEnterModalContainer({
|
|||||||
location: li.location || location,
|
location: li.location || location,
|
||||||
status:
|
status:
|
||||||
bodyshop.md_order_statuses.default_received || "Received*",
|
bodyshop.md_order_statuses.default_received || "Received*",
|
||||||
|
//Added parts price changes.
|
||||||
|
...(li.create_ppc &&
|
||||||
|
li.original_actual_price !== li.actual_price
|
||||||
|
? {
|
||||||
|
act_price_before_ppc: li.original_actual_price,
|
||||||
|
act_price: li.actual_price,
|
||||||
|
}
|
||||||
|
: {}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -440,6 +455,9 @@ 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}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { DeleteFilled, DollarCircleFilled } from "@ant-design/icons";
|
|||||||
import { useTreatments } from "@splitsoftware/splitio-react";
|
import { useTreatments } from "@splitsoftware/splitio-react";
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
|
Checkbox,
|
||||||
Form,
|
Form,
|
||||||
Input,
|
Input,
|
||||||
InputNumber,
|
InputNumber,
|
||||||
@@ -101,6 +102,7 @@ export function BillEnterModalLinesComponent({
|
|||||||
line_desc: opt.line_desc,
|
line_desc: opt.line_desc,
|
||||||
quantity: opt.part_qty || 1,
|
quantity: opt.part_qty || 1,
|
||||||
actual_price: opt.cost,
|
actual_price: opt.cost,
|
||||||
|
original_actual_price: opt.cost,
|
||||||
cost_center: opt.part_type
|
cost_center: opt.part_type
|
||||||
? bodyshop.pbs_serialnumber || bodyshop.cdk_dealerid
|
? bodyshop.pbs_serialnumber || bodyshop.cdk_dealerid
|
||||||
? opt.part_type !== "PAE"
|
? opt.part_type !== "PAE"
|
||||||
@@ -227,6 +229,43 @@ export function BillEnterModalLinesComponent({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
),
|
),
|
||||||
|
additional: (record, index) => (
|
||||||
|
<Form.Item
|
||||||
|
dependencies={["billlines", record.name, "actual_price"]}
|
||||||
|
noStyle
|
||||||
|
>
|
||||||
|
{() => {
|
||||||
|
const billLine = getFieldValue(["billlines", record.name]);
|
||||||
|
const jobLine = lineData.find(
|
||||||
|
(line) => line.id === billLine?.joblineid
|
||||||
|
);
|
||||||
|
|
||||||
|
if (
|
||||||
|
!billEdit &&
|
||||||
|
billLine &&
|
||||||
|
jobLine &&
|
||||||
|
billLine?.actual_price !== jobLine?.act_price
|
||||||
|
) {
|
||||||
|
return (
|
||||||
|
<Space size="small">
|
||||||
|
<Form.Item
|
||||||
|
noStyle
|
||||||
|
label={t("joblines.fields.create_ppc")}
|
||||||
|
key={`${index}ppc`}
|
||||||
|
valuePropName="checked"
|
||||||
|
name={[record.name, "create_ppc"]}
|
||||||
|
>
|
||||||
|
<Checkbox />
|
||||||
|
</Form.Item>
|
||||||
|
{t("joblines.fields.create_ppc")}
|
||||||
|
</Space>
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
</Form.Item>
|
||||||
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("billlines.fields.actual_cost"),
|
title: t("billlines.fields.actual_cost"),
|
||||||
@@ -368,7 +407,7 @@ export function BillEnterModalLinesComponent({
|
|||||||
},
|
},
|
||||||
formInput: (record, index) => <Switch disabled={disabled} />,
|
formInput: (record, index) => <Switch disabled={disabled} />,
|
||||||
additional: (record, index) => (
|
additional: (record, index) => (
|
||||||
<Form.Item shouldUpdate style={{ display: "inline-block" }}>
|
<Form.Item shouldUpdate noStyle style={{ display: "inline-block" }}>
|
||||||
{() => {
|
{() => {
|
||||||
const price = getFieldValue([
|
const price = getFieldValue([
|
||||||
"billlines",
|
"billlines",
|
||||||
@@ -673,7 +712,7 @@ const EditableCell = ({
|
|||||||
if (additional)
|
if (additional)
|
||||||
return (
|
return (
|
||||||
<td {...restProps}>
|
<td {...restProps}>
|
||||||
<Space size="small">
|
<div size="small">
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name={dataIndex}
|
name={dataIndex}
|
||||||
labelCol={{ span: 0 }}
|
labelCol={{ span: 0 }}
|
||||||
@@ -682,7 +721,7 @@ const EditableCell = ({
|
|||||||
{(formInput && formInput(record, record.name)) || children}
|
{(formInput && formInput(record, record.name)) || children}
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
{additional && additional(record, record.name)}
|
{additional && additional(record, record.name)}
|
||||||
</Space>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
);
|
);
|
||||||
if (wrapper)
|
if (wrapper)
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ export function ChatPopupComponent({
|
|||||||
onClick={() => toggleChatVisible()}
|
onClick={() => toggleChatVisible()}
|
||||||
style={{ cursor: "pointer" }}
|
style={{ cursor: "pointer" }}
|
||||||
>
|
>
|
||||||
<MessageOutlined />
|
<MessageOutlined className="chat-popup-info-icon" />
|
||||||
<strong>{t("messaging.labels.messaging")}</strong>
|
<strong>{t("messaging.labels.messaging")}</strong>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -13,6 +13,9 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.chat-popup-info-icon {
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
@media only screen and (min-width: 992px) {
|
@media only screen and (min-width: 992px) {
|
||||||
.chat-popup {
|
.chat-popup {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { alphaSort } from "../../utils/sorters";
|
import { alphaSort } from "../../utils/sorters";
|
||||||
import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component";
|
import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component";
|
||||||
import OwnerNameDisplay from "../owner-name-display/owner-name-display.component";
|
import OwnerNameDisplay from "../owner-name-display/owner-name-display.component";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
|
|
||||||
export default function ContractsJobsComponent({
|
export default function ContractsJobsComponent({
|
||||||
loading,
|
loading,
|
||||||
@@ -175,7 +176,7 @@ export default function ContractsJobsComponent({
|
|||||||
loading={loading}
|
loading={loading}
|
||||||
pagination={{
|
pagination={{
|
||||||
position: "top",
|
position: "top",
|
||||||
defaultPageSize: 10,
|
defaultPageSize: pageLimit,
|
||||||
defaultCurrent: defaultCurrent,
|
defaultCurrent: defaultCurrent,
|
||||||
}}
|
}}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import moment from "moment";
|
|||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -209,7 +210,7 @@ export function ContractsList({
|
|||||||
}}
|
}}
|
||||||
pagination={{
|
pagination={{
|
||||||
position: "top",
|
position: "top",
|
||||||
pageSize: 25,
|
pageSize: pageLimit,
|
||||||
current: parseInt(page || 1),
|
current: parseInt(page || 1),
|
||||||
total: total,
|
total: total,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { Link, useHistory, useLocation } from "react-router-dom";
|
import { Link, useHistory, useLocation } from "react-router-dom";
|
||||||
import { DateFormatter } from "../../utils/DateFormatter";
|
import { DateFormatter } from "../../utils/DateFormatter";
|
||||||
import { alphaSort } from "../../utils/sorters";
|
import { alphaSort } from "../../utils/sorters";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
|
|
||||||
export default function CourtesyCarContractListComponent({
|
export default function CourtesyCarContractListComponent({
|
||||||
contracts,
|
contracts,
|
||||||
@@ -89,7 +90,7 @@ export default function CourtesyCarContractListComponent({
|
|||||||
scroll={{ x: true }}
|
scroll={{ x: true }}
|
||||||
pagination={{
|
pagination={{
|
||||||
position: "top",
|
position: "top",
|
||||||
pageSize: 25,
|
pageSize: pageLimit,
|
||||||
current: parseInt(page || 1),
|
current: parseInt(page || 1),
|
||||||
total: totalContracts,
|
total: totalContracts,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export default function CourtesyCarCreateFormComponent({ form, saveLoading }) {
|
|||||||
|
|
||||||
{/* <FormFieldsChanged form={form} /> */}
|
{/* <FormFieldsChanged form={form} /> */}
|
||||||
<LayoutFormRow header={t("courtesycars.labels.vehicle")}>
|
<LayoutFormRow header={t("courtesycars.labels.vehicle")}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("courtesycars.fields.year")}
|
label={t("courtesycars.fields.year")}
|
||||||
name="year"
|
name="year"
|
||||||
rules={[
|
rules={[
|
||||||
@@ -118,7 +118,7 @@ export default function CourtesyCarCreateFormComponent({ form, saveLoading }) {
|
|||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<InputNumber precision={0} />
|
<InputNumber min={0} precision={0} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("courtesycars.fields.fleetnumber")}
|
label={t("courtesycars.fields.fleetnumber")}
|
||||||
@@ -213,12 +213,37 @@ export default function CourtesyCarCreateFormComponent({ form, saveLoading }) {
|
|||||||
>
|
>
|
||||||
<CourtesyCarStatus />
|
<CourtesyCarStatus />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<div>
|
||||||
label={t("courtesycars.fields.nextservicekm")}
|
<Form.Item
|
||||||
name="nextservicekm"
|
label={t("courtesycars.fields.nextservicekm")}
|
||||||
>
|
name="nextservicekm"
|
||||||
<InputNumber />
|
>
|
||||||
</Form.Item>
|
<InputNumber min={0} precision={0} />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
shouldUpdate={(p, c) =>
|
||||||
|
p.mileage !== c.mileage || p.nextservicekm !== c.nextservicekm
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{() => {
|
||||||
|
const nextservicekm = form.getFieldValue("nextservicekm");
|
||||||
|
const mileageOver =
|
||||||
|
nextservicekm && nextservicekm <= form.getFieldValue("mileage");
|
||||||
|
if (mileageOver)
|
||||||
|
return (
|
||||||
|
<Space direction="vertical" style={{ color: "tomato" }}>
|
||||||
|
<span>
|
||||||
|
<WarningFilled style={{ marginRight: ".3rem" }} />
|
||||||
|
{t("contracts.labels.cardueforservice")}
|
||||||
|
</span>
|
||||||
|
<span>{`${nextservicekm} km`}</span>
|
||||||
|
</Space>
|
||||||
|
);
|
||||||
|
|
||||||
|
return <></>;
|
||||||
|
}}
|
||||||
|
</Form.Item>
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("courtesycars.fields.nextservicedate")}
|
label={t("courtesycars.fields.nextservicedate")}
|
||||||
@@ -227,30 +252,21 @@ export default function CourtesyCarCreateFormComponent({ form, saveLoading }) {
|
|||||||
<FormDatePicker />
|
<FormDatePicker />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
shouldUpdate={(p, c) =>
|
shouldUpdate={(p, c) => p.nextservicedate !== c.nextservicedate}
|
||||||
p.mileage !== c.mileage ||
|
|
||||||
p.nextservicedate !== c.nextservicedate ||
|
|
||||||
p.nextservicekm !== c.nextservicekm
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
{() => {
|
{() => {
|
||||||
const nextservicedate = form.getFieldValue("nextservicedate");
|
const nextservicedate = form.getFieldValue("nextservicedate");
|
||||||
const nextservicekm = form.getFieldValue("nextservicekm");
|
|
||||||
|
|
||||||
const mileageOver =
|
|
||||||
nextservicekm <= form.getFieldValue("mileage");
|
|
||||||
|
|
||||||
const dueForService =
|
const dueForService =
|
||||||
nextservicedate && moment(nextservicedate).isBefore(moment());
|
nextservicedate &&
|
||||||
|
moment(nextservicedate).endOf("day").isSameOrBefore(moment());
|
||||||
|
|
||||||
if (mileageOver || dueForService)
|
if (dueForService)
|
||||||
return (
|
return (
|
||||||
<Space direction="vertical" style={{ color: "tomato" }}>
|
<Space direction="vertical" style={{ color: "tomato" }}>
|
||||||
<span>
|
<span>
|
||||||
<WarningFilled style={{ marginRight: ".3rem" }} />
|
<WarningFilled style={{ marginRight: ".3rem" }} />
|
||||||
{t("contracts.labels.cardueforservice")}
|
{t("contracts.labels.cardueforservice")}
|
||||||
</span>
|
</span>
|
||||||
<span>{`${nextservicekm} km`}</span>
|
|
||||||
<span>
|
<span>
|
||||||
<DateFormatter>{nextservicedate}</DateFormatter>
|
<DateFormatter>{nextservicedate}</DateFormatter>
|
||||||
</span>
|
</span>
|
||||||
@@ -282,7 +298,8 @@ export default function CourtesyCarCreateFormComponent({ form, saveLoading }) {
|
|||||||
{() => {
|
{() => {
|
||||||
const expires = form.getFieldValue("registrationexpires");
|
const expires = form.getFieldValue("registrationexpires");
|
||||||
|
|
||||||
const dateover = expires && moment(expires).isBefore(moment());
|
const dateover =
|
||||||
|
expires && moment(expires).endOf("day").isBefore(moment());
|
||||||
|
|
||||||
if (dateover)
|
if (dateover)
|
||||||
return (
|
return (
|
||||||
@@ -317,7 +334,8 @@ export default function CourtesyCarCreateFormComponent({ form, saveLoading }) {
|
|||||||
{() => {
|
{() => {
|
||||||
const expires = form.getFieldValue("insuranceexpires");
|
const expires = form.getFieldValue("insuranceexpires");
|
||||||
|
|
||||||
const dateover = expires && moment(expires).isBefore(moment());
|
const dateover =
|
||||||
|
expires && moment(expires).endOf("day").isBefore(moment());
|
||||||
|
|
||||||
if (dateover)
|
if (dateover)
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { Link, useHistory, useLocation } from "react-router-dom";
|
|||||||
import { DateFormatter } from "../../utils/DateFormatter";
|
import { DateFormatter } from "../../utils/DateFormatter";
|
||||||
import { alphaSort } from "../../utils/sorters";
|
import { alphaSort } from "../../utils/sorters";
|
||||||
import OwnerNameDisplay from "../owner-name-display/owner-name-display.component";
|
import OwnerNameDisplay from "../owner-name-display/owner-name-display.component";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
|
|
||||||
export default function CsiResponseListPaginated({
|
export default function CsiResponseListPaginated({
|
||||||
refetch,
|
refetch,
|
||||||
@@ -106,7 +107,7 @@ export default function CsiResponseListPaginated({
|
|||||||
loading={loading}
|
loading={loading}
|
||||||
pagination={{
|
pagination={{
|
||||||
position: "top",
|
position: "top",
|
||||||
pageSize: 25,
|
pageSize: pageLimit,
|
||||||
current: parseInt(page || 1),
|
current: parseInt(page || 1),
|
||||||
total: total,
|
total: total,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { alphaSort } from "../../../utils/sorters";
|
|||||||
import LoadingSkeleton from "../../loading-skeleton/loading-skeleton.component";
|
import LoadingSkeleton from "../../loading-skeleton/loading-skeleton.component";
|
||||||
import Dinero from "dinero.js";
|
import Dinero from "dinero.js";
|
||||||
import DashboardRefreshRequired from "../refresh-required.component";
|
import DashboardRefreshRequired from "../refresh-required.component";
|
||||||
|
import {pageLimit} from "../../../utils/config";
|
||||||
|
|
||||||
export default function DashboardMonthlyJobCosting({ data, ...cardProps }) {
|
export default function DashboardMonthlyJobCosting({ data, ...cardProps }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -118,7 +119,7 @@ export default function DashboardMonthlyJobCosting({ data, ...cardProps }) {
|
|||||||
<div style={{ height: "100%" }}>
|
<div style={{ height: "100%" }}>
|
||||||
<Table
|
<Table
|
||||||
onChange={handleTableChange}
|
onChange={handleTableChange}
|
||||||
pagination={{ position: "top", defaultPageSize: 50 }}
|
pagination={{ position: "top", defaultPageSize: pageLimit }}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
scroll={{ x: true, y: "calc(100% - 4em)" }}
|
scroll={{ x: true, y: "calc(100% - 4em)" }}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import { Link } from "react-router-dom";
|
|||||||
import ChatOpenButton from "../../chat-open-button/chat-open-button.component";
|
import ChatOpenButton from "../../chat-open-button/chat-open-button.component";
|
||||||
import OwnerNameDisplay from "../../owner-name-display/owner-name-display.component";
|
import OwnerNameDisplay from "../../owner-name-display/owner-name-display.component";
|
||||||
import DashboardRefreshRequired from "../refresh-required.component";
|
import DashboardRefreshRequired from "../refresh-required.component";
|
||||||
|
import {pageLimit} from "../../../utils/config";
|
||||||
|
|
||||||
export default function DashboardScheduledInToday({ data, ...cardProps }) {
|
export default function DashboardScheduledInToday({ data, ...cardProps }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -195,7 +196,7 @@ export default function DashboardScheduledInToday({ data, ...cardProps }) {
|
|||||||
<div style={{ height: "100%" }}>
|
<div style={{ height: "100%" }}>
|
||||||
<Table
|
<Table
|
||||||
onChange={handleTableChange}
|
onChange={handleTableChange}
|
||||||
pagination={{ position: "top", defaultPageSize: 50 }}
|
pagination={{ position: "top", defaultPageSize: pageLimit }}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
scroll={{ x: true, y: "calc(100% - 2em)" }}
|
scroll={{ x: true, y: "calc(100% - 2em)" }}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import { Link } from "react-router-dom";
|
|||||||
import ChatOpenButton from "../../chat-open-button/chat-open-button.component";
|
import ChatOpenButton from "../../chat-open-button/chat-open-button.component";
|
||||||
import OwnerNameDisplay from "../../owner-name-display/owner-name-display.component";
|
import OwnerNameDisplay from "../../owner-name-display/owner-name-display.component";
|
||||||
import DashboardRefreshRequired from "../refresh-required.component";
|
import DashboardRefreshRequired from "../refresh-required.component";
|
||||||
|
import {pageLimit} from "../../../utils/config";
|
||||||
|
|
||||||
export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -165,7 +166,7 @@ export default function DashboardScheduledOutToday({ data, ...cardProps }) {
|
|||||||
<div style={{ height: "100%" }}>
|
<div style={{ height: "100%" }}>
|
||||||
<Table
|
<Table
|
||||||
onChange={handleTableChange}
|
onChange={handleTableChange}
|
||||||
pagination={{ position: "top", defaultPageSize: 50 }}
|
pagination={{ position: "top", defaultPageSize: pageLimit }}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
scroll={{ x: true, y: "calc(100% - 2em)" }}
|
scroll={{ x: true, y: "calc(100% - 2em)" }}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
//currentUser: selectCurrentUser
|
//currentUser: selectCurrentUser
|
||||||
@@ -117,7 +118,7 @@ export function DmsAllocationsSummaryAp({ socket, bodyshop, billids, title }) {
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Table
|
<Table
|
||||||
pagination={{ position: "top", defaultPageSize: 50 }}
|
pagination={{ position: "top", defaultPageSize: pageLimit }}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rowKey={(record) => `${record.InvoiceNumber}${record.Account}`}
|
rowKey={(record) => `${record.InvoiceNumber}${record.Account}`}
|
||||||
dataSource={allocationsSummary}
|
dataSource={allocationsSummary}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { createStructuredSelector } from "reselect";
|
|||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import Dinero from "dinero.js";
|
import Dinero from "dinero.js";
|
||||||
import { SyncOutlined } from "@ant-design/icons";
|
import { SyncOutlined } from "@ant-design/icons";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
//currentUser: selectCurrentUser
|
//currentUser: selectCurrentUser
|
||||||
@@ -94,7 +95,7 @@ export function DmsAllocationsSummary({ socket, bodyshop, jobId, title }) {
|
|||||||
<Alert type="warning" message={t("jobs.labels.dms.disablebillwip")} />
|
<Alert type="warning" message={t("jobs.labels.dms.disablebillwip")} />
|
||||||
)}
|
)}
|
||||||
<Table
|
<Table
|
||||||
pagination={{ position: "top", defaultPageSize: 50 }}
|
pagination={{ position: "top", defaultPageSize: pageLimit }}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rowKey="center"
|
rowKey="center"
|
||||||
dataSource={allocationsSummary}
|
dataSource={allocationsSummary}
|
||||||
|
|||||||
@@ -65,8 +65,17 @@ export function FormDatePicker({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_a.isValid() && onChange)
|
if (_a.isValid() && onChange) {
|
||||||
onChange(isDateOnly ? _a.format("YYYY-MM-DD") : _a);
|
if (onlyFuture) {
|
||||||
|
if (moment().subtract(1, "day").isBefore(_a)) {
|
||||||
|
onChange(isDateOnly ? _a.format("YYYY-MM-DD") : _a);
|
||||||
|
} else {
|
||||||
|
onChange(isDateOnly ? moment().format("YYYY-MM-DD") : moment());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
onChange(isDateOnly ? _a.format("YYYY-MM-DD") : _a);
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import React, { forwardRef } from "react";
|
import React, { forwardRef } from "react";
|
||||||
//import DatePicker from "react-datepicker";
|
//import DatePicker from "react-datepicker";
|
||||||
//import "react-datepicker/src/stylesheets/datepicker.scss";
|
//import "react-datepicker/src/stylesheets/datepicker.scss";
|
||||||
import FormDatePicker from "../form-date-picker/form-date-picker.component";
|
|
||||||
import { TimePicker } from "antd";
|
import { TimePicker } from "antd";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
|
import FormDatePicker from "../form-date-picker/form-date-picker.component";
|
||||||
//To be used as a form element only.
|
//To be used as a form element only.
|
||||||
|
|
||||||
const DateTimePicker = (
|
const DateTimePicker = (
|
||||||
@@ -26,20 +26,21 @@ const DateTimePicker = (
|
|||||||
value={value}
|
value={value}
|
||||||
onBlur={onBlur}
|
onBlur={onBlur}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
|
onlyFuture={onlyFuture}
|
||||||
isDateOnly={false}
|
isDateOnly={false}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<TimePicker
|
<TimePicker
|
||||||
value={value ? moment(value) : null}
|
value={value ? moment(value) : null}
|
||||||
{...(onlyFuture && {
|
{...(onlyFuture && {
|
||||||
disabledDate: (d) => moment().isAfter(d),
|
disabledDate: (d) => moment().isAfter(d),
|
||||||
})}
|
})}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
showSecond={false}
|
showSecond={false}
|
||||||
minuteStep={15}
|
minuteStep={15}
|
||||||
onBlur={onBlur}
|
onBlur={onBlur}
|
||||||
format="hh:mm a"
|
format="hh:mm a"
|
||||||
{...restProps}
|
{...restProps}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import { selectBodyshop } from "../../redux/user/user.selectors";
|
|||||||
import CurrencyFormatter from "../../utils/CurrencyFormatter";
|
import CurrencyFormatter from "../../utils/CurrencyFormatter";
|
||||||
import InventoryBillRo from "../inventory-bill-ro/inventory-bill-ro.component";
|
import InventoryBillRo from "../inventory-bill-ro/inventory-bill-ro.component";
|
||||||
import InventoryLineDelete from "../inventory-line-delete/inventory-line-delete.component";
|
import InventoryLineDelete from "../inventory-line-delete/inventory-line-delete.component";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
//currentUser: selectCurrentUser
|
//currentUser: selectCurrentUser
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -213,7 +214,7 @@ export function JobsList({
|
|||||||
loading={loading}
|
loading={loading}
|
||||||
pagination={{
|
pagination={{
|
||||||
position: "top",
|
position: "top",
|
||||||
pageSize: 25,
|
pageSize: pageLimit,
|
||||||
current: parseInt(page || 1),
|
current: parseInt(page || 1),
|
||||||
total: total,
|
total: total,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import {
|
|||||||
} from "../../redux/application/application.actions";
|
} from "../../redux/application/application.actions";
|
||||||
import AlertComponent from "../alert/alert.component";
|
import AlertComponent from "../alert/alert.component";
|
||||||
import InventoryListPaginated from "./inventory-list.component";
|
import InventoryListPaginated from "./inventory-list.component";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
//bodyshop: selectBodyshop,
|
//bodyshop: selectBodyshop,
|
||||||
@@ -32,8 +33,8 @@ export function InventoryList({ setBreadcrumbs, setSelectedHeader }) {
|
|||||||
nextFetchPolicy: "network-only",
|
nextFetchPolicy: "network-only",
|
||||||
variables: {
|
variables: {
|
||||||
search: search || "",
|
search: search || "",
|
||||||
offset: page ? (page - 1) * 25 : 0,
|
offset: page ? (page - 1) * pageLimit : 0,
|
||||||
limit: 25,
|
limit: pageLimit,
|
||||||
consumedIsNull: showall === "true" ? null : true,
|
consumedIsNull: showall === "true" ? null : true,
|
||||||
order: [
|
order: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,12 +2,16 @@ import { useMutation } from "@apollo/client";
|
|||||||
import { notification } from "antd";
|
import { notification } from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { useDispatch } from "react-redux";
|
||||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||||
import { CANCEL_APPOINTMENT_BY_ID } from "../../graphql/appointments.queries";
|
import { CANCEL_APPOINTMENT_BY_ID } from "../../graphql/appointments.queries";
|
||||||
import { UPDATE_JOB } from "../../graphql/jobs.queries";
|
import { UPDATE_JOB } from "../../graphql/jobs.queries";
|
||||||
|
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||||
|
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||||
import ScheduleEventComponent from "./schedule-event.component";
|
import ScheduleEventComponent from "./schedule-event.component";
|
||||||
|
|
||||||
export default function ScheduleEventContainer({ bodyshop, event, refetch }) {
|
export default function ScheduleEventContainer({ bodyshop, event, refetch }) {
|
||||||
|
const dispatch = useDispatch();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [cancelAppointment] = useMutation(CANCEL_APPOINTMENT_BY_ID);
|
const [cancelAppointment] = useMutation(CANCEL_APPOINTMENT_BY_ID);
|
||||||
const [updateJob] = useMutation(UPDATE_JOB);
|
const [updateJob] = useMutation(UPDATE_JOB);
|
||||||
@@ -34,16 +38,24 @@ export default function ScheduleEventContainer({ bodyshop, event, refetch }) {
|
|||||||
const jobUpdate = await updateJob({
|
const jobUpdate = await updateJob({
|
||||||
variables: {
|
variables: {
|
||||||
jobId: event.job.id,
|
jobId: event.job.id,
|
||||||
|
|
||||||
job: {
|
job: {
|
||||||
date_scheduled: null,
|
date_scheduled: null,
|
||||||
scheduled_in: null,
|
scheduled_in: null,
|
||||||
scheduled_completion: null,
|
scheduled_completion: null,
|
||||||
lost_sale_reason,
|
lost_sale_reason,
|
||||||
|
date_lost_sale: new Date(),
|
||||||
status: bodyshop.md_ro_statuses.default_imported,
|
status: bodyshop.md_ro_statuses.default_imported,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
if (!jobUpdate.errors) {
|
||||||
|
dispatch(
|
||||||
|
insertAuditTrail({
|
||||||
|
jobid: event.job.id,
|
||||||
|
operation: AuditTrailMapping.appointmentcancel(lost_sale_reason),
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
if (!!jobUpdate.errors) {
|
if (!!jobUpdate.errors) {
|
||||||
notification["error"]({
|
notification["error"]({
|
||||||
message: t("jobs.errors.updating", {
|
message: t("jobs.errors.updating", {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import React, { useState } from "react";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { alphaSort } from "../../utils/sorters";
|
import { alphaSort } from "../../utils/sorters";
|
||||||
import Dinero from "dinero.js";
|
import Dinero from "dinero.js";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
export default function JobCostingPartsTable({ data, summaryData }) {
|
export default function JobCostingPartsTable({ data, summaryData }) {
|
||||||
const [searchText, setSearchText] = useState("");
|
const [searchText, setSearchText] = useState("");
|
||||||
const [state, setState] = useState({
|
const [state, setState] = useState({
|
||||||
@@ -98,7 +99,7 @@ export default function JobCostingPartsTable({ data, summaryData }) {
|
|||||||
x: "50%", //y: "40rem"
|
x: "50%", //y: "40rem"
|
||||||
}}
|
}}
|
||||||
onChange={handleTableChange}
|
onChange={handleTableChange}
|
||||||
pagination={{ position: "top", defaultPageSize: 50 }}
|
pagination={{ position: "top", defaultPageSize: pageLimit }}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
dataSource={filteredData}
|
dataSource={filteredData}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
|||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||||
|
import { DateTimeFormat } from "./../../utils/DateFormatter";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
//currentUser: selectCurrentUser
|
//currentUser: selectCurrentUser
|
||||||
@@ -53,7 +54,7 @@ export function JobsAdminDatesChange({ insertAuditTrail, job }) {
|
|||||||
operation: AuditTrailMapping.admin_jobfieldchange(
|
operation: AuditTrailMapping.admin_jobfieldchange(
|
||||||
key,
|
key,
|
||||||
changedAuditFields[key] instanceof moment
|
changedAuditFields[key] instanceof moment
|
||||||
? moment(changedAuditFields[key]).format("MM/DD/YYYY hh:mm a")
|
? DateTimeFormat(changedAuditFields[key])
|
||||||
: changedAuditFields[key]
|
: changedAuditFields[key]
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
@@ -179,6 +180,12 @@ export function JobsAdminDatesChange({ insertAuditTrail, job }) {
|
|||||||
<Form.Item label={t("jobs.fields.date_void")} name="date_void">
|
<Form.Item label={t("jobs.fields.date_void")} name="date_void">
|
||||||
<DateTimePicker />
|
<DateTimePicker />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("jobs.fields.date_lost_sale")}
|
||||||
|
name="date_lost_sale"
|
||||||
|
>
|
||||||
|
<DateTimePicker />
|
||||||
|
</Form.Item>
|
||||||
</LayoutFormRow>
|
</LayoutFormRow>
|
||||||
</Form>
|
</Form>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { GET_ALL_JOBLINES_BY_PK } from "../../graphql/jobs-lines.queries";
|
|
||||||
import { gql } from "@apollo/client";
|
import { gql } from "@apollo/client";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import { GET_ALL_JOBLINES_BY_PK } from "../../graphql/jobs-lines.queries";
|
||||||
|
|
||||||
export const GetSupplementDelta = async (client, jobId, newLines) => {
|
export const GetSupplementDelta = async (client, jobId, newLines) => {
|
||||||
const {
|
const {
|
||||||
@@ -50,6 +50,7 @@ export const GetSupplementDelta = async (client, jobId, newLines) => {
|
|||||||
.reduce((acc, value, idx) => {
|
.reduce((acc, value, idx) => {
|
||||||
return acc + generateRemoveQuery(value, idx);
|
return acc + generateRemoveQuery(value, idx);
|
||||||
}, "");
|
}, "");
|
||||||
|
//console.log(insertQueries, updateQueries, removeQueries);
|
||||||
|
|
||||||
if ((insertQueries + updateQueries + removeQueries).trim() === "") {
|
if ((insertQueries + updateQueries + removeQueries).trim() === "") {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ const headerFields = [
|
|||||||
"ins_ct_ph",
|
"ins_ct_ph",
|
||||||
"ins_ct_phx",
|
"ins_ct_phx",
|
||||||
"loss_cat",
|
"loss_cat",
|
||||||
//ad2
|
//AD2
|
||||||
"clmt_ln",
|
"clmt_ln",
|
||||||
"clmt_fn",
|
"clmt_fn",
|
||||||
"clmt_title",
|
"clmt_title",
|
||||||
@@ -219,7 +219,16 @@ const headerFields = [
|
|||||||
"loc_title",
|
"loc_title",
|
||||||
"loc_ph",
|
"loc_ph",
|
||||||
"loc_phx",
|
"loc_phx",
|
||||||
"loc_ea"
|
"loc_ea",
|
||||||
|
//VEH
|
||||||
|
"plate_no",
|
||||||
|
"plate_st",
|
||||||
|
"v_vin",
|
||||||
|
"v_model_yr",
|
||||||
|
"v_make_desc",
|
||||||
|
"v_model_desc",
|
||||||
|
"v_options",
|
||||||
|
"v_color",
|
||||||
];
|
];
|
||||||
|
|
||||||
export default headerFields;
|
export default headerFields;
|
||||||
|
|||||||
@@ -72,6 +72,8 @@ export function JobsAvailableContainer({
|
|||||||
|
|
||||||
const [selectedJob, setSelectedJob] = useState(null);
|
const [selectedJob, setSelectedJob] = useState(null);
|
||||||
const [selectedOwner, setSelectedOwner] = useState(null);
|
const [selectedOwner, setSelectedOwner] = useState(null);
|
||||||
|
const [partsQueueToggle, setPartsQueueToggle] = useState(bodyshop.md_functionality_toggles.parts_queue_toggle);
|
||||||
|
|
||||||
const [insertLoading, setInsertLoading] = useState(false);
|
const [insertLoading, setInsertLoading] = useState(false);
|
||||||
|
|
||||||
const [insertNote] = useMutation(INSERT_NEW_NOTE);
|
const [insertNote] = useMutation(INSERT_NEW_NOTE);
|
||||||
@@ -93,6 +95,7 @@ export function JobsAvailableContainer({
|
|||||||
logImEXEvent("job_import_new");
|
logImEXEvent("job_import_new");
|
||||||
|
|
||||||
setOwnerModalVisible(false);
|
setOwnerModalVisible(false);
|
||||||
|
|
||||||
setInsertLoading(true);
|
setInsertLoading(true);
|
||||||
const estData = replaceEmpty(
|
const estData = replaceEmpty(
|
||||||
lazyData?.available_jobs_by_pk || estDataRaw.data.available_jobs_by_pk
|
lazyData?.available_jobs_by_pk || estDataRaw.data.available_jobs_by_pk
|
||||||
@@ -124,7 +127,7 @@ export function JobsAvailableContainer({
|
|||||||
|
|
||||||
let existingVehicles;
|
let existingVehicles;
|
||||||
if (estData.est_data.v_vin) {
|
if (estData.est_data.v_vin) {
|
||||||
//There's vehicle data, need to double check the VIN.
|
//There's vehicle data, need to double-check the VIN.
|
||||||
existingVehicles = await client.query({
|
existingVehicles = await client.query({
|
||||||
query: SEARCH_VEHICLE_BY_VIN,
|
query: SEARCH_VEHICLE_BY_VIN,
|
||||||
variables: {
|
variables: {
|
||||||
@@ -147,7 +150,7 @@ export function JobsAvailableContainer({
|
|||||||
text: t("jobs.labels.importnote"),
|
text: t("jobs.labels.importnote"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
queued_for_parts: true,
|
queued_for_parts: partsQueueToggle,
|
||||||
...(existingVehicles && existingVehicles.data.vehicles.length > 0
|
...(existingVehicles && existingVehicles.data.vehicles.length > 0
|
||||||
? { vehicleid: existingVehicles.data.vehicles[0].id, vehicle: null }
|
? { vehicleid: existingVehicles.data.vehicles[0].id, vehicle: null }
|
||||||
: {}),
|
: {}),
|
||||||
@@ -197,6 +200,8 @@ export function JobsAvailableContainer({
|
|||||||
refetch();
|
refetch();
|
||||||
setInsertLoading(false);
|
setInsertLoading(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
setPartsQueueToggle(bodyshop.md_functionality_toggles.parts_queue_toggle);
|
||||||
} catch (r) {
|
} catch (r) {
|
||||||
//error while inserting
|
//error while inserting
|
||||||
notification["error"]({
|
notification["error"]({
|
||||||
@@ -204,10 +209,12 @@ export function JobsAvailableContainer({
|
|||||||
});
|
});
|
||||||
refetch();
|
refetch();
|
||||||
setInsertLoading(false);
|
setInsertLoading(false);
|
||||||
|
setPartsQueueToggle(bodyshop.md_functionality_toggles.parts_queue_toggle);
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//Suplement scenario
|
//Supplement scenario
|
||||||
const onJobFindModalOk = async () => {
|
const onJobFindModalOk = async () => {
|
||||||
logImEXEvent("job_import_supplement");
|
logImEXEvent("job_import_supplement");
|
||||||
|
|
||||||
@@ -260,11 +267,14 @@ export function JobsAvailableContainer({
|
|||||||
// "0.00"
|
// "0.00"
|
||||||
// ),
|
// ),
|
||||||
// job_totals: newTotals,
|
// job_totals: newTotals,
|
||||||
// queued_for_parts: true,
|
queued_for_parts: partsQueueToggle,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
if (CriticalPartsScanning.treatment === "on") {
|
|
||||||
|
setPartsQueueToggle(bodyshop.md_functionality_toggles.parts_queue_toggle);
|
||||||
|
|
||||||
|
if (CriticalPartsScanning.treatment === "on") {
|
||||||
CriticalPartsScan(updateResult.data.update_jobs.returning[0].id);
|
CriticalPartsScan(updateResult.data.update_jobs.returning[0].id);
|
||||||
}
|
}
|
||||||
if (updateResult.errors) {
|
if (updateResult.errors) {
|
||||||
@@ -339,12 +349,14 @@ export function JobsAvailableContainer({
|
|||||||
const onOwnerModalCancel = () => {
|
const onOwnerModalCancel = () => {
|
||||||
setOwnerModalVisible(false);
|
setOwnerModalVisible(false);
|
||||||
setSelectedOwner(null);
|
setSelectedOwner(null);
|
||||||
|
setPartsQueueToggle(bodyshop.md_functionality_toggles.parts_queue_toggle);
|
||||||
};
|
};
|
||||||
|
|
||||||
const onJobModalCancel = () => {
|
const onJobModalCancel = () => {
|
||||||
setJobModalVisible(false);
|
setJobModalVisible(false);
|
||||||
modalSearchState[1]("");
|
modalSearchState[1]("");
|
||||||
setSelectedJob(null);
|
setSelectedJob(null);
|
||||||
|
setPartsQueueToggle(bodyshop.md_functionality_toggles.parts_queue_toggle);
|
||||||
};
|
};
|
||||||
|
|
||||||
const addJobAsNew = (record) => {
|
const addJobAsNew = (record) => {
|
||||||
@@ -365,6 +377,8 @@ export function JobsAvailableContainer({
|
|||||||
}, [addJobAsSupp, availableJobId, clm_no]);
|
}, [addJobAsSupp, availableJobId, clm_no]);
|
||||||
|
|
||||||
if (error) return <AlertComponent type="error" message={error.message} />;
|
if (error) return <AlertComponent type="error" message={error.message} />;
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<LoadingSpinner
|
<LoadingSpinner
|
||||||
loading={insertLoading}
|
loading={insertLoading}
|
||||||
@@ -374,11 +388,14 @@ export function JobsAvailableContainer({
|
|||||||
loading={estDataRaw.loading}
|
loading={estDataRaw.loading}
|
||||||
error={estDataRaw.error}
|
error={estDataRaw.error}
|
||||||
owner={owner}
|
owner={owner}
|
||||||
|
partsQueueToggle={partsQueueToggle}
|
||||||
|
setPartsQueueToggle={setPartsQueueToggle}
|
||||||
selectedOwner={selectedOwner}
|
selectedOwner={selectedOwner}
|
||||||
setSelectedOwner={setSelectedOwner}
|
setSelectedOwner={setSelectedOwner}
|
||||||
visible={ownerModalVisible}
|
visible={ownerModalVisible}
|
||||||
onOk={onOwnerFindModalOk}
|
onOk={onOwnerFindModalOk}
|
||||||
onCancel={onOwnerModalCancel}
|
onCancel={onOwnerModalCancel}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
<JobsFindModalContainer
|
<JobsFindModalContainer
|
||||||
loading={estDataRaw.loading}
|
loading={estDataRaw.loading}
|
||||||
@@ -390,6 +407,8 @@ export function JobsAvailableContainer({
|
|||||||
onOk={onJobFindModalOk}
|
onOk={onJobFindModalOk}
|
||||||
onCancel={onJobModalCancel}
|
onCancel={onJobModalCancel}
|
||||||
modalSearchState={modalSearchState}
|
modalSearchState={modalSearchState}
|
||||||
|
partsQueueToggle={partsQueueToggle}
|
||||||
|
setPartsQueueToggle={setPartsQueueToggle}
|
||||||
/>
|
/>
|
||||||
{currentUser.email.includes("@rome.") ||
|
{currentUser.email.includes("@rome.") ||
|
||||||
currentUser.email.includes("@imex.") ? (
|
currentUser.email.includes("@imex.") ? (
|
||||||
|
|||||||
@@ -145,6 +145,13 @@ export function JobsDetailDatesComponent({ jobRO, job, bodyshop }) {
|
|||||||
<Form.Item label={t("jobs.fields.date_void")} name="date_void">
|
<Form.Item label={t("jobs.fields.date_void")} name="date_void">
|
||||||
<DateTimePicker disabled={true || jobRO} />
|
<DateTimePicker disabled={true || jobRO} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
|
<Form.Item
|
||||||
|
label={t("jobs.fields.date_lost_sale")}
|
||||||
|
name="date_lost_sale"
|
||||||
|
>
|
||||||
|
<DateTimePicker disabled={true || jobRO} />
|
||||||
|
</Form.Item>
|
||||||
</FormRow>
|
</FormRow>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -18,12 +18,14 @@ import { createStructuredSelector } from "reselect";
|
|||||||
import { logImEXEvent } from "../../firebase/firebase.utils";
|
import { logImEXEvent } from "../../firebase/firebase.utils";
|
||||||
import { CANCEL_APPOINTMENTS_BY_JOB_ID } from "../../graphql/appointments.queries";
|
import { CANCEL_APPOINTMENTS_BY_JOB_ID } from "../../graphql/appointments.queries";
|
||||||
import { DELETE_JOB, UPDATE_JOB, VOID_JOB } from "../../graphql/jobs.queries";
|
import { DELETE_JOB, UPDATE_JOB, VOID_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 { setModalContext } from "../../redux/modals/modals.actions";
|
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||||
import {
|
import {
|
||||||
selectBodyshop,
|
selectBodyshop,
|
||||||
selectCurrentUser,
|
selectCurrentUser,
|
||||||
} from "../../redux/user/user.selectors";
|
} from "../../redux/user/user.selectors";
|
||||||
|
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||||
import RbacWrapper from "../rbac-wrapper/rbac-wrapper.component";
|
import RbacWrapper from "../rbac-wrapper/rbac-wrapper.component";
|
||||||
import JobsDetailHeaderActionsAddevent from "./jobs-detail-header-actions.addevent";
|
import JobsDetailHeaderActionsAddevent from "./jobs-detail-header-actions.addevent";
|
||||||
import AddToProduction from "./jobs-detail-header-actions.addtoproduction.util";
|
import AddToProduction from "./jobs-detail-header-actions.addtoproduction.util";
|
||||||
@@ -52,6 +54,8 @@ const mapDispatchToProps = (dispatch) => ({
|
|||||||
dispatch(setModalContext({ context: context, modal: "timeTicketTask" })),
|
dispatch(setModalContext({ context: context, modal: "timeTicketTask" })),
|
||||||
setCardPaymentContext: (context) =>
|
setCardPaymentContext: (context) =>
|
||||||
dispatch(setModalContext({ context: context, modal: "cardPayment" })),
|
dispatch(setModalContext({ context: context, modal: "cardPayment" })),
|
||||||
|
insertAuditTrail: ({ jobid, operation }) =>
|
||||||
|
dispatch(insertAuditTrail({ jobid, operation })),
|
||||||
});
|
});
|
||||||
|
|
||||||
export function JobsDetailHeaderActions({
|
export function JobsDetailHeaderActions({
|
||||||
@@ -67,6 +71,7 @@ export function JobsDetailHeaderActions({
|
|||||||
setTimeTicketContext,
|
setTimeTicketContext,
|
||||||
setTimeTicketTaskContext,
|
setTimeTicketTaskContext,
|
||||||
setCardPaymentContext,
|
setCardPaymentContext,
|
||||||
|
insertAuditTrail,
|
||||||
}) {
|
}) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const client = useApolloClient();
|
const client = useApolloClient();
|
||||||
@@ -161,6 +166,7 @@ export function JobsDetailHeaderActions({
|
|||||||
scheduled_in: null,
|
scheduled_in: null,
|
||||||
scheduled_completion: null,
|
scheduled_completion: null,
|
||||||
lost_sale_reason,
|
lost_sale_reason,
|
||||||
|
date_lost_sale: new Date(),
|
||||||
status: bodyshop.md_ro_statuses.default_imported,
|
status: bodyshop.md_ro_statuses.default_imported,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -169,6 +175,11 @@ export function JobsDetailHeaderActions({
|
|||||||
notification["success"]({
|
notification["success"]({
|
||||||
message: t("appointments.successes.canceled"),
|
message: t("appointments.successes.canceled"),
|
||||||
});
|
});
|
||||||
|
insertAuditTrail({
|
||||||
|
jobid: job.id,
|
||||||
|
operation:
|
||||||
|
AuditTrailMapping.appointmentcancel(lost_sale_reason),
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ export default function JobsFindModalComponent({
|
|||||||
importOptionsState,
|
importOptionsState,
|
||||||
modalSearchState,
|
modalSearchState,
|
||||||
jobsListRefetch,
|
jobsListRefetch,
|
||||||
|
partsQueueToggle,
|
||||||
|
setPartsQueueToggle,
|
||||||
}) {
|
}) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [modalSearch, setModalSearch] = modalSearchState;
|
const [modalSearch, setModalSearch] = modalSearchState;
|
||||||
@@ -199,6 +201,12 @@ export default function JobsFindModalComponent({
|
|||||||
>
|
>
|
||||||
{t("jobs.labels.override_header")}
|
{t("jobs.labels.override_header")}
|
||||||
</Checkbox>
|
</Checkbox>
|
||||||
|
<Checkbox
|
||||||
|
checked={partsQueueToggle}
|
||||||
|
onChange={(e) => setPartsQueueToggle(e.target.checked)}
|
||||||
|
>
|
||||||
|
{t("bodyshop.fields.md_functionality_toggles.parts_queue_toggle")}
|
||||||
|
</Checkbox>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ export default connect(
|
|||||||
setSelectedJob,
|
setSelectedJob,
|
||||||
importOptionsState,
|
importOptionsState,
|
||||||
modalSearchState,
|
modalSearchState,
|
||||||
|
partsQueueToggle,
|
||||||
|
setPartsQueueToggle,
|
||||||
...modalProps
|
...modalProps
|
||||||
}) {
|
}) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -91,6 +93,8 @@ export default connect(
|
|||||||
jobsListRefetch={jobsList.refetch}
|
jobsListRefetch={jobsList.refetch}
|
||||||
jobsList={jobsData}
|
jobsList={jobsData}
|
||||||
modalSearchState={modalSearchState}
|
modalSearchState={modalSearchState}
|
||||||
|
partsQueueToggle={partsQueueToggle}
|
||||||
|
setPartsQueueToggle={setPartsQueueToggle}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import { selectBodyshop } from "../../redux/user/user.selectors";
|
|||||||
import CurrencyFormatter from "../../utils/CurrencyFormatter";
|
import CurrencyFormatter from "../../utils/CurrencyFormatter";
|
||||||
import StartChatButton from "../chat-open-button/chat-open-button.component";
|
import StartChatButton from "../chat-open-button/chat-open-button.component";
|
||||||
import OwnerNameDisplay from "../owner-name-display/owner-name-display.component";
|
import OwnerNameDisplay from "../owner-name-display/owner-name-display.component";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
//currentUser: selectCurrentUser
|
//currentUser: selectCurrentUser
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -33,17 +34,14 @@ export function JobsList({ bodyshop, refetch, loading, jobs, total }) {
|
|||||||
title: t("jobs.fields.ro_number"),
|
title: t("jobs.fields.ro_number"),
|
||||||
dataIndex: "ro_number",
|
dataIndex: "ro_number",
|
||||||
key: "ro_number",
|
key: "ro_number",
|
||||||
|
|
||||||
sorter: true, //(a, b) => alphaSort(a.ro_number, b.ro_number),
|
sorter: true, //(a, b) => alphaSort(a.ro_number, b.ro_number),
|
||||||
sortOrder: sortcolumn === "ro_number" && sortorder,
|
sortOrder: sortcolumn === "ro_number" && sortorder,
|
||||||
|
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<Link to={"/manage/jobs/" + record.id}>
|
<Link to={"/manage/jobs/" + record.id}>
|
||||||
{record.ro_number || t("general.labels.na")}
|
{record.ro_number || t("general.labels.na")}
|
||||||
</Link>
|
</Link>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: t("jobs.fields.owner"),
|
title: t("jobs.fields.owner"),
|
||||||
dataIndex: "ownr_ln",
|
dataIndex: "ownr_ln",
|
||||||
@@ -125,7 +123,6 @@ export function JobsList({ bodyshop, refetch, loading, jobs, total }) {
|
|||||||
title: t("vehicles.fields.plate_no"),
|
title: t("vehicles.fields.plate_no"),
|
||||||
dataIndex: "plate_no",
|
dataIndex: "plate_no",
|
||||||
key: "plate_no",
|
key: "plate_no",
|
||||||
|
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
sorter: true, //(a, b) => alphaSort(a.plate_no, b.plate_no),
|
sorter: true, //(a, b) => alphaSort(a.plate_no, b.plate_no),
|
||||||
sortOrder: sortcolumn === "plate_no" && sortorder,
|
sortOrder: sortcolumn === "plate_no" && sortorder,
|
||||||
@@ -137,7 +134,6 @@ export function JobsList({ bodyshop, refetch, loading, jobs, total }) {
|
|||||||
title: t("jobs.fields.clm_no"),
|
title: t("jobs.fields.clm_no"),
|
||||||
dataIndex: "clm_no",
|
dataIndex: "clm_no",
|
||||||
key: "clm_no",
|
key: "clm_no",
|
||||||
|
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
sorter: true, //(a, b) => alphaSort(a.clm_no, b.clm_no),
|
sorter: true, //(a, b) => alphaSort(a.clm_no, b.clm_no),
|
||||||
sortOrder: sortcolumn === "clm_no" && sortorder,
|
sortOrder: sortcolumn === "clm_no" && sortorder,
|
||||||
@@ -259,11 +255,11 @@ export function JobsList({ bodyshop, refetch, loading, jobs, total }) {
|
|||||||
pagination={
|
pagination={
|
||||||
search?.search
|
search?.search
|
||||||
? {
|
? {
|
||||||
pageSize: 25,
|
pageSize: pageLimit,
|
||||||
showSizeChanger: false,
|
showSizeChanger: false,
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
pageSize: 25,
|
pageSize: pageLimit,
|
||||||
current: parseInt(page || 1),
|
current: parseInt(page || 1),
|
||||||
total: total,
|
total: total,
|
||||||
showSizeChanger: false,
|
showSizeChanger: false,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import {
|
import {
|
||||||
SyncOutlined,
|
SyncOutlined,
|
||||||
ExclamationCircleFilled,
|
ExclamationCircleFilled,
|
||||||
PauseCircleOutlined,
|
PauseCircleOutlined,
|
||||||
BranchesOutlined,
|
BranchesOutlined,
|
||||||
} from "@ant-design/icons";
|
} from "@ant-design/icons";
|
||||||
import { useQuery } from "@apollo/client";
|
import { useQuery } from "@apollo/client";
|
||||||
import { Button, Card, Grid, Input, Space, Table, Tooltip } from "antd";
|
import { Button, Card, Grid, Input, Space, Table, Tooltip } from "antd";
|
||||||
@@ -22,374 +22,374 @@ import ChatOpenButton from "../chat-open-button/chat-open-button.component";
|
|||||||
import OwnerNameDisplay from "../owner-name-display/owner-name-display.component";
|
import OwnerNameDisplay from "../owner-name-display/owner-name-display.component";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
});
|
});
|
||||||
|
|
||||||
export function JobsList({ bodyshop }) {
|
export function JobsList({ bodyshop }) {
|
||||||
const searchParams = queryString.parse(useLocation().search);
|
const searchParams = queryString.parse(useLocation().search);
|
||||||
const { selected } = searchParams;
|
const { selected } = searchParams;
|
||||||
const selectedBreakpoint = Object.entries(Grid.useBreakpoint())
|
const selectedBreakpoint = Object.entries(Grid.useBreakpoint())
|
||||||
.filter((screen) => !!screen[1])
|
.filter((screen) => !!screen[1])
|
||||||
.slice(-1)[0];
|
.slice(-1)[0];
|
||||||
const { loading, error, data, refetch } = useQuery(QUERY_ALL_ACTIVE_JOBS, {
|
const { loading, error, data, refetch } = useQuery(QUERY_ALL_ACTIVE_JOBS, {
|
||||||
variables: {
|
variables: {
|
||||||
statuses: bodyshop.md_ro_statuses.active_statuses || ["Open", "Open*"],
|
statuses: bodyshop.md_ro_statuses.active_statuses || ["Open", "Open*"],
|
||||||
},
|
},
|
||||||
fetchPolicy: "network-only",
|
fetchPolicy: "network-only",
|
||||||
nextFetchPolicy: "network-only",
|
nextFetchPolicy: "network-only",
|
||||||
});
|
});
|
||||||
|
|
||||||
const [state, setState] = useState({
|
const [state, setState] = useState({
|
||||||
sortedInfo: {},
|
sortedInfo: {},
|
||||||
filteredInfo: { text: "" },
|
filteredInfo: { text: "" },
|
||||||
});
|
});
|
||||||
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
const [searchText, setSearchText] = useState("");
|
const [searchText, setSearchText] = useState("");
|
||||||
|
|
||||||
if (error) return <AlertComponent message={error.message} type="error" />;
|
if (error) return <AlertComponent message={error.message} type="error" />;
|
||||||
|
|
||||||
const jobs = data
|
const jobs = data
|
||||||
? searchText === ""
|
? searchText === ""
|
||||||
? data.jobs
|
? data.jobs
|
||||||
: data.jobs.filter(
|
: data.jobs.filter(
|
||||||
(j) =>
|
(j) =>
|
||||||
(j.ro_number || "")
|
(j.ro_number || "")
|
||||||
.toString()
|
.toString()
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.includes(searchText.toLowerCase()) ||
|
.includes(searchText.toLowerCase()) ||
|
||||||
(j.ownr_co_nm || "")
|
(j.ownr_co_nm || "")
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.includes(searchText.toLowerCase()) ||
|
.includes(searchText.toLowerCase()) ||
|
||||||
(j.comments || "")
|
(j.comments || "")
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.includes(searchText.toLowerCase()) ||
|
.includes(searchText.toLowerCase()) ||
|
||||||
(j.ownr_fn || "")
|
(j.ownr_fn || "")
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.includes(searchText.toLowerCase()) ||
|
.includes(searchText.toLowerCase()) ||
|
||||||
(j.ownr_ln || "")
|
(j.ownr_ln || "")
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.includes(searchText.toLowerCase()) ||
|
.includes(searchText.toLowerCase()) ||
|
||||||
(j.clm_no || "").toLowerCase().includes(searchText.toLowerCase()) ||
|
(j.clm_no || "").toLowerCase().includes(searchText.toLowerCase()) ||
|
||||||
(j.plate_no || "")
|
(j.plate_no || "")
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.includes(searchText.toLowerCase()) ||
|
.includes(searchText.toLowerCase()) ||
|
||||||
(j.v_model_desc || "")
|
(j.v_model_desc || "")
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.includes(searchText.toLowerCase()) ||
|
.includes(searchText.toLowerCase()) ||
|
||||||
(j.est_ct_fn || "")
|
(j.est_ct_fn || "")
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.includes(searchText.toLowerCase()) ||
|
.includes(searchText.toLowerCase()) ||
|
||||||
(j.est_ct_ln || "")
|
(j.est_ct_ln || "")
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.includes(searchText.toLowerCase()) ||
|
.includes(searchText.toLowerCase()) ||
|
||||||
(j.v_make_desc || "")
|
(j.v_make_desc || "")
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.includes(searchText.toLowerCase())
|
.includes(searchText.toLowerCase())
|
||||||
)
|
)
|
||||||
: [];
|
: [];
|
||||||
|
|
||||||
const handleTableChange = (pagination, filters, sorter) => {
|
const handleTableChange = (pagination, filters, sorter) => {
|
||||||
setState({ ...state, filteredInfo: filters, sortedInfo: sorter });
|
setState({ ...state, filteredInfo: filters, sortedInfo: sorter });
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleOnRowClick = (record) => {
|
const handleOnRowClick = (record) => {
|
||||||
if (record) {
|
if (record) {
|
||||||
if (record.id) {
|
if (record.id) {
|
||||||
history.push({
|
history.push({
|
||||||
search: queryString.stringify({
|
search: queryString.stringify({
|
||||||
...searchParams,
|
...searchParams,
|
||||||
selected: record.id,
|
selected: record.id,
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: t("jobs.fields.ro_number"),
|
title: t("jobs.fields.ro_number"),
|
||||||
dataIndex: "ro_number",
|
dataIndex: "ro_number",
|
||||||
key: "ro_number",
|
key: "ro_number",
|
||||||
sorter: (a, b) =>
|
sorter: (a, b) =>
|
||||||
parseInt((a.ro_number || "0").replace(/\D/g, "")) -
|
parseInt((a.ro_number || "0").replace(/\D/g, "")) -
|
||||||
parseInt((b.ro_number || "0").replace(/\D/g, "")),
|
parseInt((b.ro_number || "0").replace(/\D/g, "")),
|
||||||
sortOrder:
|
sortOrder:
|
||||||
state.sortedInfo.columnKey === "ro_number" && state.sortedInfo.order,
|
state.sortedInfo.columnKey === "ro_number" && state.sortedInfo.order,
|
||||||
|
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<Link
|
<Link
|
||||||
to={"/manage/jobs/" + record.id}
|
to={"/manage/jobs/" + record.id}
|
||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
>
|
>
|
||||||
<Space>
|
<Space>
|
||||||
{record.ro_number || t("general.labels.na")}
|
{record.ro_number || t("general.labels.na")}
|
||||||
{record.production_vars && record.production_vars.alert ? (
|
{record.production_vars && record.production_vars.alert ? (
|
||||||
<ExclamationCircleFilled className="production-alert" />
|
<ExclamationCircleFilled className="production-alert" />
|
||||||
) : null}
|
) : null}
|
||||||
{record.suspended && (
|
{record.suspended && (
|
||||||
<PauseCircleOutlined style={{ color: "orangered" }} />
|
<PauseCircleOutlined style={{ color: "orangered" }} />
|
||||||
)}
|
)}
|
||||||
{record.iouparent && (
|
{record.iouparent && (
|
||||||
<Tooltip title={t("jobs.labels.iou")}>
|
<Tooltip title={t("jobs.labels.iou")}>
|
||||||
<BranchesOutlined style={{ color: "orangered" }} />
|
<BranchesOutlined style={{ color: "orangered" }} />
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
</Space>
|
</Space>
|
||||||
</Link>
|
</Link>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t("jobs.fields.owner"),
|
title: t("jobs.fields.owner"),
|
||||||
dataIndex: "owner",
|
dataIndex: "owner",
|
||||||
key: "owner",
|
key: "owner",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
|
|
||||||
responsive: ["md"],
|
responsive: ["md"],
|
||||||
sorter: (a, b) => alphaSort(a.ownr_ln, b.ownr_ln),
|
sorter: (a, b) => alphaSort(a.ownr_ln, b.ownr_ln),
|
||||||
sortOrder:
|
sortOrder:
|
||||||
state.sortedInfo.columnKey === "owner" && state.sortedInfo.order,
|
state.sortedInfo.columnKey === "owner" && state.sortedInfo.order,
|
||||||
render: (text, record) => {
|
render: (text, record) => {
|
||||||
return record.ownerid ? (
|
return record.ownerid ? (
|
||||||
<Link
|
<Link
|
||||||
to={"/manage/owners/" + record.ownerid}
|
to={"/manage/owners/" + record.ownerid}
|
||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
>
|
>
|
||||||
<OwnerNameDisplay ownerObject={record} />
|
<OwnerNameDisplay ownerObject={record} />
|
||||||
</Link>
|
</Link>
|
||||||
) : (
|
) : (
|
||||||
<span>
|
<span>
|
||||||
<OwnerNameDisplay ownerObject={record} />
|
<OwnerNameDisplay ownerObject={record} />
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t("jobs.fields.ownr_ph1"),
|
|
||||||
dataIndex: "ownr_ph1",
|
|
||||||
key: "ownr_ph1",
|
|
||||||
ellipsis: true,
|
|
||||||
responsive: ["md"],
|
|
||||||
render: (text, record) => (
|
|
||||||
<ChatOpenButton phone={record.ownr_ph1} jobid={record.id} />
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t("jobs.fields.ownr_ph2"),
|
|
||||||
dataIndex: "ownr_ph2",
|
|
||||||
key: "ownr_ph2",
|
|
||||||
ellipsis: true,
|
|
||||||
responsive: ["md"],
|
|
||||||
render: (text, record) => (
|
|
||||||
<ChatOpenButton phone={record.ownr_ph2} jobid={record.id} />
|
|
||||||
),
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
title: t("jobs.fields.status"),
|
|
||||||
dataIndex: "status",
|
|
||||||
key: "status",
|
|
||||||
ellipsis: true,
|
|
||||||
|
|
||||||
sorter: (a, b) => alphaSort(a.status, b.status),
|
|
||||||
sortOrder:
|
|
||||||
state.sortedInfo.columnKey === "status" && state.sortedInfo.order,
|
|
||||||
filters:
|
|
||||||
(jobs &&
|
|
||||||
jobs
|
|
||||||
.map((j) => j.status)
|
|
||||||
.filter(onlyUnique)
|
|
||||||
.map((s) => {
|
|
||||||
return {
|
|
||||||
text: s || "No Status*",
|
|
||||||
value: [s],
|
|
||||||
};
|
|
||||||
})) ||
|
|
||||||
[],
|
|
||||||
onFilter: (value, record) => value.includes(record.status),
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
|
||||||
title: t("jobs.fields.vehicle"),
|
|
||||||
dataIndex: "vehicle",
|
|
||||||
key: "vehicle",
|
|
||||||
ellipsis: true,
|
|
||||||
render: (text, record) => {
|
|
||||||
return record.vehicleid ? (
|
|
||||||
<Link
|
|
||||||
to={"/manage/vehicles/" + record.vehicleid}
|
|
||||||
onClick={(e) => e.stopPropagation()}
|
|
||||||
>
|
|
||||||
{`${record.v_model_yr || ""} ${record.v_make_desc || ""} ${
|
|
||||||
record.v_model_desc || ""
|
|
||||||
}`}
|
|
||||||
</Link>
|
|
||||||
) : (
|
|
||||||
<span>{`${record.v_model_yr || ""} ${record.v_make_desc || ""} ${
|
|
||||||
record.v_model_desc || ""
|
|
||||||
}`}</span>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t("vehicles.fields.plate_no"),
|
|
||||||
dataIndex: "plate_no",
|
|
||||||
key: "plate_no",
|
|
||||||
ellipsis: true,
|
|
||||||
|
|
||||||
responsive: ["md"],
|
|
||||||
sorter: (a, b) => alphaSort(a.plate_no, b.plate_no),
|
|
||||||
sortOrder:
|
|
||||||
state.sortedInfo.columnKey === "plate_no" && state.sortedInfo.order,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t("jobs.fields.clm_no"),
|
|
||||||
dataIndex: "clm_no",
|
|
||||||
key: "clm_no",
|
|
||||||
ellipsis: true,
|
|
||||||
responsive: ["md"],
|
|
||||||
sorter: (a, b) => alphaSort(a.clm_no, b.clm_no),
|
|
||||||
sortOrder:
|
|
||||||
state.sortedInfo.columnKey === "clm_no" && state.sortedInfo.order,
|
|
||||||
render: (text, record) =>
|
|
||||||
`${record.clm_no || ""}${
|
|
||||||
record.po_number ? ` (PO: ${record.po_number})` : ""
|
|
||||||
}`,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t("jobs.fields.ins_co_nm"),
|
|
||||||
dataIndex: "ins_co_nm",
|
|
||||||
key: "ins_co_nm",
|
|
||||||
ellipsis: true,
|
|
||||||
filters:
|
|
||||||
(jobs &&
|
|
||||||
jobs
|
|
||||||
.map((j) => j.ins_co_nm)
|
|
||||||
.filter(onlyUnique)
|
|
||||||
.map((s) => {
|
|
||||||
return {
|
|
||||||
text: s,
|
|
||||||
value: [s],
|
|
||||||
};
|
|
||||||
})) ||
|
|
||||||
[],
|
|
||||||
onFilter: (value, record) => value.includes(record.ins_co_nm),
|
|
||||||
responsive: ["md"],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t("jobs.fields.clm_total"),
|
|
||||||
dataIndex: "clm_total",
|
|
||||||
key: "clm_total",
|
|
||||||
responsive: ["md"],
|
|
||||||
ellipsis: true,
|
|
||||||
|
|
||||||
sorter: (a, b) => a.clm_total - b.clm_total,
|
|
||||||
sortOrder:
|
|
||||||
state.sortedInfo.columnKey === "clm_total" && state.sortedInfo.order,
|
|
||||||
render: (text, record) => (
|
|
||||||
<CurrencyFormatter>{record.clm_total}</CurrencyFormatter>
|
|
||||||
),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t("jobs.labels.estimator"),
|
|
||||||
dataIndex: "jobs.labels.estimator",
|
|
||||||
key: "jobs.labels.estimator",
|
|
||||||
ellipsis: true,
|
|
||||||
responsive: ["xl"],
|
|
||||||
filterSearch: true,
|
|
||||||
filters:
|
|
||||||
(jobs &&
|
|
||||||
jobs
|
|
||||||
.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(),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: t("jobs.fields.comment"),
|
|
||||||
dataIndex: "comment",
|
|
||||||
key: "comment",
|
|
||||||
ellipsis: true,
|
|
||||||
responsive: ["md"],
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
// title: t("jobs.fields.owner_owing"),
|
|
||||||
// dataIndex: "owner_owing",
|
|
||||||
// key: "owner_owing",
|
|
||||||
// responsive: ["md"],
|
|
||||||
// render: (text, record) => (
|
|
||||||
// <CurrencyFormatter>{record.owner_owing}</CurrencyFormatter>
|
|
||||||
// ),
|
|
||||||
// },
|
|
||||||
];
|
|
||||||
|
|
||||||
const scrollMapper = {
|
|
||||||
xs: true,
|
|
||||||
sm: true,
|
|
||||||
md: true,
|
|
||||||
lg: "100%",
|
|
||||||
xl: "100%",
|
|
||||||
xxl: "100%",
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Card
|
|
||||||
title={t("titles.bc.jobs-active")}
|
|
||||||
extra={
|
|
||||||
<Space wrap>
|
|
||||||
<Button onClick={() => refetch()}>
|
|
||||||
<SyncOutlined />
|
|
||||||
</Button>
|
|
||||||
<Input.Search
|
|
||||||
placeholder={t("general.labels.search")}
|
|
||||||
onChange={(e) => {
|
|
||||||
setSearchText(e.target.value);
|
|
||||||
}}
|
|
||||||
value={searchText}
|
|
||||||
enterButton
|
|
||||||
/>
|
|
||||||
</Space>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<Table
|
|
||||||
loading={loading}
|
|
||||||
pagination={{ defaultPageSize: 50 }}
|
|
||||||
columns={columns}
|
|
||||||
rowKey="id"
|
|
||||||
dataSource={jobs}
|
|
||||||
scroll={{
|
|
||||||
x: selectedBreakpoint ? scrollMapper[selectedBreakpoint[0]] : "100%",
|
|
||||||
}}
|
|
||||||
rowSelection={{
|
|
||||||
onSelect: (record) => {
|
|
||||||
handleOnRowClick(record);
|
|
||||||
},
|
|
||||||
selectedRowKeys: [selected],
|
|
||||||
type: "radio",
|
|
||||||
}}
|
|
||||||
onChange={handleTableChange}
|
|
||||||
onRow={(record, rowIndex) => {
|
|
||||||
return {
|
|
||||||
onClick: (event) => {
|
|
||||||
handleOnRowClick(record);
|
|
||||||
},
|
},
|
||||||
};
|
},
|
||||||
}}
|
{
|
||||||
/>
|
title: t("jobs.fields.ownr_ph1"),
|
||||||
</Card>
|
dataIndex: "ownr_ph1",
|
||||||
);
|
key: "ownr_ph1",
|
||||||
|
ellipsis: true,
|
||||||
|
responsive: ["md"],
|
||||||
|
render: (text, record) => (
|
||||||
|
<ChatOpenButton phone={record.ownr_ph1} jobid={record.id} />
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("jobs.fields.ownr_ph2"),
|
||||||
|
dataIndex: "ownr_ph2",
|
||||||
|
key: "ownr_ph2",
|
||||||
|
ellipsis: true,
|
||||||
|
responsive: ["md"],
|
||||||
|
render: (text, record) => (
|
||||||
|
<ChatOpenButton phone={record.ownr_ph2} jobid={record.id} />
|
||||||
|
),
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: t("jobs.fields.status"),
|
||||||
|
dataIndex: "status",
|
||||||
|
key: "status",
|
||||||
|
ellipsis: true,
|
||||||
|
|
||||||
|
sorter: (a, b) => alphaSort(a.status, b.status),
|
||||||
|
sortOrder:
|
||||||
|
state.sortedInfo.columnKey === "status" && state.sortedInfo.order,
|
||||||
|
filters:
|
||||||
|
(jobs &&
|
||||||
|
jobs
|
||||||
|
.map((j) => j.status)
|
||||||
|
.filter(onlyUnique)
|
||||||
|
.map((s) => {
|
||||||
|
return {
|
||||||
|
text: s || "No Status*",
|
||||||
|
value: [s],
|
||||||
|
};
|
||||||
|
})) ||
|
||||||
|
[],
|
||||||
|
onFilter: (value, record) => value.includes(record.status),
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: t("jobs.fields.vehicle"),
|
||||||
|
dataIndex: "vehicle",
|
||||||
|
key: "vehicle",
|
||||||
|
ellipsis: true,
|
||||||
|
render: (text, record) => {
|
||||||
|
return record.vehicleid ? (
|
||||||
|
<Link
|
||||||
|
to={"/manage/vehicles/" + record.vehicleid}
|
||||||
|
onClick={(e) => e.stopPropagation()}
|
||||||
|
>
|
||||||
|
{`${record.v_model_yr || ""} ${record.v_make_desc || ""} ${
|
||||||
|
record.v_model_desc || ""
|
||||||
|
}`}
|
||||||
|
</Link>
|
||||||
|
) : (
|
||||||
|
<span>{`${record.v_model_yr || ""} ${record.v_make_desc || ""} ${
|
||||||
|
record.v_model_desc || ""
|
||||||
|
}`}</span>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("vehicles.fields.plate_no"),
|
||||||
|
dataIndex: "plate_no",
|
||||||
|
key: "plate_no",
|
||||||
|
ellipsis: true,
|
||||||
|
|
||||||
|
responsive: ["md"],
|
||||||
|
sorter: (a, b) => alphaSort(a.plate_no, b.plate_no),
|
||||||
|
sortOrder:
|
||||||
|
state.sortedInfo.columnKey === "plate_no" && state.sortedInfo.order,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("jobs.fields.clm_no"),
|
||||||
|
dataIndex: "clm_no",
|
||||||
|
key: "clm_no",
|
||||||
|
ellipsis: true,
|
||||||
|
responsive: ["md"],
|
||||||
|
sorter: (a, b) => alphaSort(a.clm_no, b.clm_no),
|
||||||
|
sortOrder:
|
||||||
|
state.sortedInfo.columnKey === "clm_no" && state.sortedInfo.order,
|
||||||
|
render: (text, record) =>
|
||||||
|
`${record.clm_no || ""}${
|
||||||
|
record.po_number ? ` (PO: ${record.po_number})` : ""
|
||||||
|
}`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("jobs.fields.ins_co_nm"),
|
||||||
|
dataIndex: "ins_co_nm",
|
||||||
|
key: "ins_co_nm",
|
||||||
|
ellipsis: true,
|
||||||
|
filters:
|
||||||
|
(jobs &&
|
||||||
|
jobs
|
||||||
|
.map((j) => j.ins_co_nm)
|
||||||
|
.filter(onlyUnique)
|
||||||
|
.map((s) => {
|
||||||
|
return {
|
||||||
|
text: s,
|
||||||
|
value: [s],
|
||||||
|
};
|
||||||
|
})) ||
|
||||||
|
[],
|
||||||
|
onFilter: (value, record) => value.includes(record.ins_co_nm),
|
||||||
|
responsive: ["md"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("jobs.fields.clm_total"),
|
||||||
|
dataIndex: "clm_total",
|
||||||
|
key: "clm_total",
|
||||||
|
responsive: ["md"],
|
||||||
|
ellipsis: true,
|
||||||
|
|
||||||
|
sorter: (a, b) => a.clm_total - b.clm_total,
|
||||||
|
sortOrder:
|
||||||
|
state.sortedInfo.columnKey === "clm_total" && state.sortedInfo.order,
|
||||||
|
render: (text, record) => (
|
||||||
|
<CurrencyFormatter>{record.clm_total}</CurrencyFormatter>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("jobs.labels.estimator"),
|
||||||
|
dataIndex: "jobs.labels.estimator",
|
||||||
|
key: "jobs.labels.estimator",
|
||||||
|
ellipsis: true,
|
||||||
|
responsive: ["xl"],
|
||||||
|
filterSearch: true,
|
||||||
|
filters:
|
||||||
|
(jobs &&
|
||||||
|
jobs
|
||||||
|
.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(),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: t("jobs.fields.comment"),
|
||||||
|
dataIndex: "comment",
|
||||||
|
key: "comment",
|
||||||
|
ellipsis: true,
|
||||||
|
responsive: ["md"],
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// title: t("jobs.fields.owner_owing"),
|
||||||
|
// dataIndex: "owner_owing",
|
||||||
|
// key: "owner_owing",
|
||||||
|
// responsive: ["md"],
|
||||||
|
// render: (text, record) => (
|
||||||
|
// <CurrencyFormatter>{record.owner_owing}</CurrencyFormatter>
|
||||||
|
// ),
|
||||||
|
// },
|
||||||
|
];
|
||||||
|
|
||||||
|
const scrollMapper = {
|
||||||
|
xs: true,
|
||||||
|
sm: true,
|
||||||
|
md: true,
|
||||||
|
lg: "100%",
|
||||||
|
xl: "100%",
|
||||||
|
xxl: "100%",
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Card
|
||||||
|
title={t("titles.bc.jobs-active")}
|
||||||
|
extra={
|
||||||
|
<Space wrap>
|
||||||
|
<Button onClick={() => refetch()}>
|
||||||
|
<SyncOutlined />
|
||||||
|
</Button>
|
||||||
|
<Input.Search
|
||||||
|
placeholder={t("general.labels.search")}
|
||||||
|
onChange={(e) => {
|
||||||
|
setSearchText(e.target.value);
|
||||||
|
}}
|
||||||
|
value={searchText}
|
||||||
|
enterButton
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Table
|
||||||
|
loading={loading}
|
||||||
|
pagination={{ defaultPageSize: 50 }}
|
||||||
|
columns={columns}
|
||||||
|
rowKey="id"
|
||||||
|
dataSource={jobs}
|
||||||
|
scroll={{
|
||||||
|
x: selectedBreakpoint ? scrollMapper[selectedBreakpoint[0]] : "100%",
|
||||||
|
}}
|
||||||
|
rowSelection={{
|
||||||
|
onSelect: (record) => {
|
||||||
|
handleOnRowClick(record);
|
||||||
|
},
|
||||||
|
selectedRowKeys: [selected],
|
||||||
|
type: "radio",
|
||||||
|
}}
|
||||||
|
onChange={handleTableChange}
|
||||||
|
onRow={(record, rowIndex) => {
|
||||||
|
return {
|
||||||
|
onClick: (event) => {
|
||||||
|
handleOnRowClick(record);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Card>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(mapStateToProps, null)(JobsList);
|
export default connect(mapStateToProps, null)(JobsList);
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import { alphaSort } from "../../utils/sorters";
|
|||||||
import AlertComponent from "../alert/alert.component";
|
import AlertComponent from "../alert/alert.component";
|
||||||
import ChatOpenButton from "../chat-open-button/chat-open-button.component";
|
import ChatOpenButton from "../chat-open-button/chat-open-button.component";
|
||||||
import OwnerNameDisplay from "../owner-name-display/owner-name-display.component";
|
import OwnerNameDisplay from "../owner-name-display/owner-name-display.component";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -377,7 +378,7 @@ export function JobsReadyList({ bodyshop }) {
|
|||||||
>
|
>
|
||||||
<Table
|
<Table
|
||||||
loading={loading}
|
loading={loading}
|
||||||
pagination={{ defaultPageSize: 50 }}
|
pagination={{ defaultPageSize: pageLimit }}
|
||||||
columns={columns}
|
columns={columns}
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
dataSource={jobs}
|
dataSource={jobs}
|
||||||
|
|||||||
@@ -8,10 +8,11 @@ export default function OwnerFindModalComponent({
|
|||||||
setSelectedOwner,
|
setSelectedOwner,
|
||||||
ownersListLoading,
|
ownersListLoading,
|
||||||
ownersList,
|
ownersList,
|
||||||
|
partsQueueToggle,
|
||||||
|
setPartsQueueToggle,
|
||||||
}) {
|
}) {
|
||||||
//setSelectedOwner is used to set the record id of the owner to use for adding the job.
|
//setSelectedOwner is used to set the record id of the owner to use for adding the job.
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: t("owners.fields.ownr_ln"),
|
title: t("owners.fields.ownr_ln"),
|
||||||
@@ -109,6 +110,12 @@ export default function OwnerFindModalComponent({
|
|||||||
>
|
>
|
||||||
{t("owners.labels.create_new")}
|
{t("owners.labels.create_new")}
|
||||||
</Checkbox>
|
</Checkbox>
|
||||||
|
<Checkbox
|
||||||
|
checked={partsQueueToggle}
|
||||||
|
onChange={(e) => setPartsQueueToggle(e.target.checked)}
|
||||||
|
>
|
||||||
|
{t("bodyshop.fields.md_functionality_toggles.parts_queue_toggle")}
|
||||||
|
</Checkbox>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ export default function OwnerFindModalContainer({
|
|||||||
owner,
|
owner,
|
||||||
selectedOwner,
|
selectedOwner,
|
||||||
setSelectedOwner,
|
setSelectedOwner,
|
||||||
|
partsQueueToggle,
|
||||||
|
setPartsQueueToggle,
|
||||||
...modalProps
|
...modalProps
|
||||||
}) {
|
}) {
|
||||||
//use owner object to run query and find what possible owners there are.
|
//use owner object to run query and find what possible owners there are.
|
||||||
@@ -59,6 +61,8 @@ export default function OwnerFindModalContainer({
|
|||||||
selectedOwner={selectedOwner}
|
selectedOwner={selectedOwner}
|
||||||
setSelectedOwner={setSelectedOwner}
|
setSelectedOwner={setSelectedOwner}
|
||||||
ownersListLoading={ownersList.loading}
|
ownersListLoading={ownersList.loading}
|
||||||
|
partsQueueToggle={partsQueueToggle}
|
||||||
|
setPartsQueueToggle={setPartsQueueToggle}
|
||||||
ownersList={
|
ownersList={
|
||||||
ownersList.data && ownersList.data.search_owners
|
ownersList.data && ownersList.data.search_owners
|
||||||
? ownersList.data.search_owners
|
? ownersList.data.search_owners
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { Link, useHistory, useLocation } from "react-router-dom";
|
import { Link, useHistory, useLocation } from "react-router-dom";
|
||||||
import PhoneFormatter from "../../utils/PhoneFormatter";
|
import PhoneFormatter from "../../utils/PhoneFormatter";
|
||||||
import OwnerNameDisplay from "../owner-name-display/owner-name-display.component";
|
import OwnerNameDisplay from "../owner-name-display/owner-name-display.component";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
|
|
||||||
export default function OwnersListComponent({
|
export default function OwnersListComponent({
|
||||||
loading,
|
loading,
|
||||||
@@ -122,7 +123,7 @@ export default function OwnersListComponent({
|
|||||||
loading={loading}
|
loading={loading}
|
||||||
pagination={{
|
pagination={{
|
||||||
position: "top",
|
position: "top",
|
||||||
pageSize: 25,
|
pageSize: pageLimit,
|
||||||
current: parseInt(page || 1),
|
current: parseInt(page || 1),
|
||||||
total: total,
|
total: total,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import AlertComponent from "../alert/alert.component";
|
|||||||
import OwnersListComponent from "./owners-list.component";
|
import OwnersListComponent from "./owners-list.component";
|
||||||
import queryString from "query-string";
|
import queryString from "query-string";
|
||||||
import { useLocation } from "react-router-dom";
|
import { useLocation } from "react-router-dom";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
|
|
||||||
export default function OwnersListContainer() {
|
export default function OwnersListContainer() {
|
||||||
const searchParams = queryString.parse(useLocation().search);
|
const searchParams = queryString.parse(useLocation().search);
|
||||||
@@ -16,8 +17,8 @@ export default function OwnersListContainer() {
|
|||||||
nextFetchPolicy: "network-only",
|
nextFetchPolicy: "network-only",
|
||||||
variables: {
|
variables: {
|
||||||
search: search || "",
|
search: search || "",
|
||||||
offset: page ? (page - 1) * 25 : 0,
|
offset: page ? (page - 1) * pageLimit : 0,
|
||||||
limit: 25,
|
limit: pageLimit,
|
||||||
order: [
|
order: [
|
||||||
{
|
{
|
||||||
[sortcolumn || "created_at"]: sortorder
|
[sortcolumn || "created_at"]: sortorder
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { alphaSort } from "../../utils/sorters";
|
|||||||
import CaBcEtfTableModalContainer from "../ca-bc-etf-table-modal/ca-bc-etf-table-modal.container";
|
import CaBcEtfTableModalContainer from "../ca-bc-etf-table-modal/ca-bc-etf-table-modal.container";
|
||||||
import OwnerNameDisplay from "../owner-name-display/owner-name-display.component";
|
import OwnerNameDisplay from "../owner-name-display/owner-name-display.component";
|
||||||
import PrintWrapperComponent from "../print-wrapper/print-wrapper.component";
|
import PrintWrapperComponent from "../print-wrapper/print-wrapper.component";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
//currentUser: selectCurrentUser
|
//currentUser: selectCurrentUser
|
||||||
@@ -282,11 +283,11 @@ export function PaymentsListPaginated({
|
|||||||
pagination={
|
pagination={
|
||||||
search?.search
|
search?.search
|
||||||
? {
|
? {
|
||||||
pageSize: 25,
|
pageSize: pageLimit,
|
||||||
showSizeChanger: false,
|
showSizeChanger: false,
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
pageSize: 25,
|
pageSize: pageLimit,
|
||||||
current: parseInt(page || 1),
|
current: parseInt(page || 1),
|
||||||
total: total,
|
total: total,
|
||||||
showSizeChanger: false,
|
showSizeChanger: false,
|
||||||
|
|||||||
@@ -20,9 +20,9 @@ import ProductionBoardCard from "../production-board-kanban-card/production-boar
|
|||||||
import ProductionListDetailComponent from "../production-list-detail/production-list-detail.component";
|
import ProductionListDetailComponent from "../production-list-detail/production-list-detail.component";
|
||||||
import ProductionBoardKanbanCardSettings from "./production-board-kanban.card-settings.component";
|
import ProductionBoardKanbanCardSettings from "./production-board-kanban.card-settings.component";
|
||||||
//import "@asseinfo/react-kanban/dist/styles.css";
|
//import "@asseinfo/react-kanban/dist/styles.css";
|
||||||
|
import CardColorLegend from "../production-board-kanban-card/production-board-kanban-card-color-legend.component";
|
||||||
import "./production-board-kanban.styles.scss";
|
import "./production-board-kanban.styles.scss";
|
||||||
import { createBoardData } from "./production-board-kanban.utils.js";
|
import { createBoardData } from "./production-board-kanban.utils.js";
|
||||||
import CardColorLegend from "../production-board-kanban-card/production-board-kanban-card-color-legend.component";
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
technician: selectTechnician,
|
technician: selectTechnician,
|
||||||
@@ -153,6 +153,18 @@ export function ProductionBoardKanbanComponent({
|
|||||||
0
|
0
|
||||||
)
|
)
|
||||||
.toFixed(1);
|
.toFixed(1);
|
||||||
|
const totalLAB = data
|
||||||
|
.reduce(
|
||||||
|
(acc, val) => acc + (val.labhrs?.aggregate?.sum?.mod_lb_hrs || 0),
|
||||||
|
0
|
||||||
|
)
|
||||||
|
.toFixed(1);
|
||||||
|
const totalLAR = data
|
||||||
|
.reduce(
|
||||||
|
(acc, val) => acc + (val.larhrs?.aggregate?.sum?.mod_lb_hrs || 0),
|
||||||
|
0
|
||||||
|
)
|
||||||
|
.toFixed(1);
|
||||||
const selectedBreakpoint = Object.entries(Grid.useBreakpoint())
|
const selectedBreakpoint = Object.entries(Grid.useBreakpoint())
|
||||||
.filter((screen) => !!screen[1])
|
.filter((screen) => !!screen[1])
|
||||||
.slice(-1)[0];
|
.slice(-1)[0];
|
||||||
@@ -236,6 +248,14 @@ export function ProductionBoardKanbanComponent({
|
|||||||
title={t("dashboard.titles.productionhours")}
|
title={t("dashboard.titles.productionhours")}
|
||||||
value={totalHrs}
|
value={totalHrs}
|
||||||
/>
|
/>
|
||||||
|
<Statistic
|
||||||
|
title={t("dashboard.titles.labhours")}
|
||||||
|
value={totalLAB}
|
||||||
|
/>
|
||||||
|
<Statistic
|
||||||
|
title={t("dashboard.titles.larhours")}
|
||||||
|
value={totalLAR}
|
||||||
|
/>
|
||||||
<Statistic
|
<Statistic
|
||||||
title={t("appointments.labels.inproduction")}
|
title={t("appointments.labels.inproduction")}
|
||||||
value={data && data.length}
|
value={data && data.length}
|
||||||
|
|||||||
@@ -184,6 +184,18 @@ export function ProductionListTable({
|
|||||||
0
|
0
|
||||||
)
|
)
|
||||||
.toFixed(1);
|
.toFixed(1);
|
||||||
|
const totalLAB = data
|
||||||
|
.reduce(
|
||||||
|
(acc, val) => acc + (val.labhrs?.aggregate?.sum?.mod_lb_hrs || 0),
|
||||||
|
0
|
||||||
|
)
|
||||||
|
.toFixed(1);
|
||||||
|
const totalLAR = data
|
||||||
|
.reduce(
|
||||||
|
(acc, val) => acc + (val.larhrs?.aggregate?.sum?.mod_lb_hrs || 0),
|
||||||
|
0
|
||||||
|
)
|
||||||
|
.toFixed(1);
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<PageHeader
|
<PageHeader
|
||||||
@@ -193,6 +205,14 @@ export function ProductionListTable({
|
|||||||
title={t("dashboard.titles.productionhours")}
|
title={t("dashboard.titles.productionhours")}
|
||||||
value={totalHrs}
|
value={totalHrs}
|
||||||
/>
|
/>
|
||||||
|
<Statistic
|
||||||
|
title={t("dashboard.titles.labhours")}
|
||||||
|
value={totalLAB}
|
||||||
|
/>
|
||||||
|
<Statistic
|
||||||
|
title={t("dashboard.titles.larhours")}
|
||||||
|
value={totalLAR}
|
||||||
|
/>
|
||||||
<Statistic
|
<Statistic
|
||||||
title={t("appointments.labels.inproduction")}
|
title={t("appointments.labels.inproduction")}
|
||||||
value={dataSource && dataSource.length}
|
value={dataSource && dataSource.length}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import {
|
|||||||
QUERY_APPOINTMENTS_BY_JOBID,
|
QUERY_APPOINTMENTS_BY_JOBID,
|
||||||
} from "../../graphql/appointments.queries";
|
} from "../../graphql/appointments.queries";
|
||||||
import { QUERY_LBR_HRS_BY_PK, UPDATE_JOBS } from "../../graphql/jobs.queries";
|
import { QUERY_LBR_HRS_BY_PK, UPDATE_JOBS } from "../../graphql/jobs.queries";
|
||||||
|
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||||
import { setEmailOptions } from "../../redux/email/email.actions";
|
import { setEmailOptions } from "../../redux/email/email.actions";
|
||||||
import { toggleModalVisible } from "../../redux/modals/modals.actions";
|
import { toggleModalVisible } from "../../redux/modals/modals.actions";
|
||||||
import { selectSchedule } from "../../redux/modals/modals.selectors";
|
import { selectSchedule } from "../../redux/modals/modals.selectors";
|
||||||
@@ -20,6 +21,8 @@ import {
|
|||||||
selectBodyshop,
|
selectBodyshop,
|
||||||
selectCurrentUser,
|
selectCurrentUser,
|
||||||
} from "../../redux/user/user.selectors";
|
} from "../../redux/user/user.selectors";
|
||||||
|
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||||
|
import { DateTimeFormat } from "../../utils/DateFormatter";
|
||||||
import { TemplateList } from "../../utils/TemplateConstants";
|
import { TemplateList } from "../../utils/TemplateConstants";
|
||||||
import ScheduleJobModalComponent from "./schedule-job-modal.component";
|
import ScheduleJobModalComponent from "./schedule-job-modal.component";
|
||||||
|
|
||||||
@@ -31,6 +34,8 @@ const mapStateToProps = createStructuredSelector({
|
|||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
toggleModalVisible: () => dispatch(toggleModalVisible("schedule")),
|
toggleModalVisible: () => dispatch(toggleModalVisible("schedule")),
|
||||||
setEmailOptions: (e) => dispatch(setEmailOptions(e)),
|
setEmailOptions: (e) => dispatch(setEmailOptions(e)),
|
||||||
|
insertAuditTrail: ({ jobid, operation }) =>
|
||||||
|
dispatch(insertAuditTrail({ jobid, operation })),
|
||||||
});
|
});
|
||||||
|
|
||||||
export function ScheduleJobModalContainer({
|
export function ScheduleJobModalContainer({
|
||||||
@@ -39,6 +44,7 @@ export function ScheduleJobModalContainer({
|
|||||||
toggleModalVisible,
|
toggleModalVisible,
|
||||||
setEmailOptions,
|
setEmailOptions,
|
||||||
currentUser,
|
currentUser,
|
||||||
|
insertAuditTrail,
|
||||||
}) {
|
}) {
|
||||||
const { visible, context, actions } = scheduleModal;
|
const { visible, context, actions } = scheduleModal;
|
||||||
const { jobId, job, previousEvent } = context;
|
const { jobId, job, previousEvent } = context;
|
||||||
@@ -134,6 +140,15 @@ export function ScheduleJobModalContainer({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!appt.errors) {
|
||||||
|
insertAuditTrail({
|
||||||
|
jobid: job.id,
|
||||||
|
operation: AuditTrailMapping.appointmentinsert(
|
||||||
|
DateTimeFormat(values.start)
|
||||||
|
),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (!!appt.errors) {
|
if (!!appt.errors) {
|
||||||
notification["error"]({
|
notification["error"]({
|
||||||
message: t("appointments.errors.saving", {
|
message: t("appointments.errors.saving", {
|
||||||
@@ -155,6 +170,7 @@ export function ScheduleJobModalContainer({
|
|||||||
scheduled_in: values.start,
|
scheduled_in: values.start,
|
||||||
scheduled_completion: values.scheduled_completion,
|
scheduled_completion: values.scheduled_completion,
|
||||||
lost_sale_reason: null,
|
lost_sale_reason: null,
|
||||||
|
date_lost_sale: null,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -10,13 +10,14 @@ import OwnerNameDisplay from "../owner-name-display/owner-name-display.component
|
|||||||
import ScoreboardEntryEdit from "../scoreboard-entry-edit/scoreboard-entry-edit.component";
|
import ScoreboardEntryEdit from "../scoreboard-entry-edit/scoreboard-entry-edit.component";
|
||||||
import ScoreboardRemoveButton from "../scoreboard-remove-button/scorebard-remove-button.component";
|
import ScoreboardRemoveButton from "../scoreboard-remove-button/scorebard-remove-button.component";
|
||||||
import { SyncOutlined } from "@ant-design/icons";
|
import { SyncOutlined } from "@ant-design/icons";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
export default function ScoreboardJobsList({ scoreBoardlist }) {
|
export default function ScoreboardJobsList({ scoreBoardlist }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [state, setState] = useState({
|
const [state, setState] = useState({
|
||||||
visible: false,
|
visible: false,
|
||||||
search: "",
|
search: "",
|
||||||
current: 1,
|
current: 1,
|
||||||
pageSize: 10,
|
pageSize: pageLimit,
|
||||||
});
|
});
|
||||||
|
|
||||||
const { loading, error, data, refetch } = useQuery(
|
const { loading, error, data, refetch } = useQuery(
|
||||||
@@ -148,7 +149,7 @@ export default function ScoreboardJobsList({ scoreBoardlist }) {
|
|||||||
}
|
}
|
||||||
pagination={{
|
pagination={{
|
||||||
position: "top",
|
position: "top",
|
||||||
pageSize: state.pageSize || 10,
|
pageSize: state.pageSize || pageLimit,
|
||||||
current: state.current || 1,
|
current: state.current || 1,
|
||||||
total: data ? data.scoreboard_aggregate.aggregate.count : 0,
|
total: data ? data.scoreboard_aggregate.aggregate.count : 0,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -2,11 +2,9 @@ import { useQuery } from "@apollo/client";
|
|||||||
import { Col, Row } from "antd";
|
import { Col, Row } from "antd";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import queryString from "query-string";
|
|
||||||
import React, { useMemo } from "react";
|
import React, { useMemo } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { useLocation } from "react-router-dom";
|
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { QUERY_TIME_TICKETS_IN_RANGE_SB } from "../../graphql/timetickets.queries";
|
import { QUERY_TIME_TICKETS_IN_RANGE_SB } from "../../graphql/timetickets.queries";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
@@ -31,12 +29,8 @@ export default connect(
|
|||||||
|
|
||||||
export function ScoreboardTimeTicketsStats({ bodyshop }) {
|
export function ScoreboardTimeTicketsStats({ bodyshop }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const searchParams = queryString.parse(useLocation().search);
|
const startDate = moment().startOf("month")
|
||||||
const { start, end } = searchParams;
|
const endDate = moment().endOf("month");
|
||||||
const startDate = start
|
|
||||||
? moment(start)
|
|
||||||
: moment().startOf("week").subtract(7, "days");
|
|
||||||
const endDate = end ? moment(end) : moment().endOf("week");
|
|
||||||
|
|
||||||
const fixedPeriods = useMemo(() => {
|
const fixedPeriods = useMemo(() => {
|
||||||
const endOfThisMonth = moment().endOf("month");
|
const endOfThisMonth = moment().endOf("month");
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ export function ShopInfoGeneral({ form, bodyshop }) {
|
|||||||
bodyshop && bodyshop.imexshopid
|
bodyshop && bodyshop.imexshopid
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<LayoutFormRow
|
<LayoutFormRow
|
||||||
@@ -680,6 +681,13 @@ export function ShopInfoGeneral({ form, bodyshop }) {
|
|||||||
>
|
>
|
||||||
<Select mode="tags" />
|
<Select mode="tags" />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("bodyshop.fields.md_functionality_toggles.parts_queue_toggle")}
|
||||||
|
name={["md_functionality_toggles","parts_queue_toggle"]}
|
||||||
|
valuePropName="checked"
|
||||||
|
>
|
||||||
|
<Switch />
|
||||||
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name={["last_name_first"]}
|
name={["last_name_first"]}
|
||||||
label={t("bodyshop.fields.last_name_first")}
|
label={t("bodyshop.fields.last_name_first")}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import React, { useState } from "react";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Link, useHistory, useLocation } from "react-router-dom";
|
import { Link, useHistory, useLocation } from "react-router-dom";
|
||||||
import VehicleVinDisplay from "../vehicle-vin-display/vehicle-vin-display.component";
|
import VehicleVinDisplay from "../vehicle-vin-display/vehicle-vin-display.component";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
export default function VehiclesListComponent({
|
export default function VehiclesListComponent({
|
||||||
loading,
|
loading,
|
||||||
vehicles,
|
vehicles,
|
||||||
@@ -106,7 +107,7 @@ export default function VehiclesListComponent({
|
|||||||
loading={loading}
|
loading={loading}
|
||||||
pagination={{
|
pagination={{
|
||||||
position: "top",
|
position: "top",
|
||||||
pageSize: 25,
|
pageSize: pageLimit,
|
||||||
current: parseInt(page || 1),
|
current: parseInt(page || 1),
|
||||||
total: total,
|
total: total,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import AlertComponent from "../alert/alert.component";
|
|||||||
import { QUERY_ALL_VEHICLES_PAGINATED } from "../../graphql/vehicles.queries";
|
import { QUERY_ALL_VEHICLES_PAGINATED } from "../../graphql/vehicles.queries";
|
||||||
import queryString from "query-string";
|
import queryString from "query-string";
|
||||||
import { useLocation } from "react-router-dom";
|
import { useLocation } from "react-router-dom";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
|
|
||||||
export default function VehiclesListContainer() {
|
export default function VehiclesListContainer() {
|
||||||
const searchParams = queryString.parse(useLocation().search);
|
const searchParams = queryString.parse(useLocation().search);
|
||||||
@@ -15,8 +16,8 @@ export default function VehiclesListContainer() {
|
|||||||
{
|
{
|
||||||
variables: {
|
variables: {
|
||||||
search: search || "",
|
search: search || "",
|
||||||
offset: page ? (page - 1) * 25 : 0,
|
offset: page ? (page - 1) * pageLimit : 0,
|
||||||
limit: 25,
|
limit: pageLimit,
|
||||||
order: [
|
order: [
|
||||||
{
|
{
|
||||||
[sortcolumn || "created_at"]: sortorder
|
[sortcolumn || "created_at"]: sortorder
|
||||||
|
|||||||
@@ -271,6 +271,7 @@ export const CANCEL_APPOINTMENTS_BY_JOB_ID = gql`
|
|||||||
scheduled_completion
|
scheduled_completion
|
||||||
status
|
status
|
||||||
lost_sale_reason
|
lost_sale_reason
|
||||||
|
date_lost_sale
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ export const QUERY_BODYSHOP = gql`
|
|||||||
logo_img_path
|
logo_img_path
|
||||||
md_ro_statuses
|
md_ro_statuses
|
||||||
md_order_statuses
|
md_order_statuses
|
||||||
|
md_functionality_toggles
|
||||||
shopname
|
shopname
|
||||||
state
|
state
|
||||||
state_tax_id
|
state_tax_id
|
||||||
@@ -172,6 +173,7 @@ export const UPDATE_SHOP = gql`
|
|||||||
logo_img_path
|
logo_img_path
|
||||||
md_ro_statuses
|
md_ro_statuses
|
||||||
md_order_statuses
|
md_order_statuses
|
||||||
|
md_functionality_toggles
|
||||||
shopname
|
shopname
|
||||||
state
|
state
|
||||||
state_tax_id
|
state_tax_id
|
||||||
|
|||||||
@@ -1,5 +1,65 @@
|
|||||||
import { gql } from "@apollo/client";
|
import { gql } from "@apollo/client";
|
||||||
|
|
||||||
|
export const QUERY_ALL_ACTIVE_JOBS_PAGINATED = gql`
|
||||||
|
query QUERY_ALL_JOBS_PAGINATED_STATUS_FILTERED(
|
||||||
|
$offset: Int
|
||||||
|
$limit: Int
|
||||||
|
$order: [jobs_order_by!]
|
||||||
|
$statuses: [String!]!,
|
||||||
|
$isConverted: Boolean
|
||||||
|
) {
|
||||||
|
jobs(
|
||||||
|
offset: $offset
|
||||||
|
limit: $limit
|
||||||
|
where: { status: { _in: $statuses }, converted: { _eq: $isConverted } }
|
||||||
|
order_by: $order
|
||||||
|
) {
|
||||||
|
iouparent
|
||||||
|
ownr_fn
|
||||||
|
ownr_ln
|
||||||
|
ownr_co_nm
|
||||||
|
ownr_ph1
|
||||||
|
ownr_ph2
|
||||||
|
ownr_ea
|
||||||
|
ownerid
|
||||||
|
comment
|
||||||
|
plate_no
|
||||||
|
plate_st
|
||||||
|
v_vin
|
||||||
|
v_model_yr
|
||||||
|
v_model_desc
|
||||||
|
v_make_desc
|
||||||
|
v_color
|
||||||
|
vehicleid
|
||||||
|
actual_completion
|
||||||
|
actual_delivery
|
||||||
|
actual_in
|
||||||
|
production_vars
|
||||||
|
id
|
||||||
|
ins_co_nm
|
||||||
|
clm_no
|
||||||
|
po_number
|
||||||
|
clm_total
|
||||||
|
owner_owing
|
||||||
|
ro_number
|
||||||
|
scheduled_completion
|
||||||
|
scheduled_in
|
||||||
|
scheduled_delivery
|
||||||
|
status
|
||||||
|
updated_at
|
||||||
|
ded_amt
|
||||||
|
suspended
|
||||||
|
est_ct_fn
|
||||||
|
est_ct_ln
|
||||||
|
}
|
||||||
|
jobs_aggregate(where: { status: { _in: $statuses } }) {
|
||||||
|
aggregate {
|
||||||
|
count(distinct: true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
export const QUERY_ALL_ACTIVE_JOBS = gql`
|
export const QUERY_ALL_ACTIVE_JOBS = gql`
|
||||||
query QUERY_ALL_ACTIVE_JOBS($statuses: [String!]!, $isConverted: Boolean) {
|
query QUERY_ALL_ACTIVE_JOBS($statuses: [String!]!, $isConverted: Boolean) {
|
||||||
jobs(
|
jobs(
|
||||||
@@ -60,7 +120,7 @@ export const QUERY_PARTS_QUEUE = gql`
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
jobs(
|
jobs(
|
||||||
where: { _and: [{ status: { _in: $statuses } }] }
|
where: { _and: [{ status: { _in: $statuses }, converted: { _eq: true } }] }
|
||||||
offset: $offset
|
offset: $offset
|
||||||
limit: $limit
|
limit: $limit
|
||||||
order_by: $order
|
order_by: $order
|
||||||
@@ -675,6 +735,7 @@ export const GET_JOB_BY_PK = gql`
|
|||||||
date_scheduled
|
date_scheduled
|
||||||
date_invoiced
|
date_invoiced
|
||||||
date_last_contacted
|
date_last_contacted
|
||||||
|
date_lost_sale
|
||||||
date_next_contact
|
date_next_contact
|
||||||
date_towin
|
date_towin
|
||||||
date_rentalresp
|
date_rentalresp
|
||||||
@@ -1134,6 +1195,7 @@ export const UPDATE_JOB = gql`
|
|||||||
actual_in
|
actual_in
|
||||||
date_repairstarted
|
date_repairstarted
|
||||||
date_void
|
date_void
|
||||||
|
date_lost_sale
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import CurrencyFormatter from "../../utils/CurrencyFormatter";
|
|||||||
import { DateFormatter } from "../../utils/DateFormatter";
|
import { DateFormatter } from "../../utils/DateFormatter";
|
||||||
import { TemplateList } from "../../utils/TemplateConstants";
|
import { TemplateList } from "../../utils/TemplateConstants";
|
||||||
import { alphaSort, dateSort } from "../../utils/sorters";
|
import { alphaSort, dateSort } from "../../utils/sorters";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
setPartsOrderContext: (context) =>
|
setPartsOrderContext: (context) =>
|
||||||
@@ -295,11 +296,11 @@ export function BillsListPage({
|
|||||||
pagination={
|
pagination={
|
||||||
search?.search
|
search?.search
|
||||||
? {
|
? {
|
||||||
pageSize: 25,
|
pageSize: pageLimit,
|
||||||
showSizeChanger: false,
|
showSizeChanger: false,
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
pageSize: 25,
|
pageSize: pageLimit,
|
||||||
current: parseInt(page || 1),
|
current: parseInt(page || 1),
|
||||||
total: total,
|
total: total,
|
||||||
showSizeChanger: false,
|
showSizeChanger: false,
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import {
|
|||||||
setSelectedHeader,
|
setSelectedHeader,
|
||||||
} from "../../redux/application/application.actions";
|
} from "../../redux/application/application.actions";
|
||||||
import BillsPageComponent from "./bills.page.component";
|
import BillsPageComponent from "./bills.page.component";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)),
|
setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)),
|
||||||
@@ -38,8 +39,8 @@ export function BillsPageContainer({ setBreadcrumbs, setSelectedHeader }) {
|
|||||||
fetchPolicy: "network-only",
|
fetchPolicy: "network-only",
|
||||||
nextFetchPolicy: "network-only",
|
nextFetchPolicy: "network-only",
|
||||||
variables: {
|
variables: {
|
||||||
offset: page ? (page - 1) * 25 : 0,
|
offset: page ? (page - 1) * pageLimit : 0,
|
||||||
limit: 25,
|
limit: pageLimit,
|
||||||
order: [
|
order: [
|
||||||
searchObj
|
searchObj
|
||||||
? JSON.parse(searchObj)
|
? JSON.parse(searchObj)
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import {
|
|||||||
setSelectedHeader,
|
setSelectedHeader,
|
||||||
} from "../../redux/application/application.actions";
|
} from "../../redux/application/application.actions";
|
||||||
import ContractsPageComponent from "./contracts.page.component";
|
import ContractsPageComponent from "./contracts.page.component";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)),
|
setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)),
|
||||||
@@ -29,8 +30,8 @@ export function ContractsPageContainer({ setBreadcrumbs, setSelectedHeader }) {
|
|||||||
nextFetchPolicy: "network-only",
|
nextFetchPolicy: "network-only",
|
||||||
variables: {
|
variables: {
|
||||||
search: search || "",
|
search: search || "",
|
||||||
offset: page ? (page - 1) * 25 : 0,
|
offset: page ? (page - 1) * pageLimit : 0,
|
||||||
limit: 25,
|
limit: pageLimit,
|
||||||
order: [
|
order: [
|
||||||
{
|
{
|
||||||
[sortcolumn || "start"]: sortorder
|
[sortcolumn || "start"]: sortorder
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import NotFound from "../../components/not-found/not-found.component";
|
|||||||
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
|
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
|
||||||
import queryString from "query-string";
|
import queryString from "query-string";
|
||||||
import { useLocation } from "react-router-dom";
|
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)),
|
||||||
@@ -41,8 +42,8 @@ export function CourtesyCarDetailPageContainer({
|
|||||||
const { loading, error, data } = useQuery(QUERY_CC_BY_PK, {
|
const { loading, error, data } = useQuery(QUERY_CC_BY_PK, {
|
||||||
variables: {
|
variables: {
|
||||||
id: ccId,
|
id: ccId,
|
||||||
offset: page ? (page - 1) * 25 : 0,
|
offset: page ? (page - 1) * pageLimit : 0,
|
||||||
limit: 25,
|
limit: pageLimit,
|
||||||
order: [
|
order: [
|
||||||
{
|
{
|
||||||
[sortcolumn || "start"]: sortorder
|
[sortcolumn || "start"]: sortorder
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import AlertComponent from "../../components/alert/alert.component";
|
|||||||
import { QUERY_EXPORT_LOG_PAGINATED } from "../../graphql/accounting.queries";
|
import { QUERY_EXPORT_LOG_PAGINATED } from "../../graphql/accounting.queries";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -29,8 +30,8 @@ export function ExportLogsPageComponent({ bodyshop }) {
|
|||||||
nextFetchPolicy: "network-only",
|
nextFetchPolicy: "network-only",
|
||||||
variables: {
|
variables: {
|
||||||
search: search || "",
|
search: search || "",
|
||||||
offset: page ? (page - 1) * 25 : 0,
|
offset: page ? (page - 1) * pageLimit : 0,
|
||||||
limit: 25,
|
limit: pageLimit,
|
||||||
order: [
|
order: [
|
||||||
{
|
{
|
||||||
[sortcolumn || "created_at"]: sortorder
|
[sortcolumn || "created_at"]: sortorder
|
||||||
@@ -178,7 +179,7 @@ export function ExportLogsPageComponent({ bodyshop }) {
|
|||||||
loading={loading}
|
loading={loading}
|
||||||
pagination={{
|
pagination={{
|
||||||
position: "top",
|
position: "top",
|
||||||
pageSize: 25,
|
pageSize: pageLimit,
|
||||||
current: parseInt(page || 1),
|
current: parseInt(page || 1),
|
||||||
total: data && data.search_exportlog_aggregate.aggregate.count,
|
total: data && data.search_exportlog_aggregate.aggregate.count,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import {
|
|||||||
setBreadcrumbs,
|
setBreadcrumbs,
|
||||||
setSelectedHeader,
|
setSelectedHeader,
|
||||||
} from "../../redux/application/application.actions";
|
} from "../../redux/application/application.actions";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
//bodyshop: selectBodyshop,
|
//bodyshop: selectBodyshop,
|
||||||
@@ -33,16 +34,16 @@ export function AllJobs({ setBreadcrumbs, setSelectedHeader }) {
|
|||||||
fetchPolicy: "network-only",
|
fetchPolicy: "network-only",
|
||||||
nextFetchPolicy: "network-only",
|
nextFetchPolicy: "network-only",
|
||||||
variables: {
|
variables: {
|
||||||
offset: page ? (page - 1) * 25 : 0,
|
offset: page ? (page - 1) * pageLimit : 0,
|
||||||
limit: 25,
|
limit: pageLimit,
|
||||||
...(statusFilters ? { statusList: JSON.parse(statusFilters) } : {}),
|
...(statusFilters ? { statusList: JSON.parse(statusFilters) } : {}),
|
||||||
order: [
|
order: [
|
||||||
{
|
{
|
||||||
[sortcolumn || "ro_number"]:
|
[sortcolumn || "ro_number"]:
|
||||||
sortorder && sortorder !== "false"
|
sortorder && sortorder !== "false"
|
||||||
? sortorder === "descend"
|
? (sortorder === "descend"
|
||||||
? "desc"
|
? "desc"
|
||||||
: "asc"
|
: "asc")
|
||||||
: "desc",
|
: "desc",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -3,19 +3,19 @@ import Icon, {
|
|||||||
CalendarFilled,
|
CalendarFilled,
|
||||||
DollarCircleOutlined,
|
DollarCircleOutlined,
|
||||||
FileImageFilled,
|
FileImageFilled,
|
||||||
PrinterFilled,
|
|
||||||
ToolFilled,
|
|
||||||
HistoryOutlined,
|
HistoryOutlined,
|
||||||
|
PrinterFilled,
|
||||||
SyncOutlined,
|
SyncOutlined,
|
||||||
|
ToolFilled,
|
||||||
} from "@ant-design/icons";
|
} from "@ant-design/icons";
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
Divider,
|
Divider,
|
||||||
Form,
|
Form,
|
||||||
notification,
|
|
||||||
PageHeader,
|
PageHeader,
|
||||||
Space,
|
Space,
|
||||||
Tabs,
|
Tabs,
|
||||||
|
notification,
|
||||||
} from "antd";
|
} from "antd";
|
||||||
import Axios from "axios";
|
import Axios from "axios";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
@@ -27,6 +27,7 @@ import { connect } from "react-redux";
|
|||||||
import { useHistory, useLocation } from "react-router-dom";
|
import { useHistory, useLocation } from "react-router-dom";
|
||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import FormFieldsChanged from "../../components/form-fields-changed-alert/form-fields-changed-alert.component";
|
import FormFieldsChanged from "../../components/form-fields-changed-alert/form-fields-changed-alert.component";
|
||||||
|
import JobAuditTrail from "../../components/job-audit-trail/job-audit-trail.component";
|
||||||
import JobsLinesContainer from "../../components/job-detail-lines/job-lines.container";
|
import JobsLinesContainer from "../../components/job-detail-lines/job-lines.container";
|
||||||
import JobLineUpsertModalContainer from "../../components/job-lines-upsert-modal/job-lines-upsert-modal.container";
|
import JobLineUpsertModalContainer from "../../components/job-lines-upsert-modal/job-lines-upsert-modal.container";
|
||||||
import JobReconciliationModal from "../../components/job-reconciliation-modal/job-reconciliation.modal.container";
|
import JobReconciliationModal from "../../components/job-reconciliation-modal/job-reconciliation.modal.container";
|
||||||
@@ -42,19 +43,19 @@ import JobsDetailPliContainer from "../../components/jobs-detail-pli/jobs-detail
|
|||||||
import JobsDetailRates from "../../components/jobs-detail-rates/jobs-detail-rates.component";
|
import JobsDetailRates from "../../components/jobs-detail-rates/jobs-detail-rates.component";
|
||||||
import JobsDetailTotals from "../../components/jobs-detail-totals/jobs-detail-totals.component";
|
import JobsDetailTotals from "../../components/jobs-detail-totals/jobs-detail-totals.component";
|
||||||
import JobsDocumentsGalleryContainer from "../../components/jobs-documents-gallery/jobs-documents-gallery.container";
|
import JobsDocumentsGalleryContainer from "../../components/jobs-documents-gallery/jobs-documents-gallery.container";
|
||||||
|
import JobsDocumentsLocalGallery from "../../components/jobs-documents-local-gallery/jobs-documents-local-gallery.container";
|
||||||
import JobNotesContainer from "../../components/jobs-notes/jobs-notes.container";
|
import JobNotesContainer from "../../components/jobs-notes/jobs-notes.container";
|
||||||
|
import NoteUpsertModalComponent from "../../components/note-upsert-modal/note-upsert-modal.container";
|
||||||
import ScheduleJobModalContainer from "../../components/schedule-job-modal/schedule-job-modal.container";
|
import ScheduleJobModalContainer from "../../components/schedule-job-modal/schedule-job-modal.container";
|
||||||
|
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||||
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
import { selectJobReadOnly } from "../../redux/application/application.selectors";
|
||||||
import { setModalContext } from "../../redux/modals/modals.actions";
|
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import JobAuditTrail from "../../components/job-audit-trail/job-audit-trail.component";
|
|
||||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
|
||||||
import JobsDocumentsLocalGallery from "../../components/jobs-documents-local-gallery/jobs-documents-local-gallery.container";
|
|
||||||
import UndefinedToNull from "../../utils/undefinedtonull";
|
import UndefinedToNull from "../../utils/undefinedtonull";
|
||||||
import NoteUpsertModalComponent from "../../components/note-upsert-modal/note-upsert-modal.container";
|
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import JobProfileDataWarning from "../../components/job-profile-data-warning/job-profile-data-warning.component";
|
import JobProfileDataWarning from "../../components/job-profile-data-warning/job-profile-data-warning.component";
|
||||||
|
import { DateTimeFormat } from "./../../utils/DateFormatter";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -197,17 +198,17 @@ export function JobsDetailPage({
|
|||||||
(meta) => meta && meta.touched
|
(meta) => meta && meta.touched
|
||||||
);
|
);
|
||||||
|
|
||||||
Object.keys(changedAuditFields).forEach((key) => {
|
Object.keys(changedAuditFields).forEach((key) => {
|
||||||
insertAuditTrail({
|
insertAuditTrail({
|
||||||
jobid: job.id,
|
jobid: job.id,
|
||||||
operation: AuditTrailMapping.jobfieldchange(
|
operation: AuditTrailMapping.jobfieldchange(
|
||||||
key,
|
key,
|
||||||
changedAuditFields[key] instanceof moment
|
changedAuditFields[key] instanceof moment
|
||||||
? moment(changedAuditFields[key]).format("MM/DD/YYYY hh:mm a")
|
? DateTimeFormat(changedAuditFields[key])
|
||||||
: changedAuditFields[key]
|
: changedAuditFields[key]
|
||||||
),
|
),
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
await refetch();
|
await refetch();
|
||||||
form.setFieldsValue(transormJobToForm(job));
|
form.setFieldsValue(transormJobToForm(job));
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { selectBodyshop } from "../../redux/user/user.selectors";
|
|||||||
import { DateTimeFormatter, TimeAgoFormatter } from "../../utils/DateFormatter";
|
import { DateTimeFormatter, TimeAgoFormatter } from "../../utils/DateFormatter";
|
||||||
import { alphaSort, dateSort } from "../../utils/sorters";
|
import { alphaSort, dateSort } from "../../utils/sorters";
|
||||||
import useLocalStorage from "../../utils/useLocalStorage";
|
import useLocalStorage from "../../utils/useLocalStorage";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -296,7 +297,7 @@ export function PartsQueuePageComponent({ bodyshop }) {
|
|||||||
loading={loading}
|
loading={loading}
|
||||||
pagination={{
|
pagination={{
|
||||||
position: "top",
|
position: "top",
|
||||||
pageSize: 50,
|
pageSize: pageLimit,
|
||||||
// current: parseInt(page || 1),
|
// current: parseInt(page || 1),
|
||||||
// total: data && data.jobs_aggregate.aggregate.count,
|
// total: data && data.jobs_aggregate.aggregate.count,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import {
|
|||||||
setSelectedHeader,
|
setSelectedHeader,
|
||||||
} from "../../redux/application/application.actions";
|
} from "../../redux/application/application.actions";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -34,8 +35,8 @@ export function AllJobs({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
|
|||||||
fetchPolicy: "network-only",
|
fetchPolicy: "network-only",
|
||||||
nextFetchPolicy: "network-only",
|
nextFetchPolicy: "network-only",
|
||||||
variables: {
|
variables: {
|
||||||
offset: page ? (page - 1) * 25 : 0,
|
offset: page ? (page - 1) * pageLimit : 0,
|
||||||
limit: 25,
|
limit: pageLimit,
|
||||||
order: [
|
order: [
|
||||||
searchObj
|
searchObj
|
||||||
? JSON.parse(searchObj)
|
? JSON.parse(searchObj)
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import {
|
|||||||
import ChatOpenButton from "../../components/chat-open-button/chat-open-button.component";
|
import ChatOpenButton from "../../components/chat-open-button/chat-open-button.component";
|
||||||
import { alphaSort } from "../../utils/sorters";
|
import { alphaSort } from "../../utils/sorters";
|
||||||
import { HasRbacAccess } from "../../components/rbac-wrapper/rbac-wrapper.component";
|
import { HasRbacAccess } from "../../components/rbac-wrapper/rbac-wrapper.component";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -35,8 +36,8 @@ export function PhonebookPageComponent({ bodyshop, authLevel }) {
|
|||||||
nextFetchPolicy: "network-only",
|
nextFetchPolicy: "network-only",
|
||||||
variables: {
|
variables: {
|
||||||
search: search || "",
|
search: search || "",
|
||||||
offset: page ? (page - 1) * 25 : 0,
|
offset: page ? (page - 1) * pageLimit : 0,
|
||||||
limit: 25,
|
limit: pageLimit,
|
||||||
order: [
|
order: [
|
||||||
{
|
{
|
||||||
[sortcolumn || "lastname"]: sortorder
|
[sortcolumn || "lastname"]: sortorder
|
||||||
@@ -189,7 +190,7 @@ export function PhonebookPageComponent({ bodyshop, authLevel }) {
|
|||||||
loading={loading}
|
loading={loading}
|
||||||
pagination={{
|
pagination={{
|
||||||
position: "top",
|
position: "top",
|
||||||
pageSize: 25,
|
pageSize: pageLimit,
|
||||||
current: parseInt(page || 1),
|
current: parseInt(page || 1),
|
||||||
total: data && data.search_phonebook_aggregate.aggregate.count,
|
total: data && data.search_phonebook_aggregate.aggregate.count,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import {
|
|||||||
} from "../../redux/application/application.actions";
|
} from "../../redux/application/application.actions";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
|
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
|
||||||
|
import {pageLimit} from "../../utils/config";
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
});
|
});
|
||||||
@@ -42,8 +43,8 @@ export function ShopCsiContainer({
|
|||||||
nextFetchPolicy: "network-only",
|
nextFetchPolicy: "network-only",
|
||||||
variables: {
|
variables: {
|
||||||
//search: search || "",
|
//search: search || "",
|
||||||
offset: page ? (page - 1) * 25 : 0,
|
offset: page ? (page - 1) * pageLimit : 0,
|
||||||
limit: 25,
|
limit: pageLimit,
|
||||||
order: [
|
order: [
|
||||||
{
|
{
|
||||||
[sortcolumn || "completedon"]: sortorder
|
[sortcolumn || "completedon"]: sortorder
|
||||||
|
|||||||
@@ -56,13 +56,13 @@
|
|||||||
"history": "History",
|
"history": "History",
|
||||||
"inproduction": "Jobs In Production",
|
"inproduction": "Jobs In Production",
|
||||||
"manualevent": "Add Manual Appointment",
|
"manualevent": "Add Manual Appointment",
|
||||||
"noarrivingjobs": "No jobs are arriving.",
|
"noarrivingjobs": "No Jobs are arriving.",
|
||||||
"nocompletingjobs": "No jobs scheduled for completion.",
|
"nocompletingjobs": "No Jobs scheduled for completion.",
|
||||||
"nodateselected": "No date has been selected.",
|
"nodateselected": "No date has been selected.",
|
||||||
"priorappointments": "Previous Appointments",
|
"priorappointments": "Previous Appointments",
|
||||||
"reminder": "This is {{shopname}} reminding you about an appointment on {{date}} at {{time}}. Please let us know if you are not able to make the appointment. We look forward to seeing you soon. ",
|
"reminder": "This is {{shopname}} reminding you about an appointment on {{date}} at {{time}}. Please let us know if you are not able to make the appointment. We look forward to seeing you soon. ",
|
||||||
"scheduledfor": "Scheduled appointment for: ",
|
"scheduledfor": "Scheduled appointment for: ",
|
||||||
"severalerrorsfound": "Several jobs have issues which may prevent accurate smart scheduling. Click to expand.",
|
"severalerrorsfound": "Several Jobs have issues which may prevent accurate smart scheduling. Click to expand.",
|
||||||
"smartscheduling": "Smart Scheduling",
|
"smartscheduling": "Smart Scheduling",
|
||||||
"smspaymentreminder": "This is {{shopname}} reminding you about your remaining balance of {{amount}}. To pay for the said balance click the link {{payment_link}}.",
|
"smspaymentreminder": "This is {{shopname}} reminding you about your remaining balance of {{amount}}. To pay for the said balance click the link {{payment_link}}.",
|
||||||
"suggesteddates": "Suggested Dates"
|
"suggesteddates": "Suggested Dates"
|
||||||
@@ -105,6 +105,8 @@
|
|||||||
"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}}.",
|
||||||
|
"appointmentcancel": "Appointment canceled. Lost Reason: {{lost_sale_reason}}.",
|
||||||
|
"appointmentinsert": "Appointment created. Appointment Date: {{start}}.",
|
||||||
"billposted": "Bill with invoice number {{invoice_number}} posted.",
|
"billposted": "Bill with invoice number {{invoice_number}} posted.",
|
||||||
"billupdated": "Bill with invoice number {{invoice_number}} updated.",
|
"billupdated": "Bill with invoice number {{invoice_number}} updated.",
|
||||||
"failedpayment": "Failed payment attempt.",
|
"failedpayment": "Failed payment attempt.",
|
||||||
@@ -117,11 +119,11 @@
|
|||||||
"jobinproductionchange": "Job production status set to {{inproduction}}",
|
"jobinproductionchange": "Job production status set to {{inproduction}}",
|
||||||
"jobioucreated": "IOU Created.",
|
"jobioucreated": "IOU Created.",
|
||||||
"jobmodifylbradj": "Labor adjustments modified {{mod_lbr_ty}} / {{hours}}.",
|
"jobmodifylbradj": "Labor adjustments modified {{mod_lbr_ty}} / {{hours}}.",
|
||||||
"jobnoteadded": "Note added to job.",
|
"jobnoteadded": "Note added to Job.",
|
||||||
"jobnotedeleted": "Note deleted from job.",
|
"jobnotedeleted": "Note deleted from Job.",
|
||||||
"jobnoteupdated": "Note updated on job.",
|
"jobnoteupdated": "Note updated on Job.",
|
||||||
"jobspartsorder": "Parts order {{order_number}} added to job.",
|
"jobspartsorder": "Parts order {{order_number}} added to Job.",
|
||||||
"jobspartsreturn": "Parts return {{order_number}} added to job.",
|
"jobspartsreturn": "Parts return {{order_number}} added to Job.",
|
||||||
"jobstatuschange": "Job status changed to {{status}}.",
|
"jobstatuschange": "Job status changed to {{status}}.",
|
||||||
"jobsupplement": "Job supplement imported."
|
"jobsupplement": "Job supplement imported."
|
||||||
}
|
}
|
||||||
@@ -212,7 +214,7 @@
|
|||||||
"markforreexport": "Mark for Re-export",
|
"markforreexport": "Mark for Re-export",
|
||||||
"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.",
|
||||||
"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",
|
||||||
@@ -351,6 +353,9 @@
|
|||||||
},
|
},
|
||||||
"md_payment_types": "Payment Types",
|
"md_payment_types": "Payment Types",
|
||||||
"md_referral_sources": "Referral Sources",
|
"md_referral_sources": "Referral Sources",
|
||||||
|
"md_functionality_toggles": {
|
||||||
|
"parts_queue_toggle": "Auto Add Imported/Supplemented Jobs to Parts Queue"
|
||||||
|
},
|
||||||
"md_tasks_presets": {
|
"md_tasks_presets": {
|
||||||
"enable_tasks": "Enable Hour Flagging",
|
"enable_tasks": "Enable Hour Flagging",
|
||||||
"hourstype": "Hour Types",
|
"hourstype": "Hour Types",
|
||||||
@@ -666,7 +671,7 @@
|
|||||||
"printall": "Print All Documents"
|
"printall": "Print All Documents"
|
||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"complete": "Error during job checklist completion. {{error}}",
|
"complete": "Error during Job checklist completion. {{error}}",
|
||||||
"nochecklist": "No checklist has been configured for your shop. "
|
"nochecklist": "No checklist has been configured for your shop. "
|
||||||
},
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
@@ -674,7 +679,7 @@
|
|||||||
"allow_text_message": "Permission to Text?",
|
"allow_text_message": "Permission to Text?",
|
||||||
"checklist": "Checklist",
|
"checklist": "Checklist",
|
||||||
"printpack": "Job Intake Print Pack",
|
"printpack": "Job Intake Print Pack",
|
||||||
"removefromproduction": "Remove job from production?"
|
"removefromproduction": "Remove Job from Production?"
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
"completed": "Job checklist completed."
|
"completed": "Job checklist completed."
|
||||||
@@ -690,9 +695,9 @@
|
|||||||
"senddltoform": "Insert Driver's License Information"
|
"senddltoform": "Insert Driver's License Information"
|
||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"fetchingjobinfo": "Error fetching job info. {{error}}.",
|
"fetchingjobinfo": "Error fetching Job Info. {{error}}.",
|
||||||
"returning": "Error returning courtesy car. {{error}}",
|
"returning": "Error returning Courtesy Car. {{error}}",
|
||||||
"saving": "Error saving contract. {{error}}",
|
"saving": "Error saving Contract. {{error}}",
|
||||||
"selectjobandcar": "Please ensure both a car and job are selected."
|
"selectjobandcar": "Please ensure both a car and job are selected."
|
||||||
},
|
},
|
||||||
"fields": {
|
"fields": {
|
||||||
@@ -749,7 +754,7 @@
|
|||||||
"driverinformation": "Driver's Information",
|
"driverinformation": "Driver's Information",
|
||||||
"findcontract": "Find Contract",
|
"findcontract": "Find Contract",
|
||||||
"findermodal": "Contract Finder",
|
"findermodal": "Contract Finder",
|
||||||
"noteconvertedfrom": "R.O. created from converted Courtesy Car Contract {{agreementnumber}}.",
|
"noteconvertedfrom": "R.O. created from converted Courtesy Car Contract {{agreementnumber}}.",
|
||||||
"populatefromjob": "Populate from Job",
|
"populatefromjob": "Populate from Job",
|
||||||
"rates": "Contract Rates",
|
"rates": "Contract Rates",
|
||||||
"time": "Time",
|
"time": "Time",
|
||||||
@@ -771,7 +776,7 @@
|
|||||||
"return": "Return Car"
|
"return": "Return Car"
|
||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"saving": "Error saving courtesy card. {{error}}"
|
"saving": "Error saving Courtesy Car. {{error}}"
|
||||||
},
|
},
|
||||||
"fields": {
|
"fields": {
|
||||||
"color": "Color",
|
"color": "Color",
|
||||||
@@ -868,14 +873,16 @@
|
|||||||
"refhrs": "Refinish Hrs"
|
"refhrs": "Refinish Hrs"
|
||||||
},
|
},
|
||||||
"titles": {
|
"titles": {
|
||||||
|
"labhours": "Total Body Hours",
|
||||||
|
"larhours": "Total Refinish Hours",
|
||||||
"monthlyemployeeefficiency": "Monthly Employee Efficiency",
|
"monthlyemployeeefficiency": "Monthly Employee Efficiency",
|
||||||
"monthlyjobcosting": "Monthly Job Costing ",
|
"monthlyjobcosting": "Monthly Job Costing ",
|
||||||
"monthlylaborsales": "Monthly Labor Sales",
|
"monthlylaborsales": "Monthly Labor Sales",
|
||||||
"monthlypartssales": "Monthly Parts Sales",
|
"monthlypartssales": "Monthly Parts Sales",
|
||||||
"monthlyrevenuegraph": "Monthly Revenue Graph",
|
"monthlyrevenuegraph": "Monthly Revenue Graph",
|
||||||
"prodhrssummary": "Production Hours Summary",
|
"prodhrssummary": "Production Hours Summary",
|
||||||
"productiondollars": "Total dollars in Production",
|
"productiondollars": "Total Dollars in Production",
|
||||||
"productionhours": "Total hours in Production",
|
"productionhours": "Total Hours in Production",
|
||||||
"projectedmonthlysales": "Projected Monthly Sales",
|
"projectedmonthlysales": "Projected Monthly Sales",
|
||||||
"scheduledintoday": "Sheduled In Today: {{date}}",
|
"scheduledintoday": "Sheduled In Today: {{date}}",
|
||||||
"scheduledouttoday": "Sheduled Out Today: {{date}}"
|
"scheduledouttoday": "Sheduled Out Today: {{date}}"
|
||||||
@@ -920,7 +927,7 @@
|
|||||||
"upload_limitexceeded": "Uploading all selected documents will exceed the job storage limit for your shop. ",
|
"upload_limitexceeded": "Uploading all selected documents will exceed the job storage limit for your shop. ",
|
||||||
"upload_limitexceeded_title": "Unable to upload document(s)",
|
"upload_limitexceeded_title": "Unable to upload document(s)",
|
||||||
"uploading": "Uploading...",
|
"uploading": "Uploading...",
|
||||||
"usage": "of job storage used. ({{used}} / {{total}})"
|
"usage": "of Job storage used. ({{used}} / {{total}})"
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
"delete": "Document(s) deleted successfully.",
|
"delete": "Document(s) deleted successfully.",
|
||||||
@@ -1247,6 +1254,7 @@
|
|||||||
"act_price": "Retail Price",
|
"act_price": "Retail Price",
|
||||||
"ah_detail_line": "Mark as Detail Labor Line (Autohouse Only)",
|
"ah_detail_line": "Mark as Detail Labor Line (Autohouse Only)",
|
||||||
"assigned_team": "Team {{name}}",
|
"assigned_team": "Team {{name}}",
|
||||||
|
"create_ppc": "Create PPC?",
|
||||||
"db_price": "List Price",
|
"db_price": "List Price",
|
||||||
"lbr_types": {
|
"lbr_types": {
|
||||||
"LA1": "LA1",
|
"LA1": "LA1",
|
||||||
@@ -1386,28 +1394,28 @@
|
|||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"addingtoproduction": "Error adding to production. {{error}}",
|
"addingtoproduction": "Error adding to production. {{error}}",
|
||||||
"cannotintake": "Intake cannot be completed for this job. It has either already been completed or the job is already here.",
|
"cannotintake": "Intake cannot be completed for this Job. It has either already been completed or the job is already here.",
|
||||||
"closing": "Error closing job. {{error}}",
|
"closing": "Error closing Job. {{error}}",
|
||||||
"creating": "Error encountered while creating job. {{error}}",
|
"creating": "Error encountered while creating job. {{error}}",
|
||||||
"deleted": "Error deleting job. {{error}}",
|
"deleted": "Error deleting Job. {{error}}",
|
||||||
"exporting": "Error exporting job. {{error}}",
|
"exporting": "Error exporting Job. {{error}}",
|
||||||
"exporting-partner": "Unable to connect to Rome Partner. Please ensure it is running and logged in.",
|
"exporting-partner": "Unable to connect to Rome Partner. Please ensure it is running and logged in.",
|
||||||
"invoicing": "Error invoicing job. {{error}}",
|
"invoicing": "Error invoicing Job. {{error}}",
|
||||||
"noaccess": "This job does not exist or you do not have access to it.",
|
"noaccess": "This Job does not exist or you do not have access to it.",
|
||||||
"nodamage": "No damage points on estimate.",
|
"nodamage": "No damage points on estimate.",
|
||||||
"nodates": "No dates specified for this job.",
|
"nodates": "No dates specified for this Job.",
|
||||||
"nofinancial": "No financial data has been calculated yet for this job. Please save it again.",
|
"nofinancial": "No financial data has been calculated yet for this job. Please save it again.",
|
||||||
"nojobselected": "No job is selected.",
|
"nojobselected": "No Job is selected.",
|
||||||
"noowner": "No owner associated.",
|
"noowner": "No owner associated.",
|
||||||
"novehicle": "No vehicle associated.",
|
"novehicle": "No vehicle associated.",
|
||||||
"partspricechange": "Error sending parts price change. {{error}}.",
|
"partspricechange": "Error sending parts price change. {{error}}.",
|
||||||
"saving": "Error encountered while saving record.",
|
"saving": "Error encountered while saving record.",
|
||||||
"scanimport": "Error importing job. {{message}}",
|
"scanimport": "Error importing Job. {{message}}",
|
||||||
"totalscalc": "Error while calculating new job totals.",
|
"totalscalc": "Error while calculating new Job totals.",
|
||||||
"updating": "Error while updating job(s). {{error}}",
|
"updating": "Error while updating Job(s). {{error}}",
|
||||||
"validation": "Please ensure all fields are entered correctly.",
|
"validation": "Please ensure all fields are entered correctly.",
|
||||||
"validationtitle": "Validation Error",
|
"validationtitle": "Validation Error",
|
||||||
"voiding": "Error voiding job. {{error}}"
|
"voiding": "Error voiding Job. {{error}}"
|
||||||
},
|
},
|
||||||
"fields": {
|
"fields": {
|
||||||
"actual_completion": "Actual Completion",
|
"actual_completion": "Actual Completion",
|
||||||
@@ -1480,6 +1488,7 @@
|
|||||||
"date_exported": "Exported",
|
"date_exported": "Exported",
|
||||||
"date_invoiced": "Invoiced",
|
"date_invoiced": "Invoiced",
|
||||||
"date_last_contacted": "Last Contacted Date",
|
"date_last_contacted": "Last Contacted Date",
|
||||||
|
"date_lost_sale": "Lost Sale",
|
||||||
"date_next_contact": "Next Contact Date",
|
"date_next_contact": "Next Contact Date",
|
||||||
"date_open": "Open",
|
"date_open": "Open",
|
||||||
"date_rentalresp": "Shop Rental Responsibility Start",
|
"date_rentalresp": "Shop Rental Responsibility Start",
|
||||||
@@ -1721,9 +1730,9 @@
|
|||||||
"adminwarning": "Use the functionality on this page at your own risk. You are responsible for any and all changes to your data.",
|
"adminwarning": "Use the functionality on this page at your own risk. You are responsible for any and all changes to your data.",
|
||||||
"allocations": "Allocations",
|
"allocations": "Allocations",
|
||||||
"alreadyaddedtoscoreboard": "Job has already been added to scoreboard. Saving will update the previous entry.",
|
"alreadyaddedtoscoreboard": "Job has already been added to scoreboard. Saving will update the previous entry.",
|
||||||
"alreadyclosed": "This job has already been closed.",
|
"alreadyclosed": "This Job has already been closed.",
|
||||||
"appointmentconfirmation": "Send confirmation to customer?",
|
"appointmentconfirmation": "Send confirmation to customer?",
|
||||||
"associationwarning": "Any changes to associations will require updating the data from the new parent record to the job.",
|
"associationwarning": "Any changes to associations will require updating the data from the new parent record to the Job.",
|
||||||
"audit": "Audit Trail",
|
"audit": "Audit Trail",
|
||||||
"available": "Available",
|
"available": "Available",
|
||||||
"availablejobs": "Available Jobs",
|
"availablejobs": "Available Jobs",
|
||||||
@@ -1731,7 +1740,7 @@
|
|||||||
"days": "Days",
|
"days": "Days",
|
||||||
"rate": "PVRT Rate"
|
"rate": "PVRT Rate"
|
||||||
},
|
},
|
||||||
"ca_gst_all_if_null": "If the job is marked as a \"GST Registrant\" and this value is set to $0, the customer will be responsible for paying all of the GST by default. ",
|
"ca_gst_all_if_null": "If the Job is marked as a \"GST Registrant\" and this value is set to $0, the customer will be responsible for paying all of the GST by default. ",
|
||||||
"calc_repair_days": "Calculated Repair Days",
|
"calc_repair_days": "Calculated Repair Days",
|
||||||
"calc_repair_days_tt": "This is the approximate number of days required to complete the repair according to the target touch time in your shop configuration (current set to {{target_touchtime}}).",
|
"calc_repair_days_tt": "This is the approximate number of days required to complete the repair according to the target touch time in your shop configuration (current set to {{target_touchtime}}).",
|
||||||
"cards": {
|
"cards": {
|
||||||
@@ -1747,7 +1756,7 @@
|
|||||||
"totals": "Totals",
|
"totals": "Totals",
|
||||||
"vehicle": "Vehicle"
|
"vehicle": "Vehicle"
|
||||||
},
|
},
|
||||||
"changeclass": "Changing the job's class can have fundamental impacts to already exported accounting items. Are you sure you want to do this?",
|
"changeclass": "Changing the Job's class can have fundamental impacts to already exported accounting items. Are you sure you want to do this?",
|
||||||
"checklistcompletedby": "Checklist completed by {{by}} at {{at}}",
|
"checklistcompletedby": "Checklist completed by {{by}} at {{at}}",
|
||||||
"checklistdocuments": "Checklist Documents",
|
"checklistdocuments": "Checklist Documents",
|
||||||
"checklists": "Checklists",
|
"checklists": "Checklists",
|
||||||
@@ -1774,12 +1783,12 @@
|
|||||||
"vehicleinfo": "Vehicle Info"
|
"vehicleinfo": "Vehicle Info"
|
||||||
},
|
},
|
||||||
"createiouwarning": "Are you sure you want to create an IOU for these lines? A new RO will be created based on those lines for this customer.",
|
"createiouwarning": "Are you sure you want to create an IOU for these lines? A new RO will be created based on those lines for this customer.",
|
||||||
"creating_new_job": "Creating new job...",
|
"creating_new_job": "Creating new Job...",
|
||||||
"deductible": {
|
"deductible": {
|
||||||
"stands": "Stands",
|
"stands": "Stands",
|
||||||
"waived": "Waived"
|
"waived": "Waived"
|
||||||
},
|
},
|
||||||
"deleteconfirm": "Are you sure you want to delete this job? This cannot be undone. ",
|
"deleteconfirm": "Are you sure you want to delete this Job? This cannot be undone. ",
|
||||||
"deletedelivery": "Delete Delivery Checklist",
|
"deletedelivery": "Delete Delivery Checklist",
|
||||||
"deleteintake": "Delete Intake Checklist",
|
"deleteintake": "Delete Intake Checklist",
|
||||||
"deliverchecklist": "Deliver Checklist",
|
"deliverchecklist": "Deliver Checklist",
|
||||||
@@ -1800,7 +1809,7 @@
|
|||||||
"documents": "Documents",
|
"documents": "Documents",
|
||||||
"documents-images": "Images",
|
"documents-images": "Images",
|
||||||
"documents-other": "Other Documents",
|
"documents-other": "Other Documents",
|
||||||
"duplicateconfirm": "Are you sure you want to duplicate this job? Some elements of this job will not be duplicated.",
|
"duplicateconfirm": "Are you sure you want to duplicate this Job? Some elements of this Job will not be duplicated.",
|
||||||
"emailaudit": "Email Audit Trail",
|
"emailaudit": "Email Audit Trail",
|
||||||
"employeeassignments": "Employee Assignments",
|
"employeeassignments": "Employee Assignments",
|
||||||
"estimatelines": "Estimate Lines",
|
"estimatelines": "Estimate Lines",
|
||||||
@@ -1811,7 +1820,7 @@
|
|||||||
"gppercent": "% G.P.",
|
"gppercent": "% G.P.",
|
||||||
"hrs_claimed": "Hours Flagged",
|
"hrs_claimed": "Hours Flagged",
|
||||||
"hrs_total": "Hours Total",
|
"hrs_total": "Hours Total",
|
||||||
"importnote": "The job was initially imported.",
|
"importnote": "The Job was initially imported.",
|
||||||
"inproduction": "In Production",
|
"inproduction": "In Production",
|
||||||
"intakechecklist": "Intake Checklist",
|
"intakechecklist": "Intake Checklist",
|
||||||
"iou": "IOU",
|
"iou": "IOU",
|
||||||
@@ -1848,9 +1857,9 @@
|
|||||||
"calculatedcreditsnotreceived": "The calculated credits not received is derived by subtracting the amount of credit memos entered from the <b>retail</b> total of returns created. This does not take into account whether the credit was marked as received. You can find more information <a href=\"https://help.imex.online/en/article/credits-not-received-changes-1jy9snw\" target=\"_blank\">here</a>.",
|
"calculatedcreditsnotreceived": "The calculated credits not received is derived by subtracting the amount of credit memos entered from the <b>retail</b> total of returns created. This does not take into account whether the credit was marked as received. You can find more information <a href=\"https://help.imex.online/en/article/credits-not-received-changes-1jy9snw\" target=\"_blank\">here</a>.",
|
||||||
"creditmemos": "The total <b>retail</b> amount of all returns created. This amount does not reflect credit memos that have been posted.",
|
"creditmemos": "The total <b>retail</b> amount of all returns created. This amount does not reflect credit memos that have been posted.",
|
||||||
"creditsnotreceived": "This total reflects the total <b>retail</b> of parts returns lines that have not been explicitly marked as returned when posting a credit memo. You can learn more about this here <a href=\"https://help.imex.online/en/article/credits-not-received-changes-1jy9snw\" target=\"_blank\">here</a>. ",
|
"creditsnotreceived": "This total reflects the total <b>retail</b> of parts returns lines that have not been explicitly marked as returned when posting a credit memo. You can learn more about this here <a href=\"https://help.imex.online/en/article/credits-not-received-changes-1jy9snw\" target=\"_blank\">here</a>. ",
|
||||||
"discrep1": "If the discrepancy is not $0, you may have one of the following: <br/><br/>\n\n<ul>\n<li>Too many bills/bill lines that have been posted against this RO. Check to make sure every bill posted on this RO is correctly posted and assigned.</li>\n<li>You do not have the latest supplement imported, or, a supplement must be submitted and then imported.</li>\n<li>You have posted a bill line to labor.</li>\n</ul>\n<br/>\n<i>There may be additional issues not listed above that prevent this job from reconciling.</i>",
|
"discrep1": "If the discrepancy is not $0, you may have one of the following: <br/><br/>\n\n<ul>\n<li>Too many bills/bill lines that have been posted against this RO. Check to make sure every bill posted on this RO is correctly posted and assigned.</li>\n<li>You do not have the latest supplement imported, or, a supplement must be submitted and then imported.</li>\n<li>You have posted a bill line to labor.</li>\n</ul>\n<br/>\n<i>There may be additional issues not listed above that prevent this Job from reconciling.</i>",
|
||||||
"discrep2": "If the discrepancy is not $0, you may have one of the following: <br/><br/>\n\n<ul>\n<li>Used an incorrect rate when deducting from labor.</li>\n<li>An outstanding imbalance higher in the reconciliation process.</li>\n</ul>\n<br/>\n<i>There may be additional issues not listed above that prevent this job from reconciling.</i>",
|
"discrep2": "If the discrepancy is not $0, you may have one of the following: <br/><br/>\n\n<ul>\n<li>Used an incorrect rate when deducting from labor.</li>\n<li>An outstanding imbalance higher in the reconciliation process.</li>\n</ul>\n<br/>\n<i>There may be additional issues not listed above that prevent this Job from reconciling.</i>",
|
||||||
"discrep3": "If the discrepancy is not $0, you may have one of the following: <br/><br/>\n\n<ul>\n<li>A parts order return has not been created.</li>\n<li>An outstanding imbalance higher in the reconciliation process.</li>\n</ul>\n<br/>\n<i>There may be additional issues not listed above that prevent this job from reconciling.</i>",
|
"discrep3": "If the discrepancy is not $0, you may have one of the following: <br/><br/>\n\n<ul>\n<li>A parts order return has not been created.</li>\n<li>An outstanding imbalance higher in the reconciliation process.</li>\n</ul>\n<br/>\n<i>There may be additional issues not listed above that prevent this Job from reconciling.</i>",
|
||||||
"laboradj": "The sum of all bill lines that deducted from labor hours, rather than part prices.",
|
"laboradj": "The sum of all bill lines that deducted from labor hours, rather than part prices.",
|
||||||
"partstotal": "This is the total of all parts and sublet amounts on the vehicle (some of these may require an in-house invoice).<br/>\nItems such as shop and paint materials, labor online lines, etc. are not included in this total.",
|
"partstotal": "This is the total of all parts and sublet amounts on the vehicle (some of these may require an in-house invoice).<br/>\nItems such as shop and paint materials, labor online lines, etc. are not included in this total.",
|
||||||
"totalreturns": "The total <b>retail</b> amount of returns created for this job."
|
"totalreturns": "The total <b>retail</b> amount of returns created for this job."
|
||||||
@@ -1881,13 +1890,13 @@
|
|||||||
"sale_parts": "Sales - Parts",
|
"sale_parts": "Sales - Parts",
|
||||||
"sale_sublet": "Sales - Sublet",
|
"sale_sublet": "Sales - Sublet",
|
||||||
"sales": "Sales",
|
"sales": "Sales",
|
||||||
"savebeforeconversion": "You have unsaved changes on the job. Please save them before converting it. ",
|
"savebeforeconversion": "You have unsaved changes on the Job. Please save them before converting it. ",
|
||||||
"scheduledinchange": "The scheduled in is based off the latest appointment. To change this date, please schedule or reschedule the job. ",
|
"scheduledinchange": "The scheduled in is based off the latest appointment. To change this date, please schedule or reschedule the Job. ",
|
||||||
"specialcoveragepolicy": "Special Coverage Policy Applies",
|
"specialcoveragepolicy": "Special Coverage Policy Applies",
|
||||||
"state_tax_amt": "State Taxes",
|
"state_tax_amt": "State Taxes",
|
||||||
"subletstotal": "Sublets Total",
|
"subletstotal": "Sublets Total",
|
||||||
"subtotal": "Subtotal",
|
"subtotal": "Subtotal",
|
||||||
"supplementnote": "The job had a supplement imported.",
|
"supplementnote": "The Job had a supplement imported.",
|
||||||
"suspended": "SUSPENDED",
|
"suspended": "SUSPENDED",
|
||||||
"suspense": "Suspense",
|
"suspense": "Suspense",
|
||||||
"threshhold": "Max Threshold: ${{amount}}",
|
"threshhold": "Max Threshold: ${{amount}}",
|
||||||
@@ -1897,16 +1906,16 @@
|
|||||||
"total_sales": "Total Sales",
|
"total_sales": "Total Sales",
|
||||||
"total_sales_tax": "Total Sales Tax",
|
"total_sales_tax": "Total Sales Tax",
|
||||||
"totals": "Totals",
|
"totals": "Totals",
|
||||||
"unvoidnote": "This job was unvoided.",
|
"unvoidnote": "This Job was unvoided.",
|
||||||
"vehicle_info": "Vehicle",
|
"vehicle_info": "Vehicle",
|
||||||
"vehicleassociation": "Vehicle Association",
|
"vehicleassociation": "Vehicle Association",
|
||||||
"viewallocations": "View Allocations",
|
"viewallocations": "View Allocations",
|
||||||
"voidjob": "Are you sure you want to void this job? This cannot be easily undone. ",
|
"voidjob": "Are you sure you want to void this Job? This cannot be easily undone. ",
|
||||||
"voidnote": "This job was voided."
|
"voidnote": "This Job was voided."
|
||||||
},
|
},
|
||||||
"successes": {
|
"successes": {
|
||||||
"addedtoproduction": "Job added to production board.",
|
"addedtoproduction": "Job added to production board.",
|
||||||
"all_deleted": "{{count}} jobs deleted successfully.",
|
"all_deleted": "{{count}} Jobs deleted successfully.",
|
||||||
"closed": "Job closed successfully.",
|
"closed": "Job closed successfully.",
|
||||||
"converted": "Job converted successfully.",
|
"converted": "Job converted successfully.",
|
||||||
"created": "Job created successfully. Click to view.",
|
"created": "Job created successfully. Click to view.",
|
||||||
@@ -2085,7 +2094,7 @@
|
|||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"invalidphone": "The phone number is invalid. Unable to open conversation. ",
|
"invalidphone": "The phone number is invalid. Unable to open conversation. ",
|
||||||
"noattachedjobs": "No jobs have been associated to this conversation. ",
|
"noattachedjobs": "No Jobs have been associated to this conversation. ",
|
||||||
"updatinglabel": "Error updating label. {{error}}"
|
"updatinglabel": "Error updating label. {{error}}"
|
||||||
},
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
@@ -2094,7 +2103,7 @@
|
|||||||
"maxtenimages": "You can only select up to a maximum of 10 images at a time.",
|
"maxtenimages": "You can only select up to a maximum of 10 images at a time.",
|
||||||
"messaging": "Messaging",
|
"messaging": "Messaging",
|
||||||
"noallowtxt": "This customer has not indicated their permission to be messaged.",
|
"noallowtxt": "This customer has not indicated their permission to be messaged.",
|
||||||
"nojobs": "Not associated to any job.",
|
"nojobs": "Not associated to any Job.",
|
||||||
"nopush": "Polling Mode Enabled",
|
"nopush": "Polling Mode Enabled",
|
||||||
"phonenumber": "Phone #",
|
"phonenumber": "Phone #",
|
||||||
"presets": "Presets",
|
"presets": "Presets",
|
||||||
@@ -2282,7 +2291,7 @@
|
|||||||
"parts_orders": "Parts Orders",
|
"parts_orders": "Parts Orders",
|
||||||
"print": "Show Printed Form",
|
"print": "Show Printed Form",
|
||||||
"receive": "Receive Parts Order",
|
"receive": "Receive Parts Order",
|
||||||
"removefrompartsqueue": "Remove from Parts Queue?",
|
"removefrompartsqueue": "Unqueue from Parts Queue?",
|
||||||
"returnpartsorder": "Return Parts Order",
|
"returnpartsorder": "Return Parts Order",
|
||||||
"sublet_order": "Sublet Order"
|
"sublet_order": "Sublet Order"
|
||||||
},
|
},
|
||||||
@@ -2539,15 +2548,15 @@
|
|||||||
"unsuspend": "Unsuspend"
|
"unsuspend": "Unsuspend"
|
||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"boardupdate": "Error encountered updating job. {{message}}",
|
"boardupdate": "Error encountered updating Job. {{message}}",
|
||||||
"removing": "Error removing from production board. {{error}}",
|
"removing": "Error removing from production board. {{error}}",
|
||||||
"settings": "Error saving board settings: {{error}}"
|
"settings": "Error saving board settings: {{error}}"
|
||||||
},
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
"actual_in": "Actual In",
|
"actual_in": "Actual In",
|
||||||
"alert": "Alert",
|
"alert": "Alert",
|
||||||
"alertoff": "Remove alert from job",
|
"alertoff": "Remove alert from Job",
|
||||||
"alerton": "Add alert to job",
|
"alerton": "Add alert to Job",
|
||||||
"ats": "Alternative Transportation",
|
"ats": "Alternative Transportation",
|
||||||
"bodyhours": "B",
|
"bodyhours": "B",
|
||||||
"bodypriority": "B/P",
|
"bodypriority": "B/P",
|
||||||
@@ -2691,6 +2700,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",
|
||||||
|
"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",
|
||||||
"open_orders_estimator": "Open Orders by Estimator",
|
"open_orders_estimator": "Open Orders by Estimator",
|
||||||
@@ -2761,9 +2771,9 @@
|
|||||||
"edit": "Edit"
|
"edit": "Edit"
|
||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"adding": "Error adding job to scoreboard. {{message}}",
|
"adding": "Error adding Job to Scoreboard. {{message}}",
|
||||||
"removing": "Error removing job from scoreboard. {{message}}",
|
"removing": "Error removing Job from Scoreboard. {{message}}",
|
||||||
"updating": "Error updating scoreboard. {{message}}"
|
"updating": "Error updating Scoreboard. {{message}}"
|
||||||
},
|
},
|
||||||
"fields": {
|
"fields": {
|
||||||
"bodyhrs": "Body Hours",
|
"bodyhrs": "Body Hours",
|
||||||
@@ -2868,7 +2878,7 @@
|
|||||||
"task_name": "Task"
|
"task_name": "Task"
|
||||||
},
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
"alreadyclockedon": "You are already clocked in to the following job(s):",
|
"alreadyclockedon": "You are already clocked in to the following Job(s):",
|
||||||
"ambreak": "AM Break",
|
"ambreak": "AM Break",
|
||||||
"amshift": "AM Shift",
|
"amshift": "AM Shift",
|
||||||
"claimtaskpreview": "Flagged Hours Preview",
|
"claimtaskpreview": "Flagged Hours Preview",
|
||||||
|
|||||||
@@ -104,6 +104,8 @@
|
|||||||
"admin_jobmarkforreexport": "",
|
"admin_jobmarkforreexport": "",
|
||||||
"admin_jobuninvoice": "",
|
"admin_jobuninvoice": "",
|
||||||
"admin_jobunvoid": "",
|
"admin_jobunvoid": "",
|
||||||
|
"appointmentcancel": "",
|
||||||
|
"appointmentinsert": "",
|
||||||
"assignedlinehours": "",
|
"assignedlinehours": "",
|
||||||
"billposted": "",
|
"billposted": "",
|
||||||
"billupdated": "",
|
"billupdated": "",
|
||||||
@@ -256,6 +258,9 @@
|
|||||||
"address1": "",
|
"address1": "",
|
||||||
"address2": "",
|
"address2": "",
|
||||||
"appt_alt_transport": "",
|
"appt_alt_transport": "",
|
||||||
|
"md_functionality_toggles": {
|
||||||
|
"parts_queue_toggle": ""
|
||||||
|
},
|
||||||
"appt_colors": {
|
"appt_colors": {
|
||||||
"color": "",
|
"color": "",
|
||||||
"label": ""
|
"label": ""
|
||||||
@@ -868,6 +873,8 @@
|
|||||||
"refhrs": ""
|
"refhrs": ""
|
||||||
},
|
},
|
||||||
"titles": {
|
"titles": {
|
||||||
|
"labhours": "",
|
||||||
|
"larhours": "",
|
||||||
"monthlyemployeeefficiency": "",
|
"monthlyemployeeefficiency": "",
|
||||||
"monthlyjobcosting": "",
|
"monthlyjobcosting": "",
|
||||||
"monthlylaborsales": "",
|
"monthlylaborsales": "",
|
||||||
@@ -1247,6 +1254,7 @@
|
|||||||
"act_price": "Precio actual",
|
"act_price": "Precio actual",
|
||||||
"ah_detail_line": "",
|
"ah_detail_line": "",
|
||||||
"assigned_team": "",
|
"assigned_team": "",
|
||||||
|
"create_ppc": "",
|
||||||
"db_price": "Precio de base de datos",
|
"db_price": "Precio de base de datos",
|
||||||
"lbr_types": {
|
"lbr_types": {
|
||||||
"LA1": "",
|
"LA1": "",
|
||||||
@@ -1480,6 +1488,7 @@
|
|||||||
"date_exported": "Exportado",
|
"date_exported": "Exportado",
|
||||||
"date_invoiced": "Facturado",
|
"date_invoiced": "Facturado",
|
||||||
"date_last_contacted": "",
|
"date_last_contacted": "",
|
||||||
|
"date_lost_sale": "",
|
||||||
"date_next_contact": "",
|
"date_next_contact": "",
|
||||||
"date_open": "Abierto",
|
"date_open": "Abierto",
|
||||||
"date_rentalresp": "",
|
"date_rentalresp": "",
|
||||||
@@ -2691,6 +2700,7 @@
|
|||||||
"jobs_reconcile": "",
|
"jobs_reconcile": "",
|
||||||
"jobs_scheduled_completion": "",
|
"jobs_scheduled_completion": "",
|
||||||
"lag_time": "",
|
"lag_time": "",
|
||||||
|
"lost_sales": "",
|
||||||
"open_orders": "",
|
"open_orders": "",
|
||||||
"open_orders_csr": "",
|
"open_orders_csr": "",
|
||||||
"open_orders_estimator": "",
|
"open_orders_estimator": "",
|
||||||
|
|||||||
@@ -104,6 +104,8 @@
|
|||||||
"admin_jobmarkforreexport": "",
|
"admin_jobmarkforreexport": "",
|
||||||
"admin_jobuninvoice": "",
|
"admin_jobuninvoice": "",
|
||||||
"admin_jobunvoid": "",
|
"admin_jobunvoid": "",
|
||||||
|
"appointmentcancel": "",
|
||||||
|
"appointmentinsert": "",
|
||||||
"assignedlinehours": "",
|
"assignedlinehours": "",
|
||||||
"billposted": "",
|
"billposted": "",
|
||||||
"billupdated": "",
|
"billupdated": "",
|
||||||
@@ -333,6 +335,9 @@
|
|||||||
"paint": "",
|
"paint": "",
|
||||||
"prep": ""
|
"prep": ""
|
||||||
},
|
},
|
||||||
|
"md_functionality_toggles": {
|
||||||
|
"parts_queue_toggle": ""
|
||||||
|
},
|
||||||
"md_ins_co": {
|
"md_ins_co": {
|
||||||
"city": "",
|
"city": "",
|
||||||
"name": "",
|
"name": "",
|
||||||
@@ -868,6 +873,8 @@
|
|||||||
"refhrs": ""
|
"refhrs": ""
|
||||||
},
|
},
|
||||||
"titles": {
|
"titles": {
|
||||||
|
"labhours": "",
|
||||||
|
"larhours": "",
|
||||||
"monthlyemployeeefficiency": "",
|
"monthlyemployeeefficiency": "",
|
||||||
"monthlyjobcosting": "",
|
"monthlyjobcosting": "",
|
||||||
"monthlylaborsales": "",
|
"monthlylaborsales": "",
|
||||||
@@ -1247,6 +1254,7 @@
|
|||||||
"act_price": "Prix actuel",
|
"act_price": "Prix actuel",
|
||||||
"ah_detail_line": "",
|
"ah_detail_line": "",
|
||||||
"assigned_team": "",
|
"assigned_team": "",
|
||||||
|
"create_ppc": "",
|
||||||
"db_price": "Prix de la base de données",
|
"db_price": "Prix de la base de données",
|
||||||
"lbr_types": {
|
"lbr_types": {
|
||||||
"LA1": "",
|
"LA1": "",
|
||||||
@@ -1480,6 +1488,7 @@
|
|||||||
"date_exported": "Exportés",
|
"date_exported": "Exportés",
|
||||||
"date_invoiced": "Facturé",
|
"date_invoiced": "Facturé",
|
||||||
"date_last_contacted": "",
|
"date_last_contacted": "",
|
||||||
|
"date_lost_sale": "",
|
||||||
"date_next_contact": "",
|
"date_next_contact": "",
|
||||||
"date_open": "Ouvrir",
|
"date_open": "Ouvrir",
|
||||||
"date_rentalresp": "",
|
"date_rentalresp": "",
|
||||||
@@ -2691,6 +2700,7 @@
|
|||||||
"jobs_reconcile": "",
|
"jobs_reconcile": "",
|
||||||
"jobs_scheduled_completion": "",
|
"jobs_scheduled_completion": "",
|
||||||
"lag_time": "",
|
"lag_time": "",
|
||||||
|
"lost_sales": "",
|
||||||
"open_orders": "",
|
"open_orders": "",
|
||||||
"open_orders_csr": "",
|
"open_orders_csr": "",
|
||||||
"open_orders_estimator": "",
|
"open_orders_estimator": "",
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
import i18n from "i18next";
|
import i18n from "i18next";
|
||||||
|
|
||||||
const AuditTrailMapping = {
|
const AuditTrailMapping = {
|
||||||
|
appointmentcancel: (lost_sale_reason) =>
|
||||||
|
i18n.t("audit_trail.messages.appointmentcancel", { lost_sale_reason }),
|
||||||
|
appointmentinsert: (start) =>
|
||||||
|
i18n.t("audit_trail.messages.appointmentinsert", { start }),
|
||||||
jobstatuschange: (status) =>
|
jobstatuschange: (status) =>
|
||||||
i18n.t("audit_trail.messages.jobstatuschange", { status }),
|
i18n.t("audit_trail.messages.jobstatuschange", { status }),
|
||||||
admin_jobstatuschange: (status) =>
|
admin_jobstatuschange: (status) =>
|
||||||
|
|||||||
@@ -31,3 +31,7 @@ export function TimeAgoFormatter(props) {
|
|||||||
</Tooltip>
|
</Tooltip>
|
||||||
) : null;
|
) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function DateTimeFormat(value) {
|
||||||
|
return moment(value).format("MM/DD/YYYY hh:mm A");
|
||||||
|
}
|
||||||
|
|||||||
@@ -2167,6 +2167,18 @@ export const TemplateList = (type, context) => {
|
|||||||
group: "payroll",
|
group: "payroll",
|
||||||
enhanced_payroll: true,
|
enhanced_payroll: true,
|
||||||
},
|
},
|
||||||
|
lost_sales: {
|
||||||
|
title: i18n.t("reportcenter.templates.lost_sales"),
|
||||||
|
subject: i18n.t("reportcenter.templates.lost_sales"),
|
||||||
|
key: "lost_sales",
|
||||||
|
//idtype: "vendor",
|
||||||
|
disabled: false,
|
||||||
|
rangeFilter: {
|
||||||
|
object: i18n.t("reportcenter.labels.objects.jobs"),
|
||||||
|
field: i18n.t("jobs.fields.date_lost_sale"),
|
||||||
|
},
|
||||||
|
group: "customers",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
...(!type || type === "courtesycarcontract"
|
...(!type || type === "courtesycarcontract"
|
||||||
|
|||||||
4
client/src/utils/config.js
Normal file
4
client/src/utils/config.js
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
// Sometimes referred to as PageSize, this variable controls the amount of records
|
||||||
|
// to show on one page during pagination.
|
||||||
|
export const pageLimit = 50;
|
||||||
920
client/yarn.lock
920
client/yarn.lock
File diff suppressed because it is too large
Load Diff
@@ -890,11 +890,13 @@
|
|||||||
- appt_colors
|
- appt_colors
|
||||||
- appt_length
|
- appt_length
|
||||||
- attach_pdf_to_email
|
- attach_pdf_to_email
|
||||||
|
- autohouseid
|
||||||
- bill_allow_post_to_closed
|
- bill_allow_post_to_closed
|
||||||
- bill_tax_rates
|
- bill_tax_rates
|
||||||
- cdk_configuration
|
- cdk_configuration
|
||||||
- cdk_dealerid
|
- cdk_dealerid
|
||||||
- city
|
- city
|
||||||
|
- claimscorpid
|
||||||
- country
|
- country
|
||||||
- created_at
|
- created_at
|
||||||
- default_adjustment_rate
|
- default_adjustment_rate
|
||||||
@@ -928,6 +930,7 @@
|
|||||||
- md_estimators
|
- md_estimators
|
||||||
- md_filehandlers
|
- md_filehandlers
|
||||||
- md_from_emails
|
- md_from_emails
|
||||||
|
- md_functionality_toggles
|
||||||
- md_hour_split
|
- md_hour_split
|
||||||
- md_ins_cos
|
- md_ins_cos
|
||||||
- md_jobline_presets
|
- md_jobline_presets
|
||||||
@@ -1026,6 +1029,7 @@
|
|||||||
- md_estimators
|
- md_estimators
|
||||||
- md_filehandlers
|
- md_filehandlers
|
||||||
- md_from_emails
|
- md_from_emails
|
||||||
|
- md_functionality_toggles
|
||||||
- md_hour_split
|
- md_hour_split
|
||||||
- md_ins_cos
|
- md_ins_cos
|
||||||
- md_jobline_presets
|
- md_jobline_presets
|
||||||
@@ -3583,6 +3587,7 @@
|
|||||||
- date_exported
|
- date_exported
|
||||||
- date_invoiced
|
- date_invoiced
|
||||||
- date_last_contacted
|
- date_last_contacted
|
||||||
|
- date_lost_sale
|
||||||
- date_next_contact
|
- date_next_contact
|
||||||
- date_open
|
- date_open
|
||||||
- date_rentalresp
|
- date_rentalresp
|
||||||
@@ -3863,6 +3868,7 @@
|
|||||||
- date_exported
|
- date_exported
|
||||||
- date_invoiced
|
- date_invoiced
|
||||||
- date_last_contacted
|
- date_last_contacted
|
||||||
|
- date_lost_sale
|
||||||
- date_next_contact
|
- date_next_contact
|
||||||
- date_open
|
- date_open
|
||||||
- date_rentalresp
|
- date_rentalresp
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
-- Could not auto-generate a down migration.
|
||||||
|
-- Please write an appropriate down migration for the SQL below:
|
||||||
|
-- alter table "public"."bodyshops" add column "md_functionality_toggles" jsonb
|
||||||
|
-- null default jsonb_build_object();
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
alter table "public"."bodyshops" add column "md_functionality_toggles" jsonb
|
||||||
|
null default jsonb_build_object();
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
-- Could not auto-generate a down migration.
|
||||||
|
-- Please write an appropriate down migration for the SQL below:
|
||||||
|
-- alter table "public"."jobs" add column "date_lost_sale" timestamp with time zone
|
||||||
|
-- null;
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
alter table "public"."jobs" add column "date_lost_sale" timestamp with time zone
|
||||||
|
null;
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE "public"."jobs" ALTER COLUMN "date_lost_sale" TYPE timestamp with time zone;
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE "public"."jobs" ALTER COLUMN "date_lost_sale" TYPE timestamp with time zone;
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
alter table "public"."courtesycars" alter column "nextservicekm" set not null;
|
||||||
|
alter table "public"."courtesycars" alter column "nextservicekm" set default '0';
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
ALTER TABLE "public"."courtesycars" ALTER COLUMN "nextservicekm" drop default;
|
||||||
|
alter table "public"."courtesycars" alter column "nextservicekm" drop not null;
|
||||||
56
libs/awsUtils.js
Normal file
56
libs/awsUtils.js
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
require("dotenv").config({
|
||||||
|
path: require("path").resolve(
|
||||||
|
process.cwd(),
|
||||||
|
`.env.${process.env.NODE_ENV || "development"}`
|
||||||
|
),
|
||||||
|
});
|
||||||
|
const {isNil} = require('lodash');
|
||||||
|
const aws4 = require("aws4");
|
||||||
|
const {Connection, Client} = require("@opensearch-project/opensearch");
|
||||||
|
const {defaultProvider} = require("@aws-sdk/credential-provider-node");
|
||||||
|
|
||||||
|
const createAwsConnector = (credentials, region) => {
|
||||||
|
class AmazonConnection extends Connection {
|
||||||
|
buildRequestObject(params) {
|
||||||
|
const request = super.buildRequestObject(params);
|
||||||
|
request.service = "es";
|
||||||
|
request.region = region;
|
||||||
|
request.headers = request.headers || {};
|
||||||
|
request.headers["host"] = request.hostname;
|
||||||
|
|
||||||
|
return aws4.sign(request, credentials);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
Connection: AmazonConnection,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
const getClient = async () => {
|
||||||
|
|
||||||
|
// We have manual configuration for OpenSearch,
|
||||||
|
// Return a client using these custom credentials
|
||||||
|
if (
|
||||||
|
!isNil(process.env.OPEN_SEARCH_PASSWORD) &&
|
||||||
|
!isNil(process.env.OPEN_SEARCH_USER) &&
|
||||||
|
!isNil(process.env.OPEN_SEARCH_HOST) &&
|
||||||
|
!isNil(process.env.OPEN_SEARCH_PROTOCOL)
|
||||||
|
) {
|
||||||
|
// The URI is currently being stored in its entirety, so strip protocol prior to rebuilding it.
|
||||||
|
const hostUrl = process.env.OPEN_SEARCH_HOST.replace(/^https?:\/\//i, '');
|
||||||
|
const node = `${process.env.OPEN_SEARCH_PROTOCOL}://${process.env.OPEN_SEARCH_USER}:${process.env.OPEN_SEARCH_PASSWORD}@${hostUrl}`;
|
||||||
|
|
||||||
|
return new Client({
|
||||||
|
node,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Default to the AWS Credentials Provider.
|
||||||
|
const credentials = await defaultProvider()();
|
||||||
|
return new Client({
|
||||||
|
...createAwsConnector(credentials, "ca-central-1"),
|
||||||
|
node: process.env.OPEN_SEARCH_HOST,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = { getClient };
|
||||||
74
os-loader.js
74
os-loader.js
@@ -1,59 +1,17 @@
|
|||||||
const Dinero = require("dinero.js");
|
|
||||||
|
|
||||||
//const client = require("../graphql-client/graphql-client").client;
|
|
||||||
const _ = require("lodash");
|
|
||||||
const GraphQLClient = require("graphql-request").GraphQLClient;
|
|
||||||
const logger = require("./server/utils/logger");
|
|
||||||
|
|
||||||
const path = require("path");
|
|
||||||
const client = require("./server/graphql-client/graphql-client").client;
|
|
||||||
require("dotenv").config({
|
require("dotenv").config({
|
||||||
path: path.resolve(
|
path: require("path").resolve(
|
||||||
process.cwd(),
|
process.cwd(),
|
||||||
`.env.${process.env.NODE_ENV || "development"}`
|
`.env.${process.env.NODE_ENV || "development"}`
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
const { Client, Connection } = require("@opensearch-project/opensearch");
|
|
||||||
const { defaultProvider } = require("@aws-sdk/credential-provider-node");
|
|
||||||
const aws4 = require("aws4");
|
|
||||||
const { gql } = require("graphql-request");
|
|
||||||
const gqlclient = require("./server/graphql-client/graphql-client").client;
|
|
||||||
// const osClient = new Client({
|
|
||||||
// node: `https://imex:Wl0d8k@!@search-imexonline-search-ixp2stfvwp6qocjsowzjzyreoy.ca-central-1.es.amazonaws.com/`,
|
|
||||||
// });
|
|
||||||
|
|
||||||
var host = process.env.OPEN_SEARCH_HOST; // e.g. https://my-domain.region.es.amazonaws.com
|
const {omit} = require("lodash");
|
||||||
const createAwsConnector = (credentials, region) => {
|
const gqlClient = require("./server/graphql-client/graphql-client").client;
|
||||||
class AmazonConnection extends Connection {
|
const getClient = require('./libs/awsUtils');
|
||||||
buildRequestObject(params) {
|
|
||||||
const request = super.buildRequestObject(params);
|
|
||||||
request.service = "es";
|
|
||||||
request.region = region;
|
|
||||||
request.headers = request.headers || {};
|
|
||||||
request.headers["host"] = request.hostname;
|
|
||||||
|
|
||||||
return aws4.sign(request, credentials);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return {
|
|
||||||
Connection: AmazonConnection,
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
const getClient = async () => {
|
|
||||||
const credentials = await defaultProvider()();
|
|
||||||
return new Client({
|
|
||||||
...createAwsConnector(credentials, "ca-central-1"),
|
|
||||||
node: host,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
async function OpenSearchUpdateHandler(req, res) {
|
async function OpenSearchUpdateHandler(req, res) {
|
||||||
try {
|
try {
|
||||||
var osClient = await getClient();
|
const osClient = await getClient();
|
||||||
// const osClient = new Client({
|
|
||||||
// node: `https://imex:password@search-imexonline-search-ixp2stfvwp6qocjsowzjzyreoy.ca-central-1.es.amazonaws.com`,
|
|
||||||
// });
|
|
||||||
|
|
||||||
//Clear out all current documents
|
//Clear out all current documents
|
||||||
// const deleteResult = await osClient.deleteByQuery({
|
// const deleteResult = await osClient.deleteByQuery({
|
||||||
@@ -67,11 +25,11 @@ async function OpenSearchUpdateHandler(req, res) {
|
|||||||
|
|
||||||
// return;
|
// return;
|
||||||
|
|
||||||
var batchSize = 1000;
|
const batchSize = 1000;
|
||||||
var promiseQueue = [];
|
const promiseQueue = [];
|
||||||
|
|
||||||
//Jobs Load.
|
//Jobs Load.
|
||||||
const jobsData = await gqlclient.request(`query{jobs{
|
const jobsData = await gqlClient.request(`query{jobs{
|
||||||
id
|
id
|
||||||
bodyshopid:shopid
|
bodyshopid:shopid
|
||||||
clm_no
|
clm_no
|
||||||
@@ -105,7 +63,7 @@ async function OpenSearchUpdateHandler(req, res) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Owner Load
|
//Owner Load
|
||||||
const ownersData = await gqlclient.request(`{
|
const ownersData = await gqlClient.request(`{
|
||||||
owners {
|
owners {
|
||||||
id
|
id
|
||||||
bodyshopid: shopid
|
bodyshopid: shopid
|
||||||
@@ -131,7 +89,7 @@ async function OpenSearchUpdateHandler(req, res) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Vehicles
|
//Vehicles
|
||||||
const vehiclesData = await gqlclient.request(`{
|
const vehiclesData = await gqlClient.request(`{
|
||||||
vehicles {
|
vehicles {
|
||||||
id
|
id
|
||||||
bodyshopid: shopid
|
bodyshopid: shopid
|
||||||
@@ -158,7 +116,7 @@ async function OpenSearchUpdateHandler(req, res) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//payments
|
//payments
|
||||||
const paymentsData = await gqlclient.request(`{
|
const paymentsData = await gqlClient.request(`{
|
||||||
payments {
|
payments {
|
||||||
id
|
id
|
||||||
amount
|
amount
|
||||||
@@ -198,7 +156,7 @@ async function OpenSearchUpdateHandler(req, res) {
|
|||||||
slicedArray.forEach((payment) => {
|
slicedArray.forEach((payment) => {
|
||||||
bulkOperation.push({ index: { _index: "payments", _id: payment.id } });
|
bulkOperation.push({ index: { _index: "payments", _id: payment.id } });
|
||||||
bulkOperation.push({
|
bulkOperation.push({
|
||||||
..._.omit(payment, ["job"]),
|
...omit(payment, ["job"]),
|
||||||
bodyshopid: payment.job.bodyshopid,
|
bodyshopid: payment.job.bodyshopid,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -206,7 +164,7 @@ async function OpenSearchUpdateHandler(req, res) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//bills
|
//bills
|
||||||
const billsData = await gqlclient.request(`{
|
const billsData = await gqlClient.request(`{
|
||||||
bills {
|
bills {
|
||||||
id
|
id
|
||||||
date
|
date
|
||||||
@@ -235,7 +193,7 @@ async function OpenSearchUpdateHandler(req, res) {
|
|||||||
slicedArray.forEach((bill) => {
|
slicedArray.forEach((bill) => {
|
||||||
bulkOperation.push({ index: { _index: "bills", _id: bill.id } });
|
bulkOperation.push({ index: { _index: "bills", _id: bill.id } });
|
||||||
bulkOperation.push({
|
bulkOperation.push({
|
||||||
..._.omit(bill, ["job"]),
|
...omit(bill, ["job"]),
|
||||||
bodyshopid: bill.job.bodyshopid,
|
bodyshopid: bill.job.bodyshopid,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
8
package-lock.json
generated
8
package-lock.json
generated
@@ -41,6 +41,7 @@
|
|||||||
"node-quickbooks": "^2.0.43",
|
"node-quickbooks": "^2.0.43",
|
||||||
"nodemailer": "^6.9.7",
|
"nodemailer": "^6.9.7",
|
||||||
"phone": "^3.1.41",
|
"phone": "^3.1.41",
|
||||||
|
"recursive-diff": "^1.0.9",
|
||||||
"soap": "^1.0.0",
|
"soap": "^1.0.0",
|
||||||
"socket.io": "^4.7.2",
|
"socket.io": "^4.7.2",
|
||||||
"ssh2-sftp-client": "^9.1.0",
|
"ssh2-sftp-client": "^9.1.0",
|
||||||
@@ -55,7 +56,7 @@
|
|||||||
"source-map-explorer": "^2.5.2"
|
"source-map-explorer": "^2.5.2"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16.0.0",
|
"node": ">=18.0.0",
|
||||||
"npm": ">=8.0.0"
|
"npm": ">=8.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -5523,6 +5524,11 @@
|
|||||||
"node": ">= 6"
|
"node": ">= 6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/recursive-diff": {
|
||||||
|
"version": "1.0.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/recursive-diff/-/recursive-diff-1.0.9.tgz",
|
||||||
|
"integrity": "sha512-5mqpskzvXDo5Vy29Vj8tH30a0+XBmY11aqWGoN/uB94UHRwndX2EuPvH+WtbqOYkrwAF718/lDo6U4CB1qSSqQ=="
|
||||||
|
},
|
||||||
"node_modules/regenerator-runtime": {
|
"node_modules/regenerator-runtime": {
|
||||||
"version": "0.14.0",
|
"version": "0.14.0",
|
||||||
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz",
|
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz",
|
||||||
|
|||||||
@@ -1,49 +1,18 @@
|
|||||||
const queries = require("../graphql-client/queries");
|
|
||||||
const {pick} = require("lodash");
|
|
||||||
const GraphQLClient = require("graphql-request").GraphQLClient;
|
|
||||||
const logger = require("../utils/logger");
|
|
||||||
//const client = require("../graphql-client/graphql-client").client;
|
|
||||||
|
|
||||||
const path = require("path");
|
|
||||||
const client = require("../graphql-client/graphql-client").client;
|
|
||||||
require("dotenv").config({
|
require("dotenv").config({
|
||||||
path: path.resolve(
|
path: require("path").resolve(
|
||||||
process.cwd(),
|
process.cwd(),
|
||||||
`.env.${process.env.NODE_ENV || "development"}`
|
`.env.${process.env.NODE_ENV || "development"}`
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
const {Client, Connection} = require("@opensearch-project/opensearch");
|
|
||||||
const {defaultProvider} = require("@aws-sdk/credential-provider-node");
|
|
||||||
const aws4 = require("aws4");
|
|
||||||
const {gql} = require("graphql-request");
|
|
||||||
|
|
||||||
var host = process.env.OPEN_SEARCH_HOST;
|
const GraphQLClient = require("graphql-request").GraphQLClient;
|
||||||
|
//const client = require("../graphql-client/graphql-client").client;
|
||||||
|
const logger = require("../utils/logger");
|
||||||
|
const queries = require("../graphql-client/queries");
|
||||||
|
const client = require("../graphql-client/graphql-client").client;
|
||||||
|
const {pick, isNil} = require("lodash");
|
||||||
|
const {getClient} = require('../../libs/awsUtils');
|
||||||
|
|
||||||
const createAwsConnector = (credentials, region) => {
|
|
||||||
class AmazonConnection extends Connection {
|
|
||||||
buildRequestObject(params) {
|
|
||||||
const request = super.buildRequestObject(params);
|
|
||||||
request.service = "es";
|
|
||||||
request.region = region;
|
|
||||||
request.headers = request.headers || {};
|
|
||||||
request.headers["host"] = request.hostname;
|
|
||||||
|
|
||||||
return aws4.sign(request, credentials);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
Connection: AmazonConnection,
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
const getClient = async () => {
|
|
||||||
const credentials = await defaultProvider()();
|
|
||||||
return new Client({
|
|
||||||
...createAwsConnector(credentials, "ca-central-1"),
|
|
||||||
node: host,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
async function OpenSearchUpdateHandler(req, res) {
|
async function OpenSearchUpdateHandler(req, res) {
|
||||||
if (req.headers["event-secret"] !== process.env.EVENT_SECRET) {
|
if (req.headers["event-secret"] !== process.env.EVENT_SECRET) {
|
||||||
@@ -51,10 +20,8 @@ async function OpenSearchUpdateHandler(req, res) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
var osClient = await getClient();
|
|
||||||
// const osClient = new Client({
|
const osClient = await getClient();
|
||||||
// node: `https://imex:<password>@search-imexonline-search-ixp2stfvwp6qocjsowzjzyreoy.ca-central-1.es.amazonaws.com/`,
|
|
||||||
// });
|
|
||||||
|
|
||||||
if (req.body.event.op === "DELETE") {
|
if (req.body.event.op === "DELETE") {
|
||||||
let response;
|
let response;
|
||||||
@@ -197,14 +164,12 @@ async function OpenSearchUpdateHandler(req, res) {
|
|||||||
body: document,
|
body: document,
|
||||||
};
|
};
|
||||||
|
|
||||||
let response;
|
const response = await osClient.index(payload);
|
||||||
response = await osClient.index(payload);
|
|
||||||
console.log(response.body);
|
console.log(response.body);
|
||||||
res.status(200).json(response.body);
|
res.status(200).json(response.body);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
res.status(400).json(JSON.stringify(error));
|
res.status(400).json(JSON.stringify(error));
|
||||||
} finally {
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -240,6 +205,8 @@ async function OpenSearchSearchHandler(req, res) {
|
|||||||
|
|
||||||
const osClient = await getClient();
|
const osClient = await getClient();
|
||||||
|
|
||||||
|
const bodyShopIdMatchOverride = isNil(process.env.BODY_SHOP_ID_MATCH_OVERRIDE) ? assocs.associations[0].shopid : process.env.BODY_SHOP_ID_MATCH_OVERRIDE
|
||||||
|
|
||||||
const {body} = await osClient.search({
|
const {body} = await osClient.search({
|
||||||
...(index ? {index} : {}),
|
...(index ? {index} : {}),
|
||||||
body: {
|
body: {
|
||||||
@@ -249,7 +216,7 @@ async function OpenSearchSearchHandler(req, res) {
|
|||||||
must: [
|
must: [
|
||||||
{
|
{
|
||||||
match: {
|
match: {
|
||||||
bodyshopid: assocs.associations[0].shopid,
|
bodyshopid: bodyShopIdMatchOverride,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -318,7 +285,6 @@ async function OpenSearchSearchHandler(req, res) {
|
|||||||
error: JSON.stringify(error),
|
error: JSON.stringify(error),
|
||||||
});
|
});
|
||||||
res.status(400).json(error);
|
res.status(400).json(error);
|
||||||
} finally {
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -250,8 +250,7 @@ function CalculateExpectedHoursForJob(job, filterToLbrTypes) {
|
|||||||
.forEach((jobline) => {
|
.forEach((jobline) => {
|
||||||
if (jobline.convertedtolbr) {
|
if (jobline.convertedtolbr) {
|
||||||
// Line has been converte to labor. Temporarily re-assign the hours.
|
// Line has been converte to labor. Temporarily re-assign the hours.
|
||||||
jobline.mod_lbr_ty =
|
jobline.mod_lbr_ty = jobline.convertedtolbr_data.mod_lbr_ty;
|
||||||
jobline.mod_lbr_ty || jobline.convertedtolbr_data.mod_lbr_ty;
|
|
||||||
jobline.mod_lb_hrs += jobline.convertedtolbr_data.mod_lb_hrs;
|
jobline.mod_lb_hrs += jobline.convertedtolbr_data.mod_lb_hrs;
|
||||||
}
|
}
|
||||||
if (jobline.mod_lb_hrs != 0) {
|
if (jobline.mod_lb_hrs != 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user