From 6efa08fee366bc362a6f71c9ba7012b3819a0084 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Mon, 16 Oct 2023 09:34:53 -0700 Subject: [PATCH] IO-2411 filter inactive employees on prod. print button --- .../production-list-print.component.jsx | 40 ++++++++++--------- 1 file changed, 21 insertions(+), 19 deletions(-) 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 4e31b33d0..547819061 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 @@ -55,25 +55,27 @@ export function ProductionListPrint({ bodyshop }) { - {bodyshop.employees.map((e) => ( - { - setLoading(true); - await GenerateDocument( - { - name: production_by_technician_one.key, - variables: { id: e.id }, - }, - {}, - "p" - ); - setLoading(false); - }} - > - {e.first_name} {e.last_name} - - ))} + {bodyshop.employees + .filter((e) => e.active) + .map((e) => ( + { + setLoading(true); + await GenerateDocument( + { + name: production_by_technician_one.key, + variables: { id: e.id }, + }, + {}, + "p" + ); + setLoading(false); + }} + > + {e.first_name} {e.last_name} + + ))}