From 68d8da7be566089016658f1f50100a3de86cb2d0 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Mon, 12 Apr 2021 15:38:45 -0700 Subject: [PATCH] Add clear marked lines on repair data. --- bodyshop_translations.babel | 21 +++++++++++++++++++ .../job-detail-lines/job-lines.component.jsx | 4 ++++ client/src/translations/en_us/common.json | 1 + client/src/translations/es/common.json | 1 + client/src/translations/fr/common.json | 1 + 5 files changed, 28 insertions(+) diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index ce1c3fcd9..2f84f3454 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -12123,6 +12123,27 @@ + + clear + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + confirmpassword false diff --git a/client/src/components/job-detail-lines/job-lines.component.jsx b/client/src/components/job-detail-lines/job-lines.component.jsx index 88f6e5df4..5b60a355d 100644 --- a/client/src/components/job-detail-lines/job-lines.component.jsx +++ b/client/src/components/job-detail-lines/job-lines.component.jsx @@ -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({ {t("joblines.fields.part_types.PAN")} {t("joblines.fields.part_types.PAL")} {t("joblines.fields.part_types.PAS")} + {t("general.labels.clear")} ); @@ -362,6 +365,7 @@ export function JobLinesComponent({ }} > {t("parts.actions.order")} + {selectedLines.length > 0 && ` (${selectedLines.length})`}