feature/IO-3357-Reynolds-and-Reynolds-DMS-API-Integration / Merges and adjustments
This commit is contained in:
@@ -49,8 +49,8 @@ import {
|
||||
validatePasswordResetSuccess
|
||||
} from "./user.actions";
|
||||
import UserActionTypes from "./user.types";
|
||||
//import * as amplitude from '@amplitude/analytics-browser';
|
||||
import posthog from "posthog-js";
|
||||
import { bodyshopHasDmsKey, determineDMSTypeByBodyshop, DMS_MAP } from "../../utils/dmsUtils";
|
||||
|
||||
const fpPromise = FingerprintJS.load();
|
||||
|
||||
@@ -387,16 +387,15 @@ export function* SetAuthLevelFromShopDetails({ payload }) {
|
||||
)
|
||||
];
|
||||
|
||||
const hasDmsKey = bodyshopHasDmsKey(payload);
|
||||
const dmsType = hasDmsKey ? determineDMSTypeByBodyshop(payload) : null;
|
||||
|
||||
const additionalSegments = [
|
||||
payload.cdk_dealerid && "CDK",
|
||||
payload.pbs_serialnumber && "PBS",
|
||||
// payload.rr_dealerid && "Reynolds",
|
||||
payload.accountingconfig.qbo === true && "QBO",
|
||||
payload.accountingconfig.qbo === false &&
|
||||
!payload.cdk_dealerid &&
|
||||
!payload.pbs_serialnumber &&
|
||||
// !payload.rr_dealerid &&
|
||||
"QBD"
|
||||
dmsType === DMS_MAP.cdk && DMS_MAP.cdk.toUpperCase(),
|
||||
dmsType === DMS_MAP.pbs && DMS_MAP.pbs.toUpperCase(),
|
||||
dmsType === DMS_MAP.reynolds && DMS_MAP.reynolds.toUpperCase(),
|
||||
payload.accountingconfig?.qbo === true && "QBO",
|
||||
payload.accountingconfig?.qbo === false && !hasDmsKey && "QBD"
|
||||
].filter(Boolean);
|
||||
|
||||
featureSegments.push(...additionalSegments);
|
||||
|
||||
Reference in New Issue
Block a user