Add clear marked lines on repair data.

This commit is contained in:
Patrick Fic
2021-04-12 15:38:45 -07:00
parent ca18c51654
commit 68d8da7be5
5 changed files with 28 additions and 0 deletions

View File

@@ -12123,6 +12123,27 @@
</translation>
</translations>
</concept_node>
<concept_node>
<name>clear</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>confirmpassword</name>
<definition_loaded>false</definition_loaded>

View File

@@ -307,6 +307,8 @@ export function JobLinesComponent({
};
const handleMark = (e) => {
if (e.key === "clear") setSelectedLines([]);
setSelectedLines([
...selectedLines,
...jobLines.filter((item) => item.part_type === e.key),
@@ -319,6 +321,7 @@ export function JobLinesComponent({
<Menu.Item key="PAN">{t("joblines.fields.part_types.PAN")}</Menu.Item>
<Menu.Item key="PAL">{t("joblines.fields.part_types.PAL")}</Menu.Item>
<Menu.Item key="PAS">{t("joblines.fields.part_types.PAS")}</Menu.Item>
<Menu.Item key="clear">{t("general.labels.clear")}</Menu.Item>
</Menu>
);
@@ -362,6 +365,7 @@ export function JobLinesComponent({
}}
>
{t("parts.actions.order")}
{selectedLines.length > 0 && ` (${selectedLines.length})`}
</Button>
<Button
onClick={() => {

View File

@@ -779,6 +779,7 @@
"areyousure": "Are you sure?",
"barcode": "Barcode",
"cancel": "Are you sure you want to cancel? Your changes will not be saved.",
"clear": "Clear",
"confirmpassword": "Confirm Password",
"email": "Email",
"errors": "Errors",

View File

@@ -779,6 +779,7 @@
"areyousure": "",
"barcode": "código de barras",
"cancel": "",
"clear": "",
"confirmpassword": "",
"email": "",
"errors": "",

View File

@@ -779,6 +779,7 @@
"areyousure": "",
"barcode": "code à barre",
"cancel": "",
"clear": "",
"confirmpassword": "",
"email": "",
"errors": "",