diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 80916ceb2..edec30bd5 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -38091,6 +38091,27 @@ + + production_by_category_one + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + production_by_csr false diff --git a/client/src/components/production-list-table/production-list-print.component.jsx b/client/src/components/production-list-table/production-list-print.component.jsx index aad4287aa..4f64491c2 100644 --- a/client/src/components/production-list-table/production-list-print.component.jsx +++ b/client/src/components/production-list-table/production-list-print.component.jsx @@ -8,7 +8,8 @@ import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { selectBodyshop } from "../../redux/user/user.selectors"; const ProdTemplates = TemplateList("production"); -const ProductionByTech = TemplateList("special").production_by_technician_one; +const { production_by_technician_one, production_by_category_one } = + TemplateList("special"); const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, @@ -58,7 +59,7 @@ export function ProductionListPrint({ bodyshop }) { setLoading(true); await GenerateDocument( { - name: ProductionByTech.key, + name: production_by_technician_one.key, variables: { id: e.id }, }, {}, @@ -71,6 +72,29 @@ export function ProductionListPrint({ bodyshop }) { ))} + + {bodyshop.md_categories.map((e) => ( + { + setLoading(true); + await GenerateDocument( + { + name: production_by_category_one.key, + variables: { category: e }, + }, + {}, + "p" + ); + setLoading(false); + }} + > + {e} + + ))} + } > diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index 9f76efb80..b75df9c04 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -2264,6 +2264,7 @@ "payments_by_date": "Payments by Date", "payments_by_date_type": "Payments by Date and Type", "production_by_category": "Production by Category", + "production_by_category_one": "Production filtered by Category", "production_by_csr": "Production by CSR", "production_by_last_name": "Production by Last Name", "production_by_repair_status": "Production by Status", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index 109ed5b6f..2a1bd2a05 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -2264,6 +2264,7 @@ "payments_by_date": "", "payments_by_date_type": "", "production_by_category": "", + "production_by_category_one": "", "production_by_csr": "", "production_by_last_name": "", "production_by_repair_status": "", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index 6d88ba81b..2a6de9d14 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -2264,6 +2264,7 @@ "payments_by_date": "", "payments_by_date_type": "", "production_by_category": "", + "production_by_category_one": "", "production_by_csr": "", "production_by_last_name": "", "production_by_repair_status": "", diff --git a/client/src/utils/TemplateConstants.js b/client/src/utils/TemplateConstants.js index 38f99163d..64aebaa7c 100644 --- a/client/src/utils/TemplateConstants.js +++ b/client/src/utils/TemplateConstants.js @@ -1647,6 +1647,16 @@ export const TemplateList = (type, context) => { //idtype: "vendor", disabled: false, }, + production_by_category_one: { + title: i18n.t("reportcenter.templates.production_by_category_one"), + description: "", + subject: i18n.t( + "reportcenter.templates.production_by_category_one" + ), + key: "production_by_category_one", + //idtype: "vendor", + disabled: false, + }, } : {}), };