-
-
+
+
+
+
+
+
);
diff --git a/client/src/components/courtesy-car-form/courtesy-car-form.component.jsx b/client/src/components/courtesy-car-form/courtesy-car-form.component.jsx
index f9a32dfee..6c223353a 100644
--- a/client/src/components/courtesy-car-form/courtesy-car-form.component.jsx
+++ b/client/src/components/courtesy-car-form/courtesy-car-form.component.jsx
@@ -10,11 +10,15 @@ import CourtesyCarFuelSlider from "../courtesy-car-fuel-select/courtesy-car-fuel
import CourtesyCarReadiness from "../courtesy-car-readiness-select/courtesy-car-readiness-select.component";
import CourtesyCarStatus from "../courtesy-car-status-select/courtesy-car-status-select.component";
import FormDatePicker from "../form-date-picker/form-date-picker.component";
-//import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
+import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
import CurrencyInput from "../form-items-formatted/currency-form-item.component";
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
-export default function CourtesyCarCreateFormComponent({ form, saveLoading }) {
+export default function CourtesyCarCreateFormComponent({
+ form,
+ saveLoading,
+ newCC,
+}) {
const { t } = useTranslation();
const client = useApolloClient();
@@ -33,7 +37,7 @@ export default function CourtesyCarCreateFormComponent({ form, saveLoading }) {
}
/>
- {/* */}
+ {newCC ? null : }
- {t("parts_orders.labels.notyetordered")}
+ {t("bills.labels.nobilllines")}
)}
diff --git a/client/src/components/payment-mark-export-button/payment-mark-export-button-component.jsx b/client/src/components/payment-mark-export-button/payment-mark-export-button-component.jsx
index 5f8cb395a..5ffdc58ee 100644
--- a/client/src/components/payment-mark-export-button/payment-mark-export-button-component.jsx
+++ b/client/src/components/payment-mark-export-button/payment-mark-export-button-component.jsx
@@ -7,10 +7,12 @@ import { createStructuredSelector } from "reselect";
import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries";
import { UPDATE_PAYMENT } from "../../graphql/payments.queries";
import { setModalContext } from "../../redux/modals/modals.actions";
+import { selectPayment } from "../../redux/modals/modals.selectors";
import { selectCurrentUser } from "../../redux/user/user.selectors";
const mapStateToProps = createStructuredSelector({
currentUser: selectCurrentUser,
+ paymentModal: selectPayment,
});
const mapDispatchToProps = (dispatch) => ({
@@ -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/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/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")}
- >
+
)}