From 4e9dea31fdea66bc657c0f27011bec8ab159022c Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Mon, 7 Dec 2020 09:45:08 -0800 Subject: [PATCH] Further updates to job totals table. --- bodyshop_translations.babel | 42 ++++ .../job-totals-table.component.jsx | 186 +++++++++--------- client/src/translations/en_us/common.json | 2 + client/src/translations/es/common.json | 2 + client/src/translations/fr/common.json | 2 + 5 files changed, 140 insertions(+), 94 deletions(-) diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 4ec22fb52..974604fe4 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -17002,6 +17002,27 @@ + + jobtotals + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + labor_rates_subtotal false @@ -17191,6 +17212,27 @@ + + othertotal + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + override_header 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 b96af56b2..88c550b19 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 @@ -1,4 +1,4 @@ -import { Col, Result, Row, Statistic, Typography } from "antd"; +import { Col, Result, Row, Typography } from "antd"; import Dinero from "dinero.js"; import { JsonEditor as Editor } from "jsoneditor-react"; import "jsoneditor-react/es/editor.min.css"; @@ -238,6 +238,14 @@ export function JobsTotalsTableComponent({ bodyshop, jobRO, job }) { + + + + + {t("jobs.labels.othertotal")} + + +
{t("jobs.labels.subletstotal")} @@ -253,99 +261,89 @@ export function JobsTotalsTableComponent({ bodyshop, jobRO, job }) {
-
{ - if (e.detail === 3) { - try { - console.log("Job", job); - } catch { - console.log("Unable to show job."); - } - } - }} - > - - - -
-
{ - if (e.detail === 3) { - try { - console.log("Job", job); - } catch { - console.log("Unable to show job."); - } - } - }} - > - - - - - -
-
{ - if (e.detail === 3) { - try { - console.log("Job", job); - } catch { - console.log("Unable to show job."); - } - } - }} - > - - - -
+ + + {t("jobs.labels.jobtotals")} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{t("jobs.labels.local_tax_amt")} + {Dinero(job.job_totals.totals.local_tax).toFormat()} +
{t("jobs.labels.state_tax_amt")} + {Dinero(job.job_totals.totals.state_tax).toFormat()} +
{t("jobs.labels.federal_tax_amt")} + {Dinero(job.job_totals.totals.federal_tax).toFormat()} +
{t("jobs.fields.ded_amt")} + {Dinero( + job.job_totals.totals.custPayable.deductible + ).toFormat()} +
{t("jobs.fields.federal_tax_payable")} + {Dinero( + job.job_totals.totals.custPayable.federal_tax + ).toFormat()} +
{t("jobs.fields.other_amount_payable")} + {Dinero( + job.job_totals.totals.custPayable.other_customer_amount + ).toFormat()} +
{t("jobs.fields.depreciation_taxes")} + {Dinero( + job.job_totals.totals.custPayable.dep_taxes + ).toFormat()} +
{t("jobs.labels.total_cust_payable")} + {Dinero(job.job_totals.totals.custPayable.total).toFormat()} +
{t("jobs.labels.subtotal")} + {Dinero(job.job_totals.totals.subtotal).toFormat()} +
{t("jobs.labels.total_repairs")} + {Dinero(job.job_totals.totals.total_repairs).toFormat()} +
{t("jobs.labels.net_repairs")} + {Dinero(job.job_totals.totals.net_repairs).toFormat()} +
+