diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 8c0b95f2a..1a1ec7f14 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -9775,6 +9775,27 @@ + + filterpartsonly + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + gotojob 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 9ae0a8012..e2cf141ed 100644 --- a/client/src/components/job-detail-lines/job-lines.component.jsx +++ b/client/src/components/job-detail-lines/job-lines.component.jsx @@ -1,4 +1,4 @@ -import { SyncOutlined } from "@ant-design/icons"; +import { SyncOutlined, FilterFilled } from "@ant-design/icons"; import { Button, Dropdown, Input, Menu, Table } from "antd"; import React, { useState } from "react"; import { useTranslation } from "react-i18next"; @@ -35,6 +35,7 @@ export function JobLinesComponent({ }) { const [state, setState] = useState({ sortedInfo: {}, + filteredInfo: {}, }); const { t } = useTranslation(); @@ -88,6 +89,7 @@ export function JobLinesComponent({ title: t("joblines.fields.part_type"), dataIndex: "part_type", key: "part_type", + filteredValue: state.filteredInfo.part_type || null, sorter: (a, b) => alphaSort(a.part_type, b.part_type), sortOrder: state.sortedInfo.columnKey === "part_type" && state.sortedInfo.order, @@ -265,6 +267,7 @@ export function JobLinesComponent({ ]; const handleTableChange = (pagination, filters, sorter) => { + console.log("filters", filters); setState({ ...state, filteredInfo: filters, sortedInfo: sorter }); }; @@ -283,7 +286,7 @@ export function JobLinesComponent({ {t("joblines.fields.part_types.PAS")} ); - + console.log("state", state); return (
@@ -319,6 +322,18 @@ export function JobLinesComponent({ > {t("parts.actions.order")} + diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index 0e3d4d468..501385ca3 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -639,6 +639,7 @@ "convert": "Convert", "export": "Export", "exportselected": "Export Selected", + "filterpartsonly": "Filter Parts Only", "gotojob": "Go to Job", "intake": "Intake", "manualnew": "Create New Job Manually", diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index f9304005e..86578d663 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -639,6 +639,7 @@ "convert": "Convertir", "export": "", "exportselected": "", + "filterpartsonly": "", "gotojob": "", "intake": "", "manualnew": "", diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index cbcbb1b69..362999dc6 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -639,6 +639,7 @@ "convert": "Convertir", "export": "", "exportselected": "", + "filterpartsonly": "", "gotojob": "", "intake": "", "manualnew": "",