Merge pull request #2896 from Safelite/nation/CASH-1637
Nation/cash 1637
This commit is contained in:
commit
3d64175744
3 changed files with 20 additions and 1 deletions
|
|
@ -125,6 +125,16 @@ export function getSessionKeyValue() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getskeyValue() {
|
||||||
|
const cookieValue = getCookieValueByName(cookieNames.SESSION_KEY);
|
||||||
|
|
||||||
|
if (cookieValue) {
|
||||||
|
return cookieValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
export function setSessionKeyIfUnset(value) {
|
export function setSessionKeyIfUnset(value) {
|
||||||
if (!isCookieSet(cookieNames.FUNNEL_SESSION_KEY)) {
|
if (!isCookieSet(cookieNames.FUNNEL_SESSION_KEY)) {
|
||||||
setCookieProperties(
|
setCookieProperties(
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import {
|
||||||
areAllSessionCookiesSet,
|
areAllSessionCookiesSet,
|
||||||
setSessionIdIfUnset,
|
setSessionIdIfUnset,
|
||||||
setSessionKeyIfUnset,
|
setSessionKeyIfUnset,
|
||||||
|
getskeyValue,
|
||||||
} from "@/helpers/heritage-integration/cookie-helper";
|
} from "@/helpers/heritage-integration/cookie-helper";
|
||||||
import { queryStrings } from "@/constants/query-strings";
|
import { queryStrings } from "@/constants/query-strings";
|
||||||
import { experimentSettings, experimentUniverses } from "@/constants/experiments";
|
import { experimentSettings, experimentUniverses } from "@/constants/experiments";
|
||||||
|
|
@ -231,11 +232,14 @@ export default {
|
||||||
(part) => `${part.glassLocation}-${part.glassName}`
|
(part) => `${part.glassLocation}-${part.glassName}`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
var appointment = `${order?.schedule?.date ?? ""} ${order?.schedule?.startTime ?? ""}`;
|
||||||
|
|
||||||
var sessionData = {};
|
var sessionData = {};
|
||||||
sessionData.currentPage = getPageNameFromRouter();
|
sessionData.currentPage = getPageNameFromRouter();
|
||||||
sessionData.sid = getSessionIdValue();
|
sessionData.sid = getSessionIdValue();
|
||||||
sessionData.deviceId = getDeviceIdValue();
|
sessionData.deviceId = getDeviceIdValue();
|
||||||
sessionData.fmgSessionId = applicationUser?.savedSessionId;
|
sessionData.fmgSessionId = applicationUser?.savedSessionId;
|
||||||
|
sessionData.skey = getskeyValue().toString();
|
||||||
sessionData.userId = getUserIdValue();
|
sessionData.userId = getUserIdValue();
|
||||||
sessionData.carId = order?.vehicle?.carId;
|
sessionData.carId = order?.vehicle?.carId;
|
||||||
sessionData.vehicleYear = order?.vehicle?.year;
|
sessionData.vehicleYear = order?.vehicle?.year;
|
||||||
|
|
@ -266,7 +270,7 @@ export default {
|
||||||
sessionData.providerCtu = order?.serviceLocation?.provider?.address?.zipCodeCtu
|
sessionData.providerCtu = order?.serviceLocation?.provider?.address?.zipCodeCtu
|
||||||
? order?.serviceLocation?.provider?.address?.zipCodeCtu
|
? order?.serviceLocation?.provider?.address?.zipCodeCtu
|
||||||
: order?.serviceLocation?.zipCodeCtu;
|
: order?.serviceLocation?.zipCodeCtu;
|
||||||
sessionData.appointmentDate = `${order?.schedule?.date} ${order?.schedule?.startTime}`;
|
sessionData.appointmentDate = appointment;
|
||||||
sessionData.serviceType = order?.serviceLocation?.appointmentType;
|
sessionData.serviceType = order?.serviceLocation?.appointmentType;
|
||||||
sessionData.promoCodes = promoCodes;
|
sessionData.promoCodes = promoCodes;
|
||||||
sessionData.hasTechnicianNotes = order?.serviceLocation?.techNotes ? true : false;
|
sessionData.hasTechnicianNotes = order?.serviceLocation?.techNotes ? true : false;
|
||||||
|
|
@ -280,6 +284,7 @@ export default {
|
||||||
sessionData.isItac = order?.policy?.isItac;
|
sessionData.isItac = order?.policy?.isItac;
|
||||||
sessionData.subTotalPrice = getSubTotal(order?.lineItems);
|
sessionData.subTotalPrice = getSubTotal(order?.lineItems);
|
||||||
sessionData.totalPrice = getAmountDue(order?.lineItems, true);
|
sessionData.totalPrice = getAmountDue(order?.lineItems, true);
|
||||||
|
sessionData.userAgent = navigator.userAgent;
|
||||||
|
|
||||||
await baseMixin.methods.dispatchStoreAction(
|
await baseMixin.methods.dispatchStoreAction(
|
||||||
storeActions.LOG_FMG_SESSION_DATA,
|
storeActions.LOG_FMG_SESSION_DATA,
|
||||||
|
|
|
||||||
|
|
@ -1601,6 +1601,7 @@ export const actions = {
|
||||||
sid,
|
sid,
|
||||||
deviceId,
|
deviceId,
|
||||||
fmgSessionId,
|
fmgSessionId,
|
||||||
|
skey,
|
||||||
userId,
|
userId,
|
||||||
carId,
|
carId,
|
||||||
vehicleYear,
|
vehicleYear,
|
||||||
|
|
@ -1639,6 +1640,7 @@ export const actions = {
|
||||||
isItac,
|
isItac,
|
||||||
subTotalPrice,
|
subTotalPrice,
|
||||||
totalPrice,
|
totalPrice,
|
||||||
|
userAgent,
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
var payload = {
|
var payload = {
|
||||||
|
|
@ -1646,6 +1648,7 @@ export const actions = {
|
||||||
sid: sid,
|
sid: sid,
|
||||||
deviceId: deviceId,
|
deviceId: deviceId,
|
||||||
fmgSessionId: fmgSessionId,
|
fmgSessionId: fmgSessionId,
|
||||||
|
skey: skey,
|
||||||
userId: userId,
|
userId: userId,
|
||||||
carId: carId,
|
carId: carId,
|
||||||
vehicleYear: vehicleYear,
|
vehicleYear: vehicleYear,
|
||||||
|
|
@ -1684,6 +1687,7 @@ export const actions = {
|
||||||
isItac: isItac,
|
isItac: isItac,
|
||||||
subTotalPrice: subTotalPrice,
|
subTotalPrice: subTotalPrice,
|
||||||
totalPrice: totalPrice,
|
totalPrice: totalPrice,
|
||||||
|
userAgent,
|
||||||
};
|
};
|
||||||
|
|
||||||
return globalMethods.callHttpClient({
|
return globalMethods.callHttpClient({
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue