@@ -37,8 +37,8 @@ const mapStateToProps = createStructuredSelector({
|
|||||||
});
|
});
|
||||||
const mapDispatchToProps = (dispatch) => ({
|
const mapDispatchToProps = (dispatch) => ({
|
||||||
toggleModalVisible: () => dispatch(toggleModalVisible("billEnter")),
|
toggleModalVisible: () => dispatch(toggleModalVisible("billEnter")),
|
||||||
insertAuditTrail: ({ jobid, operation }) =>
|
insertAuditTrail: ({ jobid, billid, operation }) =>
|
||||||
dispatch(insertAuditTrail({ jobid, operation })),
|
dispatch(insertAuditTrail({ jobid, billid, operation })),
|
||||||
});
|
});
|
||||||
|
|
||||||
const Templates = TemplateList("job_special");
|
const Templates = TemplateList("job_special");
|
||||||
@@ -316,7 +316,7 @@ function BillEnterModalContainer({
|
|||||||
insertAuditTrail({
|
insertAuditTrail({
|
||||||
jobid: values.jobid,
|
jobid: values.jobid,
|
||||||
billid: billId,
|
billid: billId,
|
||||||
operation: AuditTrailMapping.billposted(remainingValues.invoice_number),
|
operation: AuditTrailMapping.billposted(r1.data.insert_bills.returning[0].invoice_number),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (enterAgain) {
|
if (enterAgain) {
|
||||||
|
|||||||
@@ -9,15 +9,15 @@ import {
|
|||||||
Table,
|
Table,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
} from "antd";
|
} from "antd";
|
||||||
|
import moment from "moment";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
||||||
import { alphaSort } from "../../utils/sorters";
|
|
||||||
import { OwnerNameDisplayFunction } from "../owner-name-display/owner-name-display.component";
|
|
||||||
import moment from "moment";
|
|
||||||
import { GenerateDocument } from "../../utils/RenderTemplate";
|
import { GenerateDocument } from "../../utils/RenderTemplate";
|
||||||
import { TemplateList } from "../../utils/TemplateConstants";
|
import { TemplateList } from "../../utils/TemplateConstants";
|
||||||
|
import { alphaSort } from "../../utils/sorters";
|
||||||
|
import { OwnerNameDisplayFunction } from "../owner-name-display/owner-name-display.component";
|
||||||
export default function CourtesyCarsList({ loading, courtesycars, refetch }) {
|
export default function CourtesyCarsList({ loading, courtesycars, refetch }) {
|
||||||
const [state, setState] = useState({
|
const [state, setState] = useState({
|
||||||
sortedInfo: {},
|
sortedInfo: {},
|
||||||
@@ -115,6 +115,14 @@ export default function CourtesyCarsList({ loading, courtesycars, refetch }) {
|
|||||||
sortOrder:
|
sortOrder:
|
||||||
state.sortedInfo.columnKey === "model" && state.sortedInfo.order,
|
state.sortedInfo.columnKey === "model" && state.sortedInfo.order,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: t("courtesycars.fields.color"),
|
||||||
|
dataIndex: "color",
|
||||||
|
key: "color",
|
||||||
|
sorter: (a, b) => alphaSort(a.color, b.color),
|
||||||
|
sortOrder:
|
||||||
|
state.sortedInfo.columnKey === "color" && state.sortedInfo.order,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: t("courtesycars.fields.plate"),
|
title: t("courtesycars.fields.plate"),
|
||||||
dataIndex: "plate",
|
dataIndex: "plate",
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ const JobSearchSelect = (
|
|||||||
useLazyQuery(SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE);
|
useLazyQuery(SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE);
|
||||||
|
|
||||||
const executeSearch = (v) => {
|
const executeSearch = (v) => {
|
||||||
if (v && v !== "") callSearch(v);
|
if (v && v !== "" && v.length >= 3) callSearch(v);
|
||||||
};
|
};
|
||||||
const debouncedExecuteSearch = _.debounce(executeSearch, 500);
|
const debouncedExecuteSearch = _.debounce(executeSearch, 500);
|
||||||
|
|
||||||
|
|||||||
@@ -231,7 +231,14 @@ export function LaborAllocationsTable({
|
|||||||
{summary.adjustments.toFixed(1)}
|
{summary.adjustments.toFixed(1)}
|
||||||
</Table.Summary.Cell>
|
</Table.Summary.Cell>
|
||||||
<Table.Summary.Cell>
|
<Table.Summary.Cell>
|
||||||
{summary.difference.toFixed(1)}
|
<Typography.Text
|
||||||
|
style={{
|
||||||
|
fontWeight: "bold",
|
||||||
|
color: summary.difference >= 0 ? "green" : "red",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{summary.difference.toFixed(1)}
|
||||||
|
</Typography.Text>
|
||||||
</Table.Summary.Cell>
|
</Table.Summary.Cell>
|
||||||
</Table.Summary.Row>
|
</Table.Summary.Row>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ const OwnerSearchSelect = ({ value, onChange, onBlur, disabled }, ref) => {
|
|||||||
useLazyQuery(SEARCH_OWNERS_BY_ID_FOR_AUTOCOMPLETE);
|
useLazyQuery(SEARCH_OWNERS_BY_ID_FOR_AUTOCOMPLETE);
|
||||||
|
|
||||||
const executeSearch = (v) => {
|
const executeSearch = (v) => {
|
||||||
callSearch(v);
|
if (v && v !== "" && v.length >= 3) callSearch(v);
|
||||||
};
|
};
|
||||||
const debouncedExecuteSearch = _.debounce(executeSearch, 500);
|
const debouncedExecuteSearch = _.debounce(executeSearch, 500);
|
||||||
|
|
||||||
|
|||||||
@@ -106,7 +106,11 @@ export default function OwnersListComponent({
|
|||||||
<Input.Search
|
<Input.Search
|
||||||
placeholder={search.search || t("general.labels.search")}
|
placeholder={search.search || t("general.labels.search")}
|
||||||
onSearch={(value) => {
|
onSearch={(value) => {
|
||||||
search.search = value;
|
if (value?.length >= 3) {
|
||||||
|
search.search = value;
|
||||||
|
} else {
|
||||||
|
delete search.search;
|
||||||
|
}
|
||||||
history.push({ search: queryString.stringify(search) });
|
history.push({ search: queryString.stringify(search) });
|
||||||
}}
|
}}
|
||||||
enterButton
|
enterButton
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ const VehicleSearchSelect = ({ value, onChange, onBlur, disabled }, ref) => {
|
|||||||
] = useLazyQuery(SEARCH_VEHICLES_BY_ID_FOR_AUTOCOMPLETE);
|
] = useLazyQuery(SEARCH_VEHICLES_BY_ID_FOR_AUTOCOMPLETE);
|
||||||
|
|
||||||
const executeSearch = (v) => {
|
const executeSearch = (v) => {
|
||||||
callSearch(v);
|
if (v && v !== "" && v.length >= 3) callSearch(v);
|
||||||
};
|
};
|
||||||
const debouncedExecuteSearch = _.debounce(executeSearch, 500);
|
const debouncedExecuteSearch = _.debounce(executeSearch, 500);
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ export const INSERT_NEW_BILL = gql`
|
|||||||
insert_bills(objects: $bill) {
|
insert_bills(objects: $bill) {
|
||||||
returning {
|
returning {
|
||||||
id
|
id
|
||||||
|
invoice_number
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1242,7 +1242,7 @@ export const SEARCH_JOBS_FOR_AUTOCOMPLETE = gql`
|
|||||||
) {
|
) {
|
||||||
search_jobs(
|
search_jobs(
|
||||||
args: { search: $search }
|
args: { search: $search }
|
||||||
limit: 50
|
limit: 25
|
||||||
where: {
|
where: {
|
||||||
_and: {
|
_and: {
|
||||||
converted: { _eq: $isConverted }
|
converted: { _eq: $isConverted }
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export const SEARCH_OWNERS_FOR_AUTOCOMPLETE = gql`
|
|||||||
query SEARCH_OWNERS_FOR_AUTOCOMPLETE($search: String) {
|
query SEARCH_OWNERS_FOR_AUTOCOMPLETE($search: String) {
|
||||||
search_owners(
|
search_owners(
|
||||||
args: { search: $search }
|
args: { search: $search }
|
||||||
limit: 50
|
limit: 25
|
||||||
order_by: { ownr_ln: desc_nulls_last }
|
order_by: { ownr_ln: desc_nulls_last }
|
||||||
) {
|
) {
|
||||||
id
|
id
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ export const SEARCH_VEHICLES_BY_ID_FOR_AUTOCOMPLETE = gql`
|
|||||||
`;
|
`;
|
||||||
export const SEARCH_VEHICLES_FOR_AUTOCOMPLETE = gql`
|
export const SEARCH_VEHICLES_FOR_AUTOCOMPLETE = gql`
|
||||||
query SEARCH_VEHICLES_FOR_AUTOCOMPLETE($search: String) {
|
query SEARCH_VEHICLES_FOR_AUTOCOMPLETE($search: String) {
|
||||||
search_vehicles(args: { search: $search }, limit: 50) {
|
search_vehicles(args: { search: $search }, limit: 25) {
|
||||||
id
|
id
|
||||||
v_vin
|
v_vin
|
||||||
v_model_yr
|
v_model_yr
|
||||||
|
|||||||
@@ -2565,18 +2565,22 @@
|
|||||||
"gsr_labor_only": "Gross Sales - Labor Only",
|
"gsr_labor_only": "Gross Sales - Labor Only",
|
||||||
"hours_sold_detail_closed": "Hours Sold Detail - Closed",
|
"hours_sold_detail_closed": "Hours Sold Detail - Closed",
|
||||||
"hours_sold_detail_closed_csr": "Hours Sold Detail - Closed by CSR",
|
"hours_sold_detail_closed_csr": "Hours Sold Detail - Closed by CSR",
|
||||||
|
"hours_sold_detail_closed_estimator": "Hours Sold Detail - Closed by Estimator",
|
||||||
"hours_sold_detail_closed_ins_co": "Hours Sold Detail - Closed by Source",
|
"hours_sold_detail_closed_ins_co": "Hours Sold Detail - Closed by Source",
|
||||||
"hours_sold_detail_closed_status": "Hours Sold Detail - Closed by Status",
|
"hours_sold_detail_closed_status": "Hours Sold Detail - Closed by Status",
|
||||||
"hours_sold_detail_open": "Hours Sold Detail - Open",
|
"hours_sold_detail_open": "Hours Sold Detail - Open",
|
||||||
"hours_sold_detail_open_csr": "Hours Sold Detail - Open by CSR",
|
"hours_sold_detail_open_csr": "Hours Sold Detail - Open by CSR",
|
||||||
|
"hours_sold_detail_open_estimator": "Hours Sold Detail - Open by Estimator",
|
||||||
"hours_sold_detail_open_ins_co": "Hours Sold Detail - Open by Source",
|
"hours_sold_detail_open_ins_co": "Hours Sold Detail - Open by Source",
|
||||||
"hours_sold_detail_open_status": "Hours Sold Detail - Open by Status",
|
"hours_sold_detail_open_status": "Hours Sold Detail - Open by Status",
|
||||||
"hours_sold_summary_closed": "Hours Sold Summary - Closed",
|
"hours_sold_summary_closed": "Hours Sold Summary - Closed",
|
||||||
"hours_sold_summary_closed_csr": "Hours Sold Summary - Closed by CSR",
|
"hours_sold_summary_closed_csr": "Hours Sold Summary - Closed by CSR",
|
||||||
|
"hours_sold_summary_closed_estimator": "Hours Sold Summary - Closed by Estimator",
|
||||||
"hours_sold_summary_closed_ins_co": "Hours Sold Summary - Closed by Source",
|
"hours_sold_summary_closed_ins_co": "Hours Sold Summary - Closed by Source",
|
||||||
"hours_sold_summary_closed_status": "Hours Sold Summary - Closed by Status",
|
"hours_sold_summary_closed_status": "Hours Sold Summary - Closed by Status",
|
||||||
"hours_sold_summary_open": "Hours Sold Summary - Open",
|
"hours_sold_summary_open": "Hours Sold Summary - Open",
|
||||||
"hours_sold_summary_open_csr": "Hours Sold Summary - Open CSR",
|
"hours_sold_summary_open_csr": "Hours Sold Summary - Open CSR",
|
||||||
|
"hours_sold_summary_open_estimator": "Hours Sold Summary - Open Estimator",
|
||||||
"hours_sold_summary_open_ins_co": "Hours Sold Summary - Open by Source",
|
"hours_sold_summary_open_ins_co": "Hours Sold Summary - Open by Source",
|
||||||
"hours_sold_summary_open_status": "Hours Sold Summary - Open by Status",
|
"hours_sold_summary_open_status": "Hours Sold Summary - Open by Status",
|
||||||
"job_costing_ro_csr": "Job Costing by CSR",
|
"job_costing_ro_csr": "Job Costing by CSR",
|
||||||
|
|||||||
@@ -2565,18 +2565,22 @@
|
|||||||
"gsr_labor_only": "",
|
"gsr_labor_only": "",
|
||||||
"hours_sold_detail_closed": "",
|
"hours_sold_detail_closed": "",
|
||||||
"hours_sold_detail_closed_csr": "",
|
"hours_sold_detail_closed_csr": "",
|
||||||
|
"hours_sold_detail_closed_estimator": "",
|
||||||
"hours_sold_detail_closed_ins_co": "",
|
"hours_sold_detail_closed_ins_co": "",
|
||||||
"hours_sold_detail_closed_status": "",
|
"hours_sold_detail_closed_status": "",
|
||||||
"hours_sold_detail_open": "",
|
"hours_sold_detail_open": "",
|
||||||
"hours_sold_detail_open_csr": "",
|
"hours_sold_detail_open_csr": "",
|
||||||
|
"hours_sold_detail_open_estimator": "",
|
||||||
"hours_sold_detail_open_ins_co": "",
|
"hours_sold_detail_open_ins_co": "",
|
||||||
"hours_sold_detail_open_status": "",
|
"hours_sold_detail_open_status": "",
|
||||||
"hours_sold_summary_closed": "",
|
"hours_sold_summary_closed": "",
|
||||||
"hours_sold_summary_closed_csr": "",
|
"hours_sold_summary_closed_csr": "",
|
||||||
|
"hours_sold_summary_closed_estimator": "",
|
||||||
"hours_sold_summary_closed_ins_co": "",
|
"hours_sold_summary_closed_ins_co": "",
|
||||||
"hours_sold_summary_closed_status": "",
|
"hours_sold_summary_closed_status": "",
|
||||||
"hours_sold_summary_open": "",
|
"hours_sold_summary_open": "",
|
||||||
"hours_sold_summary_open_csr": "",
|
"hours_sold_summary_open_csr": "",
|
||||||
|
"hours_sold_summary_open_estimator": "",
|
||||||
"hours_sold_summary_open_ins_co": "",
|
"hours_sold_summary_open_ins_co": "",
|
||||||
"hours_sold_summary_open_status": "",
|
"hours_sold_summary_open_status": "",
|
||||||
"job_costing_ro_csr": "",
|
"job_costing_ro_csr": "",
|
||||||
|
|||||||
@@ -2565,18 +2565,22 @@
|
|||||||
"gsr_labor_only": "",
|
"gsr_labor_only": "",
|
||||||
"hours_sold_detail_closed": "",
|
"hours_sold_detail_closed": "",
|
||||||
"hours_sold_detail_closed_csr": "",
|
"hours_sold_detail_closed_csr": "",
|
||||||
|
"hours_sold_detail_closed_estimator": "",
|
||||||
"hours_sold_detail_closed_ins_co": "",
|
"hours_sold_detail_closed_ins_co": "",
|
||||||
"hours_sold_detail_closed_status": "",
|
"hours_sold_detail_closed_status": "",
|
||||||
"hours_sold_detail_open": "",
|
"hours_sold_detail_open": "",
|
||||||
"hours_sold_detail_open_csr": "",
|
"hours_sold_detail_open_csr": "",
|
||||||
|
"hours_sold_detail_open_estimator": "",
|
||||||
"hours_sold_detail_open_ins_co": "",
|
"hours_sold_detail_open_ins_co": "",
|
||||||
"hours_sold_detail_open_status": "",
|
"hours_sold_detail_open_status": "",
|
||||||
"hours_sold_summary_closed": "",
|
"hours_sold_summary_closed": "",
|
||||||
"hours_sold_summary_closed_csr": "",
|
"hours_sold_summary_closed_csr": "",
|
||||||
|
"hours_sold_summary_closed_estimator": "",
|
||||||
"hours_sold_summary_closed_ins_co": "",
|
"hours_sold_summary_closed_ins_co": "",
|
||||||
"hours_sold_summary_closed_status": "",
|
"hours_sold_summary_closed_status": "",
|
||||||
"hours_sold_summary_open": "",
|
"hours_sold_summary_open": "",
|
||||||
"hours_sold_summary_open_csr": "",
|
"hours_sold_summary_open_csr": "",
|
||||||
|
"hours_sold_summary_open_estimator": "",
|
||||||
"hours_sold_summary_open_ins_co": "",
|
"hours_sold_summary_open_ins_co": "",
|
||||||
"hours_sold_summary_open_status": "",
|
"hours_sold_summary_open_status": "",
|
||||||
"job_costing_ro_csr": "",
|
"job_costing_ro_csr": "",
|
||||||
|
|||||||
@@ -818,6 +818,74 @@ export const TemplateList = (type, context) => {
|
|||||||
},
|
},
|
||||||
group: "sales",
|
group: "sales",
|
||||||
},
|
},
|
||||||
|
hours_sold_detail_closed_estimator: {
|
||||||
|
title: i18n.t(
|
||||||
|
"reportcenter.templates.hours_sold_detail_closed_estimator"
|
||||||
|
),
|
||||||
|
description: "",
|
||||||
|
subject: i18n.t(
|
||||||
|
"reportcenter.templates.hours_sold_detail_closed_estimator"
|
||||||
|
),
|
||||||
|
key: "hours_sold_detail_closed_estimator",
|
||||||
|
//idtype: "vendor",
|
||||||
|
disabled: false,
|
||||||
|
rangeFilter: {
|
||||||
|
object: i18n.t("reportcenter.labels.objects.jobs"),
|
||||||
|
field: i18n.t("jobs.fields.date_invoiced"),
|
||||||
|
},
|
||||||
|
group: "sales",
|
||||||
|
},
|
||||||
|
hours_sold_detail_open_estimator: {
|
||||||
|
title: i18n.t(
|
||||||
|
"reportcenter.templates.hours_sold_detail_open_estimator"
|
||||||
|
),
|
||||||
|
description: "",
|
||||||
|
subject: i18n.t(
|
||||||
|
"reportcenter.templates.hours_sold_detail_open_estimator"
|
||||||
|
),
|
||||||
|
key: "hours_sold_detail_open_estimator",
|
||||||
|
//idtype: "vendor",
|
||||||
|
disabled: false,
|
||||||
|
rangeFilter: {
|
||||||
|
object: i18n.t("reportcenter.labels.objects.jobs"),
|
||||||
|
field: i18n.t("jobs.fields.date_open"),
|
||||||
|
},
|
||||||
|
group: "sales",
|
||||||
|
},
|
||||||
|
hours_sold_summary_closed_estimator: {
|
||||||
|
title: i18n.t(
|
||||||
|
"reportcenter.templates.hours_sold_summary_closed_estimator"
|
||||||
|
),
|
||||||
|
description: "",
|
||||||
|
subject: i18n.t(
|
||||||
|
"reportcenter.templates.hours_sold_summary_closed_estimator"
|
||||||
|
),
|
||||||
|
key: "hours_sold_summary_closed_estimator",
|
||||||
|
//idtype: "vendor",
|
||||||
|
disabled: false,
|
||||||
|
rangeFilter: {
|
||||||
|
object: i18n.t("reportcenter.labels.objects.jobs"),
|
||||||
|
field: i18n.t("jobs.fields.date_invoiced"),
|
||||||
|
},
|
||||||
|
group: "sales",
|
||||||
|
},
|
||||||
|
hours_sold_summary_open_estimator: {
|
||||||
|
title: i18n.t(
|
||||||
|
"reportcenter.templates.hours_sold_summary_open_estimator"
|
||||||
|
),
|
||||||
|
description: "",
|
||||||
|
subject: i18n.t(
|
||||||
|
"reportcenter.templates.hours_sold_summary_open_estimator"
|
||||||
|
),
|
||||||
|
key: "hours_sold_summary_open_estimator",
|
||||||
|
//idtype: "vendor",
|
||||||
|
disabled: false,
|
||||||
|
rangeFilter: {
|
||||||
|
object: i18n.t("reportcenter.labels.objects.jobs"),
|
||||||
|
field: i18n.t("jobs.fields.date_invoiced"),
|
||||||
|
},
|
||||||
|
group: "sales",
|
||||||
|
},
|
||||||
hours_sold_summary_open_status: {
|
hours_sold_summary_open_status: {
|
||||||
title: i18n.t(
|
title: i18n.t(
|
||||||
"reportcenter.templates.hours_sold_summary_open_status"
|
"reportcenter.templates.hours_sold_summary_open_status"
|
||||||
|
|||||||
Reference in New Issue
Block a user