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 b02b26663..9d799b991 100644 --- a/client/src/components/job-detail-lines/job-lines.component.jsx +++ b/client/src/components/job-detail-lines/job-lines.component.jsx @@ -36,6 +36,7 @@ import JobLinesBillRefernece from "../job-lines-bill-reference/job-lines-bill-re // import AllocationsBulkAssignmentContainer from "../allocations-bulk-assignment/allocations-bulk-assignment.container"; // import AllocationsEmployeeLabelContainer from "../allocations-employee-label/allocations-employee-label.container"; import PartsOrderModalContainer from "../parts-order-modal/parts-order-modal.container"; +import _ from "lodash"; const mapStateToProps = createStructuredSelector({ //currentUser: selectCurrentUser @@ -334,10 +335,12 @@ export function JobLinesComponent({ const markedTypes = [e.key]; if (e.key === "PAN") markedTypes.push("PAP"); if (e.key === "PAS") markedTypes.push("PASL"); - setSelectedLines([ - ...selectedLines, - ...jobLines.filter((item) => markedTypes.includes(item.part_type)), - ]); + setSelectedLines( + _.uniq([ + ...selectedLines, + ...jobLines.filter((item) => markedTypes.includes(item.part_type)), + ]) + ); } };