feature/Reynolds-and-Reynolds-DMS-API-Integration - Add dealer id / merge fortellis

This commit is contained in:
Dave
2025-09-12 14:59:42 -04:00
parent 2fec9fd16e
commit 7c8260685e
37 changed files with 124 additions and 83 deletions

View File

@@ -60,7 +60,10 @@ export function TimeTicketModalComponent({
<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 || Enhanced_Payroll.treatment === "on"
: bodyshop.cdk_dealerid ||
bodyshop.pbs_serialnumber ||
bodyshop.rr_dealerid ||
Enhanced_Payroll.treatment === "on"
? t(`joblines.fields.lbr_types.${item.cost_center.toUpperCase()}`)
: item.cost_center}
</Select.Option>
@@ -187,7 +190,9 @@ export function TimeTicketModalComponent({
);
const fieldTypeToCheck =
bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber ? "mod_lbr_ty" : "cost_center";
bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || bodyshop.rr_dealerid
? "mod_lbr_ty"
: "cost_center";
const costCenterDiff =
Math.round(

View File

@@ -137,7 +137,10 @@ export function TimeTicketModalContainer({ timeTicketModal, toggleModalVisible,
if (!!changedFields.cost_center && !!EmployeeAutoCompleteData) {
form.setFieldsValue({
ciecacode:
bodyshop.cdk_dealerid || bodyshop.pbs_serialnumber || Enhanced_Payroll.treatment === "on"
bodyshop.cdk_dealerid ||
bodyshop.pbs_serialnumber ||
bodyshop.rr_dealerid ||
Enhanced_Payroll.treatment === "on"
? changedFields.cost_center
: Object.keys(bodyshop.md_responsibility_centers.defaults.costs).find(
(key) => bodyshop.md_responsibility_centers.defaults.costs[key] === changedFields.cost_center