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