CASH-185 added experiment check to setDisplayWaitList function in schedule
This commit is contained in:
Johnny shultz 2025-02-24 13:32:16 -05:00
parent 63de7f959f
commit 2f13ade0b3

View file

@ -521,26 +521,28 @@ export default {
this.$router.navigateWithSaving(this.navigationScenarios.CLICKED_FORWARD, this.$route); this.$router.navigateWithSaving(this.navigationScenarios.CLICKED_FORWARD, this.$route);
}, },
setDisplayWaitList() { setDisplayWaitList() {
const dateString = this.selectableDatesData.days[0].date; if(experimentMixin.methods.hasSettingEqualTo(experimentSettings.DISPLAY_WAITLIST, "true")){
const [year, month, day] = dateString.split("-").map(Number); const dateString = this.selectableDatesData.days[0].date;
const targetDate = new Date(year, month - 1, day); const [year, month, day] = dateString.split("-").map(Number);
const currentDate = new Date(); const targetDate = new Date(year, month - 1, day);
const futureDate = new Date(currentDate); const currentDate = new Date();
const experimentThresholdDays = experimentMixin.methods.hasSetting( const futureDate = new Date(currentDate);
experimentSettings.WAITLIST_THRESHOLD_DAYS const experimentThresholdDays = experimentMixin.methods.hasSetting(
) experimentSettings.WAITLIST_THRESHOLD_DAYS
? parseInt( )
experimentMixin.methods.getSettingValue( ? parseInt(
experimentSettings.WAITLIST_THRESHOLD_DAYS experimentMixin.methods.getSettingValue(
) experimentSettings.WAITLIST_THRESHOLD_DAYS
) )
: 0; )
futureDate.setDate(currentDate.getDate() + experimentThresholdDays); : 0;
futureDate.setDate(currentDate.getDate() + experimentThresholdDays);
if (targetDate >= futureDate) { if (targetDate >= futureDate) {
this.displayWaitList = true; this.displayWaitList = true;
} else { } else {
this.displayWaitList = false; this.displayWaitList = false;
}
} }
}, },
updateSupportingItems() { updateSupportingItems() {