From d1132e7d4579b35934c0c58fb691d6a98543abec Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Tue, 19 Mar 2024 14:30:31 -0700 Subject: [PATCH 1/8] IO-2711 Check Box Visibility Signed-off-by: Allan Carr --- .../job-reconciliation-bills-table.component.jsx | 2 +- .../production-list-columns.data.js | 2 +- client/src/pages/bills/bills.page.component.jsx | 8 +++----- .../src/pages/export-logs/export-logs.page.component.jsx | 4 +--- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/client/src/components/job-reconciliation-bills-table/job-reconciliation-bills-table.component.jsx b/client/src/components/job-reconciliation-bills-table/job-reconciliation-bills-table.component.jsx index 5cbe83620..f40da850a 100644 --- a/client/src/components/job-reconciliation-bills-table/job-reconciliation-bills-table.component.jsx +++ b/client/src/components/job-reconciliation-bills-table/job-reconciliation-bills-table.component.jsx @@ -82,7 +82,7 @@ export default function JobReconciliationBillsTable({ state.sortedInfo.order, render: (text, record) => ( - + ), }, ]; diff --git a/client/src/components/production-list-columns/production-list-columns.data.js b/client/src/components/production-list-columns/production-list-columns.data.js index 7e706e430..6677c2127 100644 --- a/client/src/components/production-list-columns/production-list-columns.data.js +++ b/client/src/components/production-list-columns/production-list-columns.data.js @@ -302,7 +302,7 @@ const r = ({ technician, state, activeStatuses, data, bodyshop }) => { onFilter: (value, record) => value.includes(record.special_coverage_policy), render: (text, record) => ( - + ), }, diff --git a/client/src/pages/bills/bills.page.component.jsx b/client/src/pages/bills/bills.page.component.jsx index 169a94a5e..43e199ae5 100644 --- a/client/src/pages/bills/bills.page.component.jsx +++ b/client/src/pages/bills/bills.page.component.jsx @@ -13,8 +13,8 @@ import { setModalContext } from "../../redux/modals/modals.actions"; import CurrencyFormatter from "../../utils/CurrencyFormatter"; import { DateFormatter } from "../../utils/DateFormatter"; import { TemplateList } from "../../utils/TemplateConstants"; +import { pageLimit } from "../../utils/config"; import { alphaSort, dateSort } from "../../utils/sorters"; -import {pageLimit} from "../../utils/config"; const mapDispatchToProps = (dispatch) => ({ setPartsOrderContext: (context) => @@ -125,9 +125,7 @@ export function BillsListPage({ sortOrder: state.sortedInfo.columnKey === "is_credit_memo" && state.sortedInfo.order, - render: (text, record) => ( - - ), + render: (text, record) => , }, { title: t("bills.fields.exported"), @@ -136,7 +134,7 @@ export function BillsListPage({ sorter: (a, b) => a.exported - b.exported, sortOrder: state.sortedInfo.columnKey === "exported" && state.sortedInfo.order, - render: (text, record) => , + render: (text, record) => , }, { title: t("general.labels.actions"), diff --git a/client/src/pages/export-logs/export-logs.page.component.jsx b/client/src/pages/export-logs/export-logs.page.component.jsx index 8e090a712..565b13510 100644 --- a/client/src/pages/export-logs/export-logs.page.component.jsx +++ b/client/src/pages/export-logs/export-logs.page.component.jsx @@ -167,9 +167,7 @@ export function ExportLogsPageComponent({ bodyshop }) { { text: "False", value: false }, ], onFilter: (value, record) => record.successful === value, - render: (text, record) => ( - - ), + render: (text, record) => , }, { title: t("general.labels.message"), From 8f9b05b974b90205b924c8f857feac8c8445236f Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Tue, 19 Mar 2024 14:41:34 -0700 Subject: [PATCH 2/8] IO-2698 Fuel Level & Sorter Signed-off-by: Allan Carr --- .../courtesy-cars-list/courtesy-cars-list.component.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/components/courtesy-cars-list/courtesy-cars-list.component.jsx b/client/src/components/courtesy-cars-list/courtesy-cars-list.component.jsx index 3bd49d6e7..de1c6f0ed 100644 --- a/client/src/components/courtesy-cars-list/courtesy-cars-list.component.jsx +++ b/client/src/components/courtesy-cars-list/courtesy-cars-list.component.jsx @@ -178,7 +178,7 @@ export default function CourtesyCarsList({ loading, courtesycars, refetch }) { title: t("courtesycars.fields.fuel"), dataIndex: "fuel", key: "fuel", - sorter: (a, b) => alphaSort(a.fuel, b.fuel), + sorter: (a, b) => a.fuel - b.fuel, sortOrder: state.sortedInfo.columnKey === "fuel" && state.sortedInfo.order, render: (text, record) => { @@ -187,12 +187,14 @@ export default function CourtesyCarsList({ loading, courtesycars, refetch }) { return t("courtesycars.labels.fuel.full"); case 88: return t("courtesycars.labels.fuel.78"); + case 75: + return t("courtesycars.labels.fuel.34"); case 63: return t("courtesycars.labels.fuel.58"); case 50: return t("courtesycars.labels.fuel.12"); case 38: - return t("courtesycars.labels.fuel.34"); + return t("courtesycars.labels.fuel.38"); case 25: return t("courtesycars.labels.fuel.14"); case 13: From 23b5b740cb609c8a12c8f3d1534ce47015a8cdcd Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Tue, 19 Mar 2024 17:17:15 -0700 Subject: [PATCH 3/8] IO-2686 Disable Return Item button on Bill Drawer if InHouse Signed-off-by: Allan Carr --- .../bill-detail-edit/bill-detail-edit-return.component.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/src/components/bill-detail-edit/bill-detail-edit-return.component.jsx b/client/src/components/bill-detail-edit/bill-detail-edit-return.component.jsx index 3935fc5f2..87ea3e730 100644 --- a/client/src/components/bill-detail-edit/bill-detail-edit-return.component.jsx +++ b/client/src/components/bill-detail-edit/bill-detail-edit-return.component.jsx @@ -173,7 +173,11 @@ export function BillDetailEditReturn({ diff --git a/client/src/components/job-employee-assignments/job-employee-assignments.container.jsx b/client/src/components/job-employee-assignments/job-employee-assignments.container.jsx index a5feb3fa7..cd04d4fa1 100644 --- a/client/src/components/job-employee-assignments/job-employee-assignments.container.jsx +++ b/client/src/components/job-employee-assignments/job-employee-assignments.container.jsx @@ -43,13 +43,13 @@ export function JobEmployeeAssignmentsContainer({ }); if (refetch) refetch(); - insertAuditTrail({ - jobid: job.id, - operation: AuditTrailMapping.jobassignmentchange(operation, name), - type: "jobassignmentchange", - }); - - if (!!result.errors) { + if (!!!result.errors) { + insertAuditTrail({ + jobid: job.id, + operation: AuditTrailMapping.jobassignmentchange(operation, name), + type: "jobassignmentchange", + }); + } else { notification["error"]({ message: t("jobs.errors.assigning", { message: JSON.stringify(result.errors), @@ -67,18 +67,19 @@ export function JobEmployeeAssignmentsContainer({ variables: { jobId: job.id, job: { [empAssignment]: null } }, }); - if (!!result.errors) { + if (!!!result.errors) { + insertAuditTrail({ + jobid: job.id, + operation: AuditTrailMapping.jobassignmentremoved(operation), + type: "jobassignmentremoved", + }); + } else { notification["error"]({ message: t("jobs.errors.assigning", { message: JSON.stringify(result.errors), }), }); } - insertAuditTrail({ - jobid: job.id, - operation: AuditTrailMapping.jobassignmentremoved(operation), - type: "jobassignmentremoved", - }); setLoading(false); }; From b1ca09bd4fa908ed8b71bccde03b633b69d4100f Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Tue, 19 Mar 2024 17:55:59 -0700 Subject: [PATCH 6/8] IO-2710 Prettierr Signed-off-by: Allan Carr --- .../job-employee-assignments.component.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/client/src/components/job-employee-assignments/job-employee-assignments.component.jsx b/client/src/components/job-employee-assignments/job-employee-assignments.component.jsx index 5962d40fe..283a49447 100644 --- a/client/src/components/job-employee-assignments/job-employee-assignments.component.jsx +++ b/client/src/components/job-employee-assignments/job-employee-assignments.component.jsx @@ -23,7 +23,6 @@ export function JobEmployeeAssignments({ jobRO, body, refinish, - prep, csr, handleAdd, From 1f896b1edea948bfe079becf34b28bb94a0d4906 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Thu, 21 Mar 2024 11:09:13 -0700 Subject: [PATCH 7/8] IO-2719 Missing CC Filter Signed-off-by: Allan Carr --- .../courtesy-cars-list/courtesy-cars-list.component.jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/src/components/courtesy-cars-list/courtesy-cars-list.component.jsx b/client/src/components/courtesy-cars-list/courtesy-cars-list.component.jsx index 3bd49d6e7..fd3dfa15e 100644 --- a/client/src/components/courtesy-cars-list/courtesy-cars-list.component.jsx +++ b/client/src/components/courtesy-cars-list/courtesy-cars-list.component.jsx @@ -61,6 +61,10 @@ export default function CourtesyCarsList({ loading, courtesycars, refetch }) { text: t("courtesycars.status.in"), value: "courtesycars.status.in", }, + { + text: t("courtesycars.status.inservice"), + value: "courtesycars.status.inservice", + }, { text: t("courtesycars.status.out"), value: "courtesycars.status.out", @@ -74,7 +78,7 @@ export default function CourtesyCarsList({ loading, courtesycars, refetch }) { value: "courtesycars.status.leasereturn", }, ], - onFilter: (value, record) => value.includes(record.status), + onFilter: (value, record) => record.status === value, sortOrder: state.sortedInfo.columnKey === "status" && state.sortedInfo.order, render: (text, record) => { From 39b119b2e83466c9c05c87f2f0ab54a1e6f183a4 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Thu, 21 Mar 2024 17:49:46 -0700 Subject: [PATCH 8/8] IO-2721 Owners Note in Owners Card Signed-off-by: Allan Carr --- .../jobs-detail-header.component.jsx | 14 ++++++++++++-- client/src/graphql/jobs.queries.js | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx b/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx index 694fea5d7..4d737ee67 100644 --- a/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx +++ b/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx @@ -5,6 +5,7 @@ import { WarningFilled, } from "@ant-design/icons"; import { Card, Col, Divider, Row, Space, Tag, Tooltip } from "antd"; +import moment from "moment"; import React, { useState } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; @@ -26,7 +27,6 @@ import ProductionListColumnComment from "../production-list-columns/production-l import ProductionListColumnProductionNote from "../production-list-columns/production-list-columns.productionnote.component"; import VehicleVinDisplay from "../vehicle-vin-display/vehicle-vin-display.component"; import "./jobs-detail-header.styles.scss"; -import moment from "moment"; const mapStateToProps = createStructuredSelector({ jobRO: selectJobReadOnly, @@ -101,7 +101,11 @@ export function JobsDetailHeader({ job, bodyshop, disabled }) { {job.status === bodyshop.md_ro_statuses.default_scheduled && job.scheduled_in ? ( - + {job.scheduled_in} @@ -221,6 +225,12 @@ export function JobsDetailHeader({ job, bodyshop, disabled }) { {job.owner?.tax_number || ""} )} + + {job.owner?.note || ""} + diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js index 1379535e1..31f9be07c 100644 --- a/client/src/graphql/jobs.queries.js +++ b/client/src/graphql/jobs.queries.js @@ -704,6 +704,7 @@ export const GET_JOB_BY_PK = gql` other_amount_payable owner { id + note ownr_fn ownr_ln ownr_co_nm