0 ? (
data.parts_order_lines.map((line) => (
- } wrap>
-
- {line.parts_order.order_number}
-
- {line.parts_order.order_date}
- {line.parts_order.vendor.name}
-
+
+
+
+ {line.parts_order.order_number}
+
+
+
+ {line.parts_order.order_date}
+
+ {line.parts_order.vendor.name}
+ {line.backordered_eta ? (
+
+
+ {`${t("parts_orders.fields.backordered_eta")}: `}
+ {line.backordered_eta}
+
+
+ ) : null}
+
))
) : (
@@ -71,7 +83,7 @@ export default function JobLinesExpander({ jobline, jobid }) {
- {`${t("billlines.fields.actual_cost")}: `}
+ {`${t("billlines.fields.actual_cost")}: `}
{line.actual_cost}
@@ -84,7 +96,7 @@ export default function JobLinesExpander({ jobline, jobid }) {
))
) : (
- {t("parts_orders.labels.notyetordered")}
+ {t("bills.labels.nobilllines")}
)}
diff --git a/client/src/components/parts-order-modal/parts-order-modal.component.jsx b/client/src/components/parts-order-modal/parts-order-modal.component.jsx
index 7ce456280..8fcbe4007 100644
--- a/client/src/components/parts-order-modal/parts-order-modal.component.jsx
+++ b/client/src/components/parts-order-modal/parts-order-modal.component.jsx
@@ -1,17 +1,17 @@
-import { DeleteFilled, WarningFilled, DownOutlined } from "@ant-design/icons";
+import { DeleteFilled, DownOutlined, WarningFilled } from "@ant-design/icons";
import { useTreatments } from "@splitsoftware/splitio-react";
import {
+ Checkbox,
Divider,
+ Dropdown,
Form,
Input,
InputNumber,
+ Menu,
Radio,
+ Select,
Space,
Tag,
- Select,
- Menu,
- Dropdown,
- Checkbox,
} from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
@@ -255,7 +255,7 @@ export function PartsOrderModalComponent({
},
]}
>
-
+
({
@@ -24,6 +26,7 @@ const PaymentMarkForExportButton = ({
refetch,
setPaymentContext,
currentUser,
+ paymentModal,
}) => {
const { t } = useTranslation();
const [insertExportLog, { loading: exportLogLoading }] =
@@ -65,16 +68,22 @@ const PaymentMarkForExportButton = ({
refetch,
},
context: {
+ ...paymentModal.context,
...payment,
exportedat: today,
},
});
- if (refetch)
- refetch(
- paymentUpdateResponse &&
- paymentUpdateResponse.data.update_payments.returning[0]
- );
+ if (refetch) {
+ if (paymentModal.context.refetchRequiresContext) {
+ refetch(
+ paymentUpdateResponse &&
+ paymentUpdateResponse.data.update_payments.returning[0]
+ );
+ } else {
+ refetch();
+ }
+ }
} else {
notification["error"]({
message: t("payments.errors.exporting", {
diff --git a/client/src/components/payment-modal/payment-modal.container.jsx b/client/src/components/payment-modal/payment-modal.container.jsx
index e53894920..e2b108674 100644
--- a/client/src/components/payment-modal/payment-modal.container.jsx
+++ b/client/src/components/payment-modal/payment-modal.container.jsx
@@ -1,5 +1,4 @@
import { useMutation } from "@apollo/client";
-
import { Button, Form, Modal, notification, Space } from "antd";
import React, { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
@@ -97,16 +96,21 @@ function PaymentModalContainer({
});
if (!!!updatedPayment.errors) {
- notification["success"]({ message: t("payments.successes.payment") });
+ notification["success"]({ message: t("payments.successes.paymentupdate") });
} else {
- notification["error"]({ message: t("payments.errors.payment") });
+ notification["error"]({ message: t("payments.errors.paymentupdate") });
}
}
- if (actions.refetch)
- actions.refetch(
- updatedPayment && updatedPayment.data.update_payments.returning[0]
- );
+ if (actions.refetch) {
+ if (context.refetchRequiresContext) {
+ actions.refetch(
+ updatedPayment && updatedPayment.data.update_payments.returning[0]
+ );
+ } else {
+ actions.refetch();
+ }
+ }
if (enterAgain) {
const prev = form.getFieldsValue(["date"]);
@@ -159,7 +163,7 @@ function PaymentModalContainer({
}}
afterClose={() => form.resetFields()}
footer={
-
+
)}
-
+
}
>
{!context || (context && !context.id) ? null : (
diff --git a/client/src/components/payment-reexport-button/payment-reexport-button.component.jsx b/client/src/components/payment-reexport-button/payment-reexport-button.component.jsx
index a7434e76d..fa6063d67 100644
--- a/client/src/components/payment-reexport-button/payment-reexport-button.component.jsx
+++ b/client/src/components/payment-reexport-button/payment-reexport-button.component.jsx
@@ -3,15 +3,25 @@ import { Button, notification } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
+import { createStructuredSelector } from "reselect";
import { UPDATE_PAYMENT } from "../../graphql/payments.queries";
import { setModalContext } from "../../redux/modals/modals.actions";
+import { selectPayment } from "../../redux/modals/modals.selectors";
+const mapStateToProps = createStructuredSelector({
+ paymentModal: selectPayment,
+});
const mapDispatchToProps = (dispatch) => ({
setPaymentContext: (context) =>
dispatch(setModalContext({ context: context, modal: "payment" })),
});
-const PaymentReexportButton = ({ payment, refetch, setPaymentContext }) => {
+const PaymentReexportButton = ({
+ paymentModal,
+ payment,
+ refetch,
+ setPaymentContext,
+}) => {
const { t } = useTranslation();
const [updatePayment, { loading }] = useMutation(UPDATE_PAYMENT);
@@ -35,15 +45,21 @@ const PaymentReexportButton = ({ payment, refetch, setPaymentContext }) => {
refetch,
},
context: {
+ ...paymentModal.context,
...payment,
exportedat: null,
},
});
- if (refetch)
- refetch(
- paymentUpdateResponse &&
- paymentUpdateResponse.data.update_payments.returning[0]
- );
+ if (refetch) {
+ if (paymentModal.context.refetchRequiresContext) {
+ refetch(
+ paymentUpdateResponse &&
+ paymentUpdateResponse.data.update_payments.returning[0]
+ );
+ } else {
+ refetch();
+ }
+ }
} else {
notification["error"]({
message: t("payments.errors.exporting", {
@@ -64,4 +80,7 @@ const PaymentReexportButton = ({ payment, refetch, setPaymentContext }) => {
);
};
-export default connect(null, mapDispatchToProps)(PaymentReexportButton);
+export default connect(
+ mapStateToProps,
+ mapDispatchToProps
+)(PaymentReexportButton);
diff --git a/client/src/components/payments-list-paginated/payment-list-paginated.component.jsx b/client/src/components/payments-list-paginated/payment-list-paginated.component.jsx
index 86ad50cb8..6fdfd108a 100644
--- a/client/src/components/payments-list-paginated/payment-list-paginated.component.jsx
+++ b/client/src/components/payments-list-paginated/payment-list-paginated.component.jsx
@@ -14,11 +14,11 @@ import { selectBodyshop } from "../../redux/user/user.selectors";
import CurrencyFormatter from "../../utils/CurrencyFormatter";
import { DateFormatter, DateTimeFormatter } from "../../utils/DateFormatter";
import { TemplateList } from "../../utils/TemplateConstants";
+import { pageLimit } from "../../utils/config";
import { alphaSort } from "../../utils/sorters";
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 PrintWrapperComponent from "../print-wrapper/print-wrapper.component";
-import {pageLimit} from "../../utils/config";
const mapStateToProps = createStructuredSelector({
//currentUser: selectCurrentUser
@@ -184,7 +184,10 @@ export function PaymentsListPaginated({
}
: refetch,
},
- context: apolloResults ? apolloResults : record,
+ context: {
+ ...(apolloResults ? apolloResults : record),
+ refetchRequiresContext: true,
+ },
});
}}
>
diff --git a/client/src/components/print-center-jobs-labels/print-center-jobs-labels.component.jsx b/client/src/components/print-center-jobs-labels/print-center-jobs-labels.component.jsx
index 5bd0f15e5..c42756de9 100644
--- a/client/src/components/print-center-jobs-labels/print-center-jobs-labels.component.jsx
+++ b/client/src/components/print-center-jobs-labels/print-center-jobs-labels.component.jsx
@@ -6,6 +6,7 @@ import {
notification,
Popover,
Radio,
+ Space,
} from "antd";
import React, { useState } from "react";
import { useTranslation } from "react-i18next";
@@ -115,10 +116,16 @@ export function PrintCenterJobsLabels({ bodyshop, jobId }) {
>
-
-
+
+
+
+
+
+
);
diff --git a/client/src/components/schedule-calendar-wrapper/schedule-calendar-header.component.js b/client/src/components/schedule-calendar-wrapper/schedule-calendar-header.component.js
index 732bcc2c2..96ef73a56 100644
--- a/client/src/components/schedule-calendar-wrapper/schedule-calendar-header.component.js
+++ b/client/src/components/schedule-calendar-wrapper/schedule-calendar-header.component.js
@@ -1,5 +1,5 @@
import Icon from "@ant-design/icons";
-import { Popover } from "antd";
+import { Popover, Space } from "antd";
import _ from "lodash";
import moment from "moment";
import React, { useMemo } from "react";
@@ -69,19 +69,22 @@ export function ScheduleCalendarHeaderComponent({
{loadData && loadData.allJobsOut ? (
loadData.allJobsOut.map((j) => (
- |
- {j.ro_number}
+ |
+ {j.ro_number} (
+ {j.status})
|
-
+ |
|
-
- {`(${(
+ |
+ {`(${j.labhrs.aggregate.sum.mod_lb_hrs.toFixed(
+ 1
+ )}/${j.larhrs.aggregate.sum.mod_lb_hrs.toFixed(1)}/${(
j.labhrs.aggregate.sum.mod_lb_hrs +
j.larhrs.aggregate.sum.mod_lb_hrs
).toFixed(1)} ${t("general.labels.hours")})`}
|
-
+ |
{j.scheduled_completion}
@@ -90,7 +93,9 @@ export function ScheduleCalendarHeaderComponent({
))
) : (
|
- | {t("appointments.labels.nocompletingjobs")} |
+
+ {t("appointments.labels.nocompletingjobs")}
+ |
)}
@@ -105,27 +110,30 @@ export function ScheduleCalendarHeaderComponent({
{loadData && loadData.allJobsIn ? (
loadData.allJobsIn.map((j) => (
- |
+ |
{j.ro_number}
- {j.status}
|
-
+ |
|
-
- {`(${(
+ |
+ {`(${j.labhrs.aggregate.sum.mod_lb_hrs.toFixed(
+ 1
+ )}/${j.larhrs.aggregate.sum.mod_lb_hrs.toFixed(1)}/${(
j.labhrs.aggregate.sum.mod_lb_hrs +
j.larhrs.aggregate.sum.mod_lb_hrs
).toFixed(1)} ${t("general.labels.hours")})`}
|
-
+ |
{j.scheduled_in}
|
))
) : (
- | {t("appointments.labels.noarrivingjobs")} |
+
+ {t("appointments.labels.noarrivingjobs")}
+ |
)}
@@ -136,25 +144,32 @@ export function ScheduleCalendarHeaderComponent({
const LoadComponent = loadData ? (
-
-
- {(loadData.allHoursIn || 0) && loadData.allHoursIn.toFixed(2)}
-
-
-
- {(loadData.allHoursOut || 0) && loadData.allHoursOut.toFixed(2)}
-
-
+
+
+
+ {(loadData.allHoursInBody || 0) &&
+ loadData.allHoursInBody.toFixed(1)}
+ /
+ {(loadData.allHoursInRefinish || 0) &&
+ loadData.allHoursInRefinish.toFixed(1)}
+ /{(loadData.allHoursIn || 0) && loadData.allHoursIn.toFixed(1)}
+
+
+
+ {(loadData.allHoursOut || 0) && loadData.allHoursOut.toFixed(1)}
+
+
+
diff --git a/client/src/graphql/courtesy-car.queries.js b/client/src/graphql/courtesy-car.queries.js
index eef9a759f..714e632f2 100644
--- a/client/src/graphql/courtesy-car.queries.js
+++ b/client/src/graphql/courtesy-car.queries.js
@@ -46,7 +46,7 @@ export const QUERY_AVAILABLE_CC = gql`
`;
export const CHECK_CC_FLEET_NUMBER = gql`
- query CHECK_VENDOR_NAME($name: String!) {
+ query CHECK_CC_FLEET_NUMBER($name: String!) {
courtesycars_aggregate(where: { fleetnumber: { _ilike: $name } }) {
aggregate {
count
diff --git a/client/src/graphql/jobs-lines.queries.js b/client/src/graphql/jobs-lines.queries.js
index c3b9ddfcb..cb4b6d06e 100644
--- a/client/src/graphql/jobs-lines.queries.js
+++ b/client/src/graphql/jobs-lines.queries.js
@@ -172,6 +172,12 @@ export const UPDATE_JOB_LINE = gql`
id
notes
mod_lbr_ty
+ mod_lb_hrs
+ part_type
+ op_code_desc
+ prt_dsmk_m
+ prt_dsmk_p
+ tax_part
part_qty
db_price
act_price
diff --git a/client/src/graphql/jobs.queries.js b/client/src/graphql/jobs.queries.js
index 31f9be07c..0cd49d52b 100644
--- a/client/src/graphql/jobs.queries.js
+++ b/client/src/graphql/jobs.queries.js
@@ -2205,6 +2205,8 @@ export const GET_JOB_LINE_ORDERS = gql`
parts_order_lines(where: { job_line_id: { _eq: $joblineid } }) {
id
act_price
+ backordered_eta
+ backordered_on
parts_order {
id
order_date
diff --git a/client/src/pages/bills/bills.page.component.jsx b/client/src/pages/bills/bills.page.component.jsx
index 43e199ae5..d9d47f936 100644
--- a/client/src/pages/bills/bills.page.component.jsx
+++ b/client/src/pages/bills/bills.page.component.jsx
@@ -241,7 +241,7 @@ export function BillsListPage({
extra={
{search.search && (
- <>
+
{t("general.labels.searchresults", { search: search.search })}
@@ -254,7 +254,7 @@ export function BillsListPage({
>
{t("general.actions.clear")}
- >
+
)}