From 2ede54b901c63e4c6d9af76af3e47151f36da28d Mon Sep 17 00:00:00 2001 From: Patrick Fic <> Date: Mon, 25 Jul 2022 11:04:03 -0700 Subject: [PATCH] IO-1994 Resolve parts filtering status and sorting. --- .../job-detail-lines/job-lines.component.jsx | 52 ++++++++++++++++--- 1 file changed, 46 insertions(+), 6 deletions(-) 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 2b1ddf2b9..5c0cad744 100644 --- a/client/src/components/job-detail-lines/job-lines.component.jsx +++ b/client/src/components/job-detail-lines/job-lines.component.jsx @@ -144,11 +144,26 @@ export function JobLinesComponent({ filters: [ { text: t("jobs.labels.partsfilter"), - value: ["PAN", "PAP", "PAL", "PAA", "PAS", "PASL"], + value: [ + "PAN", + "PAC", + "PAR", + "PAL", + "PAA", + "PAM", + "PAP", + "PAS", + "PASL", + "PAG", + ], }, { text: t("joblines.fields.part_types.PAN"), - value: ["PAN", "PAP"], + value: ["PAN"], + }, + { + text: t("joblines.fields.part_types.PAP"), + value: ["PAP"], }, { text: t("joblines.fields.part_types.PAL"), @@ -158,9 +173,29 @@ export function JobLinesComponent({ text: t("joblines.fields.part_types.PAA"), value: ["PAA"], }, + { + text: t("joblines.fields.part_types.PAG"), + value: ["PAG"], + }, { text: t("joblines.fields.part_types.PAS"), - value: ["PAS", "PASL"], + value: ["PAS"], + }, + { + text: t("joblines.fields.part_types.PASL"), + value: ["PASL"], + }, + { + text: t("joblines.fields.part_types.PAC"), + value: ["PAC"], + }, + { + text: t("joblines.fields.part_types.PAR"), + value: ["PAR"], + }, + { + text: t("joblines.fields.part_types.PAM"), + value: ["PAM"], }, ], onFilter: (value, record) => value.includes(record.part_type), @@ -346,7 +381,11 @@ export function JobLinesComponent({ ]; const handleTableChange = (pagination, filters, sorter) => { - setState({ ...state, filteredInfo: filters, sortedInfo: sorter }); + setState((state) => ({ + ...state, + filteredInfo: filters, + sortedInfo: sorter, + })); }; const handleMark = (e) => { @@ -482,9 +521,10 @@ export function JobLinesComponent({