From 1f59d114e8a2a83e571dcc9942669ec3014e2aff Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Mon, 21 Jun 2021 09:11:28 -0700 Subject: [PATCH 01/15] IO-1186 Export customer data. --- bodyshop_translations.babel | 23 +++- .../jobs-detail-header-actions.component.jsx | 2 + ...eader-actions.exportcustdata.component.jsx | 107 ++++++++++++++++++ .../jobs-list-paginated.component.jsx | 4 +- client/src/graphql/jobs.queries.js | 1 + client/src/translations/en_us/common.json | 1 + client/src/translations/es/common.json | 1 + client/src/translations/fr/common.json | 1 + server/accounting/qbxml/qbxml-receivables.js | 25 ++-- 9 files changed, 151 insertions(+), 14 deletions(-) create mode 100644 client/src/components/jobs-detail-header-actions/jobs-detail-header-actions.exportcustdata.component.jsx diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index be57f200d..fa42c4d3c 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -1,4 +1,4 @@ - + - + tags - window.$crisp = []; - window.CRISP_WEBSITE_ID = "36724f62-2eb0-4b29-9cdd-9905fb99913e"; - var d = document; - var s = d.createElement("script"); - s.src = "https://client.crisp.chat/l.js"; - s.async = 1; - d.getElementsByTagName("head")[0].appendChild(s); + // useEffect(() => { + // // Include the Crisp code here, without the tags + // window.$crisp = []; + // window.CRISP_WEBSITE_ID = "36724f62-2eb0-4b29-9cdd-9905fb99913e"; + // var d = document; + // var s = d.createElement("script"); + // s.src = "https://client.crisp.chat/l.js"; + // s.async = 1; + // d.getElementsByTagName("head")[0].appendChild(s); - return () => { - d.getElementsByTagName("head")[0].removeChild(s); - }; - }, []); + // return () => { + // d.getElementsByTagName("head")[0].removeChild(s); + // }; + // }, []); return ( diff --git a/client/src/components/print-center-jobs/print-center-jobs.component.jsx b/client/src/components/print-center-jobs/print-center-jobs.component.jsx index a77fcfec4..bf641ae74 100644 --- a/client/src/components/print-center-jobs/print-center-jobs.component.jsx +++ b/client/src/components/print-center-jobs/print-center-jobs.component.jsx @@ -26,7 +26,9 @@ export function PrintCenterJobsComponent({ printCenterModal }) { const filteredJobsReportsList = search !== "" - ? JobsReportsList.filter((r) => r.title.toLowerCase().includes(search)) + ? JobsReportsList.filter((r) => + r.title.toLowerCase().includes(search.toLowerCase()) + ) : JobsReportsList; //Group it, create cards, and then filter out. diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index 4e5cd1085..6169f1e75 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -1935,6 +1935,7 @@ "parts_backorder": "Backordered Parts", "payments_by_date": "Payments by Date", "payments_by_date_type": "Payments by Date and Type", + "production_by_csr": "Production by CSR", "production_by_last_name": "Production by Last Name", "production_by_repair_status": "Production by Status", "production_by_ro": "Production by RO", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index e346bef61..594f9ac29 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -1935,6 +1935,7 @@ "parts_backorder": "", "payments_by_date": "", "payments_by_date_type": "", + "production_by_csr": "", "production_by_last_name": "", "production_by_repair_status": "", "production_by_ro": "", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index 6c11f8f9f..bb27ca4f2 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -1935,6 +1935,7 @@ "parts_backorder": "", "payments_by_date": "", "payments_by_date_type": "", + "production_by_csr": "", "production_by_last_name": "", "production_by_repair_status": "", "production_by_ro": "", diff --git a/client/src/utils/TemplateConstants.js b/client/src/utils/TemplateConstants.js index 079b88586..ab25efbe3 100644 --- a/client/src/utils/TemplateConstants.js +++ b/client/src/utils/TemplateConstants.js @@ -328,6 +328,14 @@ export const TemplateList = (type, context) => { disabled: false, group: "ro", }, + parts_label_multi: { + title: i18n.t("printcenter.jobs.parts_label_multi"), + description: "Thank You Letter by RO", + key: "parts_label_multi", + subject: i18n.t("printcenter.jobs.parts_label_multi"), + disabled: false, + group: "ro", + }, } : {}), ...(!type || type === "job_special" @@ -1150,10 +1158,6 @@ export const TemplateList = (type, context) => { key: "production_by_last_name", //idtype: "vendor", disabled: false, - rangeFilter: { - object: i18n.t("reportcenter.labels.objects.jobs"), - field: i18n.t("jobs.fields.date_open"), - }, }, production_by_repair_status: { title: i18n.t("reportcenter.templates.production_by_repair_status"), @@ -1164,10 +1168,6 @@ export const TemplateList = (type, context) => { key: "production_by_repair_status", //idtype: "vendor", disabled: false, - rangeFilter: { - object: i18n.t("reportcenter.labels.objects.jobs"), - field: i18n.t("jobs.fields.date_open"), - }, }, production_by_target_date: { title: i18n.t("reportcenter.templates.production_by_target_date"), @@ -1176,10 +1176,6 @@ export const TemplateList = (type, context) => { key: "production_by_target_date", //idtype: "vendor", disabled: false, - rangeFilter: { - object: i18n.t("reportcenter.labels.objects.jobs"), - field: i18n.t("jobs.fields.date_open"), - }, }, production_by_ro: { title: i18n.t("reportcenter.templates.production_by_ro"), @@ -1188,10 +1184,14 @@ export const TemplateList = (type, context) => { key: "production_by_ro", //idtype: "vendor", disabled: false, - rangeFilter: { - object: i18n.t("reportcenter.labels.objects.jobs"), - field: i18n.t("jobs.fields.date_open"), - }, + }, + production_by_csr: { + title: i18n.t("reportcenter.templates.production_by_csr"), + description: "", + subject: i18n.t("reportcenter.templates.production_by_csr"), + key: "production_by_csr", + //idtype: "vendor", + disabled: false, }, } : {}), diff --git a/client/src/utils/TemplateSpecial.jsx b/client/src/utils/TemplateSpecial.jsx new file mode 100644 index 000000000..9ffc58b88 --- /dev/null +++ b/client/src/utils/TemplateSpecial.jsx @@ -0,0 +1,5 @@ +import React from "react"; + +export function PartsLabelMulti() { + return
; +} From a2f3d9a1b624ccead269354f16f232432ee4a579 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Fri, 25 Jun 2021 14:09:19 -0700 Subject: [PATCH 15/15] Remove multi print center. --- client/src/utils/TemplateConstants.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/client/src/utils/TemplateConstants.js b/client/src/utils/TemplateConstants.js index ab25efbe3..d123cc6cd 100644 --- a/client/src/utils/TemplateConstants.js +++ b/client/src/utils/TemplateConstants.js @@ -328,14 +328,14 @@ export const TemplateList = (type, context) => { disabled: false, group: "ro", }, - parts_label_multi: { - title: i18n.t("printcenter.jobs.parts_label_multi"), - description: "Thank You Letter by RO", - key: "parts_label_multi", - subject: i18n.t("printcenter.jobs.parts_label_multi"), - disabled: false, - group: "ro", - }, + // parts_label_multi: { + // title: i18n.t("printcenter.jobs.parts_label_multi"), + // description: "Thank You Letter by RO", + // key: "parts_label_multi", + // subject: i18n.t("printcenter.jobs.parts_label_multi"), + // disabled: false, + // group: "ro", + // }, } : {}), ...(!type || type === "job_special"