IO-1632 Update tech console for CDK posting.

This commit is contained in:
Patrick Fic
2022-01-11 10:12:10 -08:00
parent 0e2be2012e
commit 1c2a64cf50
3 changed files with 20 additions and 9 deletions

View File

@@ -49,9 +49,13 @@ export function TechClockInComponent({ form, bodyshop, technician }) {
<Select>
{emps &&
emps.rates.map((item) => (
<Select.Option key={item.cost_center}>
<Select.Option key={item.cost_center} value={item.cost_center}>
{item.cost_center === "timetickets.labels.shift"
? t(item.cost_center)
: bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber
? t(
`joblines.fields.lbr_types.${item.cost_center.toUpperCase()}`
)
: item.cost_center}
</Select.Option>
))}

View File

@@ -36,14 +36,17 @@ export function TechClockInContainer({ technician, bodyshop }) {
clockon: theTime,
jobid: values.jobid,
cost_center: values.cost_center,
ciecacode: Object.keys(
bodyshop.md_responsibility_centers.defaults.costs
).find((key) => {
return (
bodyshop.md_responsibility_centers.defaults.costs[key] ===
values.cost_center
);
}),
ciecacode:
bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber
? values.cost_center
: Object.keys(
bodyshop.md_responsibility_centers.defaults.costs
).find((key) => {
return (
bodyshop.md_responsibility_centers.defaults.costs[key] ===
values.cost_center
);
}),
},
],
},

View File

@@ -141,6 +141,10 @@ export function TechClockOffButton({
<Select.Option key={item.cost_center}>
{item.cost_center === "timetickets.labels.shift"
? t(item.cost_center)
: bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber
? t(
`joblines.fields.lbr_types.${item.cost_center.toUpperCase()}`
)
: item.cost_center}
</Select.Option>
))