CASH-2098

CASH-2098 prettier
This commit is contained in:
CarlNation 2026-01-29 09:10:51 -05:00
parent ab7a541dfa
commit 945eddd5b0

View file

@ -1843,16 +1843,18 @@ export default {
const mobileFirstPopupRepairSetting = experimentMixin.methods.getSettingValue( const mobileFirstPopupRepairSetting = experimentMixin.methods.getSettingValue(
experimentSettings.SHOW_MOBILE_FIRST_POPUP_REPAIR experimentSettings.SHOW_MOBILE_FIRST_POPUP_REPAIR
); );
const mobileFirstPopupReplaceWithoutMsrSetting = experimentMixin.methods.getSettingValue( const mobileFirstPopupReplaceWithoutMsrSetting =
experimentSettings.SHOW_MOBILE_FIRST_POPUP_REPLACE_WITHOUT_MSR 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 mobileFirstPopupReplaceWithMsrSetting =
); experimentMixin.methods.getSettingValue(
experimentSettings.SHOW_MOBILE_FIRST_POPUP_REPLACE_WITH_MSR
);
const order = this.$store.getters.order; const order = this.$store.getters.order;
const isRepair = order.damage.isRepair; const isRepair = order.damage.isRepair;
let preSelectedMobileAppointment = null; let preSelectedMobileAppointment = null;
const todaysDate = getTodayDate(); const todaysDate = getTodayDate();
let firstMobileAMAppt = await this.getFirstAvailableMobileApptByTOD("AM"); let firstMobileAMAppt = await this.getFirstAvailableMobileApptByTOD("AM");
@ -1868,42 +1870,61 @@ export default {
(new Date(firstMobilePMDate) - todaysDate) / (1000 * 60 * 60 * 24); (new Date(firstMobilePMDate) - todaysDate) / (1000 * 60 * 60 * 24);
const shouldExposeMobileFirstAppointment = () => { const shouldExposeMobileFirstAppointment = () => {
const mobileFirstDaysCheck = (firstMobileAMDate && numberOfDaysToFirstMobileAMDate <= noMobileAvailableDays) || const mobileFirstDaysCheck =
(firstMobilePMDate && numberOfDaysToFirstMobilePMDate <= noMobileAvailableDays); (firstMobileAMDate &&
debugLog("::: Mobile First Days Check:", mobileFirstDaysCheck); numberOfDaysToFirstMobileAMDate <= noMobileAvailableDays) ||
(firstMobilePMDate &&
numberOfDaysToFirstMobilePMDate <= noMobileAvailableDays);
debugLog("::: Mobile First Days Check:", mobileFirstDaysCheck);
if (mobileFirstPopupRepairSetting === "false" && if (
mobileFirstPopupRepairSetting === "false" &&
mobileFirstPopupReplaceWithoutMsrSetting === "false" && mobileFirstPopupReplaceWithoutMsrSetting === "false" &&
mobileFirstPopupReplaceWithMsrSetting === "false") { mobileFirstPopupReplaceWithMsrSetting === "false"
debugLog("::: 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; return mobileFirstDaysCheck;
} }
if (isRepair) { if (isRepair) {
if (mobileFirstPopupRepairSetting === "true") { 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; return mobileFirstDaysCheck;
} else { } 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; return false;
} }
} }
if (this.isMobileStaticRecalibrationApplicable) { if (this.isMobileStaticRecalibrationApplicable) {
if (mobileFirstPopupReplaceWithMsrSetting === "true") { 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; return mobileFirstDaysCheck;
} else { } 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; return false;
} }
} }
if (mobileFirstPopupReplaceWithoutMsrSetting === "true") { 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; return mobileFirstDaysCheck;
} else { } 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; return false;
} }
}; };