Merged in feature/IO-2411-active-employee-filtering (pull request #1010)

IO-2411 filter inactive employees on prod. print button
This commit is contained in:
Patrick Fic
2023-10-16 16:35:44 +00:00

View File

@@ -55,25 +55,27 @@ export function ProductionListPrint({ bodyshop }) {
<Menu.SubMenu <Menu.SubMenu
title={t("reportcenter.templates.production_by_technician_one")} title={t("reportcenter.templates.production_by_technician_one")}
> >
{bodyshop.employees.map((e) => ( {bodyshop.employees
<Menu.Item .filter((e) => e.active)
key={e.id} .map((e) => (
onClick={async () => { <Menu.Item
setLoading(true); key={e.id}
await GenerateDocument( onClick={async () => {
{ setLoading(true);
name: production_by_technician_one.key, await GenerateDocument(
variables: { id: e.id }, {
}, name: production_by_technician_one.key,
{}, variables: { id: e.id },
"p" },
); {},
setLoading(false); "p"
}} );
> setLoading(false);
{e.first_name} {e.last_name} }}
</Menu.Item> >
))} {e.first_name} {e.last_name}
</Menu.Item>
))}
</Menu.SubMenu> </Menu.SubMenu>
<Menu.SubMenu <Menu.SubMenu
title={t("reportcenter.templates.production_by_category_one")} title={t("reportcenter.templates.production_by_category_one")}