Change part type and lbr type to plain english BOD-205

This commit is contained in:
Patrick Fic
2020-07-31 10:41:26 -07:00
parent 4d60ffd597
commit a1b03048e3
5 changed files with 396 additions and 6 deletions

View File

@@ -8,12 +8,12 @@ import { setModalContext } from "../../redux/modals/modals.actions";
import { onlyUnique } from "../../utils/arrayHelper";
import CurrencyFormatter from "../../utils/CurrencyFormatter";
import { alphaSort } from "../../utils/sorters";
import JobLineLocationPopup from "../job-line-location-popup/job-line-location-popup.component";
import JobLineNotePopup from "../job-line-note-popup/job-line-note-popup.component";
// import AllocationsAssignmentContainer from "../allocations-assignment/allocations-assignment.container";
// 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 JobLineNotePopup from "../job-line-note-popup/job-line-note-popup.component";
import JobLineLocationPopup from "../job-line-location-popup/job-line-location-popup.component";
const mapDispatchToProps = (dispatch) => ({
setJobLineEditContext: (context) =>
@@ -97,23 +97,27 @@ export function JobLinesComponent({
value: ["PAN", "PAL", "PAA", "PAS", "PASL"],
},
{
text: "PAN",
text: t("joblines.fields.part_types.PAN"),
value: ["PAN"],
},
{
text: "PAL",
text: t("joblines.fields.part_types.PAL"),
value: ["PAL"],
},
{
text: "PAA",
text: t("joblines.fields.part_types.PAA"),
value: ["PAA"],
},
{
text: "PAS/PASL",
text: t("joblines.fields.part_types.PAS"),
value: ["PAS", "PASL"],
},
],
onFilter: (value, record) => value.includes(record.part_type),
render: (text, record) =>
record.part_type
? t(`joblines.fields.part_types.${record.part_type}`)
: null,
},
{
@@ -155,6 +159,10 @@ export function JobLinesComponent({
sorter: (a, b) => alphaSort(a.mod_lbr_ty, b.mod_lbr_ty),
sortOrder:
state.sortedInfo.columnKey === "mod_lbr_ty" && state.sortedInfo.order,
render: (text, record) =>
record.mod_lbr_ty
? t(`joblines.fields.lbr_types.${record.mod_lbr_ty}`)
: null,
},
{
title: t("joblines.fields.mod_lb_hrs"),