From ef077c2d4825a82d8188025eb5afe65dbd259cef Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Mon, 29 Apr 2024 10:33:34 -0700 Subject: [PATCH 1/3] Add render manager for part price changes. --- client/src/components/job-detail-lines/job-lines.component.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/components/job-detail-lines/job-lines.component.jsx b/client/src/components/job-detail-lines/job-lines.component.jsx index ff963337c..96a7f3a87 100644 --- a/client/src/components/job-detail-lines/job-lines.component.jsx +++ b/client/src/components/job-detail-lines/job-lines.component.jsx @@ -43,6 +43,7 @@ import PartsOrderModalContainer from "../parts-order-modal/parts-order-modal.con import JobLinesExpander from "./job-lines-expander.component"; import JobLinesPartPriceChange from "./job-lines-part-price-change.component"; import { FaTasks } from "react-icons/fa"; +import InstanceRenderManager from "../../utils/instanceRenderMgr"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, @@ -552,7 +553,7 @@ export function JobLinesComponent({ > {t("joblines.actions.new")} - {bodyshop.region_config.toLowerCase().startsWith("us") && } + {InstanceRenderManager({ rome: })} Date: Mon, 29 Apr 2024 10:50:18 -0700 Subject: [PATCH 2/3] Remove header for partner interaction to comply with CORS. --- client/src/utils/CleanAxios.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/utils/CleanAxios.js b/client/src/utils/CleanAxios.js index 15bcdad46..9ba93772d 100644 --- a/client/src/utils/CleanAxios.js +++ b/client/src/utils/CleanAxios.js @@ -17,7 +17,9 @@ export const axiosAuthInterceptorId = axios.interceptors.request.use( executeFunction: true, args: [], promanager: () => { - config.headers["Convenient-Company"] = "promanager"; + if (!config.url.startsWith("http://localhost:1337")) { + config.headers["Convenient-Company"] = "promanager"; + } } }); } From c525b7ea3fc25f5060bc8366ba65b5217589189a Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Mon, 29 Apr 2024 12:06:42 -0700 Subject: [PATCH 3/3] Place featurewrapped on bills in job line expander. --- bodyshop_translations.babel | 42 +++++++++ .../job-lines-expander.component.jsx | 89 ++++++++++--------- client/src/translations/en_us/common.json | 4 +- client/src/translations/es/common.json | 1 + client/src/translations/fr/common.json | 1 + 5 files changed, 93 insertions(+), 44 deletions(-) diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 5c8b43a92..c23acfa76 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -3939,6 +3939,27 @@ + + returnfrombill + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + savewithdiscrepancy false @@ -40798,6 +40819,27 @@ labels + + notyetdispatched + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + parts_dispatch false diff --git a/client/src/components/job-detail-lines/job-lines-expander.component.jsx b/client/src/components/job-detail-lines/job-lines-expander.component.jsx index 53ca81457..22f0f8616 100644 --- a/client/src/components/job-detail-lines/job-lines-expander.component.jsx +++ b/client/src/components/job-detail-lines/job-lines-expander.component.jsx @@ -12,6 +12,7 @@ import { createStructuredSelector } from "reselect"; import { selectBodyshop } from "../../redux/user/user.selectors"; import { QUERY_JOBLINE_TASKS_PAGINATED } from "../../graphql/tasks.queries.js"; import TaskListContainer from "../task-list/task-list.container.jsx"; +import FeatureWrapper from "../feature-wrapper/feature-wrapper.component.jsx"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop @@ -98,55 +99,59 @@ export function JobLinesExpander({ jobline, jobid, bodyshop }) { ) })) - : { - key: "dispatch-lines", - children: t("parts_orders.labels.notyetordered") - } - } - /> - - - {t("bills.labels.bills")} - 0 - ? data.billlines.map((line) => ({ - key: line.id, - children: ( - - - - {line.bill.invoice_number} - - - - - {`${t("billlines.fields.actual_price")}: `} - {line.actual_price} - - - - - {`${t("billlines.fields.actual_cost")}: `} - {line.actual_cost} - - - - {line.bill.date} - - {line.bill.vendor.name} - - ) - })) : [ { - key: "no-orders", - children: t("bills.labels.nobilllines") + key: "dispatch-lines", + children: t("parts_dispatch.labels.notyetdispatched") } ] } /> + null}> + + {t("bills.labels.bills")} + 0 + ? data.billlines.map((line) => ({ + key: line.id, + children: ( + + + + {line.bill.invoice_number} + + + + + {`${t("billlines.fields.actual_price")}: `} + {line.actual_price} + + + + + {`${t("billlines.fields.actual_cost")}: `} + {line.actual_cost} + + + + {line.bill.date} + + {line.bill.vendor.name} + + ) + })) + : [ + { + key: "no-orders", + children: t("bills.labels.nobilllines") + } + ] + } + /> + +