From b2c1c8d1847d9d88c8b375f3ae6b3c3c73abc832 Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Fri, 7 May 2021 15:44:57 -0700 Subject: [PATCH] IO-1048 Add total hours to production list. --- bodyshop_translations.babel | 21 +++++++++++++++++++ .../production-list-columns.data.js | 14 +++++++++++++ client/src/translations/en_us/common.json | 1 + client/src/translations/es/common.json | 1 + client/src/translations/fr/common.json | 1 + 5 files changed, 38 insertions(+) diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 2e67dadb7..fe6074ad7 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -29976,6 +29976,27 @@ + + totalhours + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + touchtime false diff --git a/client/src/components/production-list-columns/production-list-columns.data.js b/client/src/components/production-list-columns/production-list-columns.data.js index e5fa10398..df526004f 100644 --- a/client/src/components/production-list-columns/production-list-columns.data.js +++ b/client/src/components/production-list-columns/production-list-columns.data.js @@ -214,6 +214,20 @@ const r = ({ technician, state }) => { state.sortedInfo.columnKey === "larhrs" && state.sortedInfo.order, render: (text, record) => record.larhrs.aggregate.sum.mod_lb_hrs, }, + { + title: i18n.t("production.labels.totalhours"), + dataIndex: "totalhours", + key: "totalhours", + sorter: (a, b) => + a.labhrs.aggregate.sum.mod_lb_hrs + + a.larhrs.aggregate.sum.mod_lb_hrs - + (b.labhrs.aggregate.sum.mod_lb_hrs + b.larhrs.aggregate.sum.mod_lb_hrs), + sortOrder: + state.sortedInfo.columnKey === "totalhours" && state.sortedInfo.order, + render: (text, record) => + record.labhrs.aggregate.sum.mod_lb_hrs + + record.larhrs.aggregate.sum.mod_lb_hrs, + }, { title: i18n.t("production.labels.alert"), dataIndex: "alert", diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index 1052473f2..3de4f38fa 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -1793,6 +1793,7 @@ "refinishhours": "R", "selectview": "Select a View", "sublets": "Sublets", + "totalhours": "Total Hrs", "touchtime": "T/T", "viewname": "View Name" }, diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index c30991516..81fc4ef5b 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -1793,6 +1793,7 @@ "refinishhours": "", "selectview": "", "sublets": "", + "totalhours": "", "touchtime": "", "viewname": "" }, diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index e0e4be725..b4148f7ec 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -1793,6 +1793,7 @@ "refinishhours": "", "selectview": "", "sublets": "", + "totalhours": "", "touchtime": "", "viewname": "" },