From 5b17bfaaa0475f0c7e2d8fb6ec4914503112e41a Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Tue, 6 Apr 2021 14:29:44 -0700 Subject: [PATCH] IO-834 IO-835 Totals table formatting. --- bodyshop_translations.babel | 21 ++++++++++++++++ .../job-totals-table.component.jsx | 24 +++++++++++-------- .../job-totals.table.labor.component.jsx | 14 +++++------ .../job-totals.table.other.component.jsx | 4 ++-- .../job-totals.table.parts.component.jsx | 4 +++- client/src/translations/en_us/common.json | 1 + client/src/translations/es/common.json | 1 + client/src/translations/fr/common.json | 1 + client/src/utils/TemplateConstants.js | 8 +++++++ server/job/job-costing.js | 3 --- 10 files changed, 58 insertions(+), 23 deletions(-) diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 10c74fa83..b01b34c82 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -28239,6 +28239,27 @@ templates + + credits_not_received_date + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + estimator_detail false diff --git a/client/src/components/job-totals-table/job-totals-table.component.jsx b/client/src/components/job-totals-table/job-totals-table.component.jsx index 6262e2835..d021fbecd 100644 --- a/client/src/components/job-totals-table/job-totals-table.component.jsx +++ b/client/src/components/job-totals-table/job-totals-table.component.jsx @@ -47,17 +47,21 @@ export function JobsTotalsTableComponent({ jobRO, job }) { - - - - + + + + + + + + + + + + + - - - - - - + diff --git a/client/src/components/job-totals-table/job-totals.table.labor.component.jsx b/client/src/components/job-totals-table/job-totals.table.labor.component.jsx index 47a4a9969..55b41aaf6 100644 --- a/client/src/components/job-totals-table/job-totals.table.labor.component.jsx +++ b/client/src/components/job-totals-table/job-totals.table.labor.component.jsx @@ -103,11 +103,11 @@ export default function JobTotalsTableLabor({ job }) { <> - {t("jobs.labels.labor_rates_subtotal")} + {t("jobs.labels.labor_rates_subtotal")} - + {Dinero(job.job_totals.rates.rates_subtotal).toFormat()} @@ -121,7 +121,7 @@ export default function JobTotalsTableLabor({ job }) { {job.job_totals.rates.mapa.hours.toFixed(2)} - + {Dinero(job.job_totals.rates.mapa.total).toFormat()} @@ -133,19 +133,19 @@ export default function JobTotalsTableLabor({ job }) { {job.job_totals.rates.mash.hours.toFixed(2)} - + {Dinero(job.job_totals.rates.mash.total).toFormat()} - {t("jobs.labels.labor_rates_subtotal")} + {t("jobs.labels.rates_subtotal")} - + - {Dinero(job.job_totals.rates.rates_subtotal).toFormat()} + {Dinero(job.job_totals.rates.subtotal).toFormat()} diff --git a/client/src/components/job-totals-table/job-totals.table.other.component.jsx b/client/src/components/job-totals-table/job-totals.table.other.component.jsx index 00925007c..c06cd7232 100644 --- a/client/src/components/job-totals-table/job-totals.table.other.component.jsx +++ b/client/src/components/job-totals-table/job-totals.table.other.component.jsx @@ -79,7 +79,7 @@ export default function JobTotalsTableOther({ job }) { <> - {t("jobs.labels.additionaltotal")} + {t("jobs.labels.additionaltotal")} @@ -90,7 +90,7 @@ export default function JobTotalsTableOther({ job }) { - {t("jobs.labels.subletstotal")} + {t("jobs.labels.subletstotal")} diff --git a/client/src/components/job-totals-table/job-totals.table.parts.component.jsx b/client/src/components/job-totals-table/job-totals.table.parts.component.jsx index ca1eef5b3..d71e033b4 100644 --- a/client/src/components/job-totals-table/job-totals.table.parts.component.jsx +++ b/client/src/components/job-totals-table/job-totals.table.parts.component.jsx @@ -70,7 +70,9 @@ export default function JobTotalsTableParts({ job }) { }} summary={() => ( - {t("jobs.labels.partstotal")} + + {t("jobs.labels.partstotal")} + diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index 99da29928..ad3484ac4 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -1705,6 +1705,7 @@ "vendor": "Vendor" }, "templates": { + "credits_not_received_date": "Credits not Received by Date", "estimator_detail": "Jobs by Estimator (Detail)", "estimator_summary": "Jobs by Estimator (Summary)", "hours_sold_detail_closed": "Hours Sold Detail - Closed", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index 225b47151..4d77ac2f3 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -1705,6 +1705,7 @@ "vendor": "" }, "templates": { + "credits_not_received_date": "", "estimator_detail": "", "estimator_summary": "", "hours_sold_detail_closed": "", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index 6ca6cbff4..c308bc2f7 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -1705,6 +1705,7 @@ "vendor": "" }, "templates": { + "credits_not_received_date": "", "estimator_detail": "", "estimator_summary": "", "hours_sold_detail_closed": "", diff --git a/client/src/utils/TemplateConstants.js b/client/src/utils/TemplateConstants.js index e6f5d9453..1a6b49802 100644 --- a/client/src/utils/TemplateConstants.js +++ b/client/src/utils/TemplateConstants.js @@ -519,6 +519,14 @@ export const TemplateList = (type, context) => { //idtype: "vendor", disabled: false, }, + credits_not_received_date: { + title: i18n.t("reportcenter.templates.credits_not_received_date"), + description: "", + subject: i18n.t("reportcenter.templates.credits_not_received_date"), + key: "credits_not_received_date", + //idtype: "vendor", + disabled: false, + }, } : {}), ...(!type || type === "courtesycarcontract" diff --git a/server/job/job-costing.js b/server/job/job-costing.js index b85e87f66..5d7fba619 100644 --- a/server/job/job-costing.js +++ b/server/job/job-costing.js @@ -3,9 +3,6 @@ const queries = require("../graphql-client/queries"); //const client = require("../graphql-client/graphql-client").client; const _ = require("lodash"); const GraphQLClient = require("graphql-request").GraphQLClient; -const { - ExportCustomJobInstance, -} = require("twilio/lib/rest/bulkexports/v1/export/exportCustomJob"); // Dinero.defaultCurrency = "USD"; // Dinero.globalLocale = "en-CA";