IO-1669 Add print production by filtered category
This commit is contained in:
@@ -38091,6 +38091,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>production_by_category_one</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>production_by_csr</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
|
||||
@@ -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 }) {
|
||||
</Menu.Item>
|
||||
))}
|
||||
</Menu.SubMenu>
|
||||
<Menu.SubMenu
|
||||
title={t("reportcenter.templates.production_by_category_one")}
|
||||
>
|
||||
{bodyshop.md_categories.map((e) => (
|
||||
<Menu.Item
|
||||
key={e}
|
||||
onClick={async () => {
|
||||
setLoading(true);
|
||||
await GenerateDocument(
|
||||
{
|
||||
name: production_by_category_one.key,
|
||||
variables: { category: e },
|
||||
},
|
||||
{},
|
||||
"p"
|
||||
);
|
||||
setLoading(false);
|
||||
}}
|
||||
>
|
||||
{e}
|
||||
</Menu.Item>
|
||||
))}
|
||||
</Menu.SubMenu>
|
||||
</Menu>
|
||||
}
|
||||
>
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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": "",
|
||||
|
||||
@@ -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": "",
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
}
|
||||
: {}),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user