From bef358aff71e7ad9809aaea7405de27341931982 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Thu, 29 Jan 2026 08:47:00 -0500 Subject: [PATCH 1/3] CASH-2098 CASH-2098 additional experiment settings to control the mobile first modal on schedule page. --- src/constants/experiments.js | 3 ++ src/layouts/schedule/schedule.vue | 56 +++++++++++++++++++++++++++---- 2 files changed, 53 insertions(+), 6 deletions(-) diff --git a/src/constants/experiments.js b/src/constants/experiments.js index 1d689d727..f81484058 100644 --- a/src/constants/experiments.js +++ b/src/constants/experiments.js @@ -36,6 +36,9 @@ const experimentSettings = { SHOW_PM_MOBILE_DAYS: "Show_PMmobileDays", SHOW_NO_PM_MOBILE_DAYS: "Show_NoPMmobileDays", SHOW_NO_MOBILE_AVAILABLE_DAYS: "Show_NoMobileAvailableDays", + SHOW_MOBILE_FIRST_POPUP_REPAIR: "Show_Mobile_First_Popup_Repair", + SHOW_MOBILE_FIRST_POPUP_REPLACE_WITHOUT_MSR: "Show_Mobile_First_Popup_Replace_Without_MSR", + SHOW_MOBILE_FIRST_POPUP_REPLACE_WITH_MSR: "Show_Mobile_First_Popup_Replace_With_MSR", OFFER_OEM: "OfferOem", USE_ADYEN_PAYMENT: "UseAdyenPayment", }; diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index f7c1ead18..d6313375e 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -1840,7 +1840,19 @@ export default { const noMobileAvailableDays = experimentMixin.methods.getSettingValue( experimentSettings.SHOW_NO_MOBILE_AVAILABLE_DAYS ); + const mobileFirstPopupRepairSetting = experimentMixin.methods.getSettingValue( + experimentSettings.SHOW_MOBILE_FIRST_POPUP_REPAIR + ); + const mobileFirstPopupReplaceWithoutMsrSetting = experimentMixin.methods.getSettingValue( + experimentSettings.SHOW_MOBILE_FIRST_POPUP_REPLACE_WITHOUT_MSR + ); + const mobileFirstPopupReplaceWithMsrSetting = experimentMixin.methods.getSettingValue( + experimentSettings.SHOW_MOBILE_FIRST_POPUP_REPLACE_WITH_MSR + ); + const order = this.$store.getters.order; + const isRepair = order.damage.isRepair; + let preSelectedMobileAppointment = null; const todaysDate = getTodayDate(); let firstMobileAMAppt = await this.getFirstAvailableMobileApptByTOD("AM"); @@ -1856,12 +1868,44 @@ export default { (new Date(firstMobilePMDate) - todaysDate) / (1000 * 60 * 60 * 24); const shouldExposeMobileFirstAppointment = () => { - return ( - (firstMobileAMDate && - numberOfDaysToFirstMobileAMDate <= noMobileAvailableDays) || - (firstMobilePMDate && - numberOfDaysToFirstMobilePMDate <= noMobileAvailableDays) - ); + const mobileFirstDaysCheck = (firstMobileAMDate && numberOfDaysToFirstMobileAMDate <= noMobileAvailableDays) || + (firstMobilePMDate && numberOfDaysToFirstMobilePMDate <= noMobileAvailableDays); + debugLog("MSR::: Mobile First Days Check:", mobileFirstDaysCheck); + + if (mobileFirstPopupRepairSetting === "false" && + mobileFirstPopupReplaceWithoutMsrSetting === "false" && + mobileFirstPopupReplaceWithMsrSetting === "false") { + debugLog("MSR::: Mobile First Damage Popup settings are all false, using default check."); + return mobileFirstDaysCheck; + } + + if (isRepair) { + if (mobileFirstPopupRepairSetting === "true") { + debugLog("MSR::: Mobile First Popup Repair setting is true, showing mobile first appointment for repair."); + return mobileFirstDaysCheck; + } else { + debugLog("MSR::: Mobile First Popup Repair setting is false, not showing mobile first appointment for repair."); + return false; + } + } + + if (this.isMobileStaticRecalibrationApplicable) { + if (mobileFirstPopupReplaceWithMsrSetting === "true") { + debugLog("MSR::: Mobile First Popup Replace with MSR setting is true, showing mobile first appointment for replace with MSR."); + return mobileFirstDaysCheck; + } else { + debugLog("MSR::: Mobile First Popup Replace with MSR setting is false, not showing mobile first appointment for replace with MSR."); + return false; + } + } + + if (mobileFirstPopupReplaceWithoutMsrSetting === "true") { + debugLog("MSR::: Mobile First Popup Replace without MSR setting is true, showing mobile first appointment for replace without MSR."); + return mobileFirstDaysCheck; + } else { + debugLog("MSR::: Mobile First Popup Replace without MSR setting is false, not showing mobile first appointment for replace without MSR."); + return false; + } }; if (shouldExposeMobileFirstAppointment()) { From ab7a541dfa380626a544e6943433eb86f6098532 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Thu, 29 Jan 2026 09:07:13 -0500 Subject: [PATCH 2/3] CASH-2098 CASH-2098 log msg is not MSR specific all of the time. cleanup --- src/layouts/schedule/schedule.vue | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index d6313375e..8dbc5cec9 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -1870,40 +1870,40 @@ export default { const shouldExposeMobileFirstAppointment = () => { const mobileFirstDaysCheck = (firstMobileAMDate && numberOfDaysToFirstMobileAMDate <= noMobileAvailableDays) || (firstMobilePMDate && numberOfDaysToFirstMobilePMDate <= noMobileAvailableDays); - debugLog("MSR::: Mobile First Days Check:", mobileFirstDaysCheck); + debugLog("::: Mobile First Days Check:", mobileFirstDaysCheck); if (mobileFirstPopupRepairSetting === "false" && mobileFirstPopupReplaceWithoutMsrSetting === "false" && mobileFirstPopupReplaceWithMsrSetting === "false") { - debugLog("MSR::: Mobile First Damage Popup settings are all false, using default check."); + debugLog("::: Mobile First Damage Popup settings are all false, using default check."); return mobileFirstDaysCheck; } if (isRepair) { if (mobileFirstPopupRepairSetting === "true") { - debugLog("MSR::: Mobile First Popup Repair setting is true, showing mobile first appointment for repair."); + debugLog("::: Mobile First Popup Repair setting is true, showing mobile first appointment for repair."); return mobileFirstDaysCheck; } else { - debugLog("MSR::: Mobile First Popup Repair setting is false, not showing mobile first appointment for repair."); + debugLog("::: Mobile First Popup Repair setting is false, not showing mobile first appointment for repair."); return false; } } if (this.isMobileStaticRecalibrationApplicable) { if (mobileFirstPopupReplaceWithMsrSetting === "true") { - debugLog("MSR::: Mobile First Popup Replace with MSR setting is true, showing mobile first appointment for replace with MSR."); + debugLog("::: Mobile First Popup Replace with MSR setting is true, showing mobile first appointment for replace with MSR."); return mobileFirstDaysCheck; } else { - debugLog("MSR::: Mobile First Popup Replace with MSR setting is false, not showing mobile first appointment for replace with MSR."); + debugLog("::: Mobile First Popup Replace with MSR setting is false, not showing mobile first appointment for replace with MSR."); return false; } } if (mobileFirstPopupReplaceWithoutMsrSetting === "true") { - debugLog("MSR::: Mobile First Popup Replace without MSR setting is true, showing mobile first appointment for replace without MSR."); + debugLog("::: Mobile First Popup Replace without MSR setting is true, showing mobile first appointment for replace without MSR."); return mobileFirstDaysCheck; } else { - debugLog("MSR::: Mobile First Popup Replace without MSR setting is false, not showing mobile first appointment for replace without MSR."); + debugLog("::: Mobile First Popup Replace without MSR setting is false, not showing mobile first appointment for replace without MSR."); return false; } }; From 945eddd5b0150407760e5eae8a135c2a9ef7d7ce Mon Sep 17 00:00:00 2001 From: CarlNation Date: Thu, 29 Jan 2026 09:10:51 -0500 Subject: [PATCH 3/3] CASH-2098 CASH-2098 prettier --- src/layouts/schedule/schedule.vue | 59 +++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 19 deletions(-) diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index 8dbc5cec9..72453c65c 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -1843,16 +1843,18 @@ export default { const mobileFirstPopupRepairSetting = experimentMixin.methods.getSettingValue( experimentSettings.SHOW_MOBILE_FIRST_POPUP_REPAIR ); - const mobileFirstPopupReplaceWithoutMsrSetting = experimentMixin.methods.getSettingValue( - experimentSettings.SHOW_MOBILE_FIRST_POPUP_REPLACE_WITHOUT_MSR - ); - const mobileFirstPopupReplaceWithMsrSetting = experimentMixin.methods.getSettingValue( - experimentSettings.SHOW_MOBILE_FIRST_POPUP_REPLACE_WITH_MSR - ); + const mobileFirstPopupReplaceWithoutMsrSetting = + experimentMixin.methods.getSettingValue( + experimentSettings.SHOW_MOBILE_FIRST_POPUP_REPLACE_WITHOUT_MSR + ); + const mobileFirstPopupReplaceWithMsrSetting = + experimentMixin.methods.getSettingValue( + experimentSettings.SHOW_MOBILE_FIRST_POPUP_REPLACE_WITH_MSR + ); const order = this.$store.getters.order; const isRepair = order.damage.isRepair; - + let preSelectedMobileAppointment = null; const todaysDate = getTodayDate(); let firstMobileAMAppt = await this.getFirstAvailableMobileApptByTOD("AM"); @@ -1868,42 +1870,61 @@ export default { (new Date(firstMobilePMDate) - todaysDate) / (1000 * 60 * 60 * 24); const shouldExposeMobileFirstAppointment = () => { - const mobileFirstDaysCheck = (firstMobileAMDate && numberOfDaysToFirstMobileAMDate <= noMobileAvailableDays) || - (firstMobilePMDate && numberOfDaysToFirstMobilePMDate <= noMobileAvailableDays); - debugLog("::: Mobile First Days Check:", mobileFirstDaysCheck); + const mobileFirstDaysCheck = + (firstMobileAMDate && + numberOfDaysToFirstMobileAMDate <= noMobileAvailableDays) || + (firstMobilePMDate && + numberOfDaysToFirstMobilePMDate <= noMobileAvailableDays); + debugLog("::: Mobile First Days Check:", mobileFirstDaysCheck); - if (mobileFirstPopupRepairSetting === "false" && + if ( + mobileFirstPopupRepairSetting === "false" && mobileFirstPopupReplaceWithoutMsrSetting === "false" && - mobileFirstPopupReplaceWithMsrSetting === "false") { - debugLog("::: Mobile First Damage Popup settings are all false, using default check."); + mobileFirstPopupReplaceWithMsrSetting === "false" + ) { + debugLog( + "::: Mobile First Damage Popup settings are all false, using default check." + ); return mobileFirstDaysCheck; } if (isRepair) { if (mobileFirstPopupRepairSetting === "true") { - debugLog("::: Mobile First Popup Repair setting is true, showing mobile first appointment for repair."); + debugLog( + "::: Mobile First Popup Repair setting is true, showing mobile first appointment for repair." + ); return mobileFirstDaysCheck; } else { - debugLog("::: Mobile First Popup Repair setting is false, not showing mobile first appointment for repair."); + debugLog( + "::: Mobile First Popup Repair setting is false, not showing mobile first appointment for repair." + ); return false; } } if (this.isMobileStaticRecalibrationApplicable) { if (mobileFirstPopupReplaceWithMsrSetting === "true") { - debugLog("::: Mobile First Popup Replace with MSR setting is true, showing mobile first appointment for replace with MSR."); + debugLog( + "::: Mobile First Popup Replace with MSR setting is true, showing mobile first appointment for replace with MSR." + ); return mobileFirstDaysCheck; } else { - debugLog("::: Mobile First Popup Replace with MSR setting is false, not showing mobile first appointment for replace with MSR."); + debugLog( + "::: Mobile First Popup Replace with MSR setting is false, not showing mobile first appointment for replace with MSR." + ); return false; } } if (mobileFirstPopupReplaceWithoutMsrSetting === "true") { - debugLog("::: Mobile First Popup Replace without MSR setting is true, showing mobile first appointment for replace without MSR."); + debugLog( + "::: Mobile First Popup Replace without MSR setting is true, showing mobile first appointment for replace without MSR." + ); return mobileFirstDaysCheck; } else { - debugLog("::: Mobile First Popup Replace without MSR setting is false, not showing mobile first appointment for replace without MSR."); + debugLog( + "::: Mobile First Popup Replace without MSR setting is false, not showing mobile first appointment for replace without MSR." + ); return false; } };