Loading src/components/AppointmentConfigModal.vue +2 −1 Original line number Diff line number Diff line Loading @@ -111,7 +111,8 @@ <div class="appointment-config-modal__form__row appointment-config-modal__form__row--wrapped"> <DurationSelect :label="t('calendar', 'Minimum time before next available slot')" :value.sync="editing.timeBeforeNextSlot" /> :value.sync="editing.timeBeforeNextSlot" :max="7*24*60*60" /> <NumberInput :label="t('calendar','Max slots per day')" :value.sync="editing.dailyMax" /> Loading src/components/AppointmentConfigModal/DurationSelect.vue +12 −1 Original line number Diff line number Diff line Loading @@ -54,9 +54,14 @@ export default { type: Boolean, default: false, }, max: { type: Number, default: 60 * 60, }, }, computed: { options() { // TODO: shouldn't this use the translatePlural (n) function? const options = [ { value: 0, label: this.t('calendar', '0 minutes') }, { value: 5 * 60, label: this.t('calendar', '5 minutes') }, Loading @@ -65,11 +70,17 @@ export default { { value: 30 * 60, label: this.t('calendar', '30 minutes') }, { value: 45 * 60, label: this.t('calendar', '45 minutes') }, { value: 60 * 60, label: this.t('calendar', '1 hour') }, { value: 2 * 60 * 60, label: this.t('calendar', '2 hours') }, { value: 6 * 60 * 60, label: this.t('calendar', '6 hours') }, { value: 24 * 60 * 60, label: this.t('calendar', '1 day') }, { value: 2 * 24 * 60 * 60, label: this.t('calendar', '2 days') }, { value: 7 * 24 * 60 * 60, label: this.t('calendar', '1 week') }, ] if (!this.allowZero) { options.splice(0, 1) } return options return options.filter(option => option.value <= this.max) }, }, } Loading src/models/appointmentConfig.js +1 −1 Original line number Diff line number Diff line Loading @@ -126,7 +126,7 @@ export default class AppointmentConfig { if (scheduleInbox && scheduleInbox.availability) { const converted = vavailabilityToSlots(scheduleInbox.availability) slots = converted.slots timezoneId = slots.timezoneId timezoneId = converted.timezoneId ?? timezoneId } else { // Set default availability to Mo-Fr 9-5 const tsAtTime = (hours, minutes) => Math.round((new Date()).setHours(hours, minutes, 0, 0) / 1000); Loading Loading
src/components/AppointmentConfigModal.vue +2 −1 Original line number Diff line number Diff line Loading @@ -111,7 +111,8 @@ <div class="appointment-config-modal__form__row appointment-config-modal__form__row--wrapped"> <DurationSelect :label="t('calendar', 'Minimum time before next available slot')" :value.sync="editing.timeBeforeNextSlot" /> :value.sync="editing.timeBeforeNextSlot" :max="7*24*60*60" /> <NumberInput :label="t('calendar','Max slots per day')" :value.sync="editing.dailyMax" /> Loading
src/components/AppointmentConfigModal/DurationSelect.vue +12 −1 Original line number Diff line number Diff line Loading @@ -54,9 +54,14 @@ export default { type: Boolean, default: false, }, max: { type: Number, default: 60 * 60, }, }, computed: { options() { // TODO: shouldn't this use the translatePlural (n) function? const options = [ { value: 0, label: this.t('calendar', '0 minutes') }, { value: 5 * 60, label: this.t('calendar', '5 minutes') }, Loading @@ -65,11 +70,17 @@ export default { { value: 30 * 60, label: this.t('calendar', '30 minutes') }, { value: 45 * 60, label: this.t('calendar', '45 minutes') }, { value: 60 * 60, label: this.t('calendar', '1 hour') }, { value: 2 * 60 * 60, label: this.t('calendar', '2 hours') }, { value: 6 * 60 * 60, label: this.t('calendar', '6 hours') }, { value: 24 * 60 * 60, label: this.t('calendar', '1 day') }, { value: 2 * 24 * 60 * 60, label: this.t('calendar', '2 days') }, { value: 7 * 24 * 60 * 60, label: this.t('calendar', '1 week') }, ] if (!this.allowZero) { options.splice(0, 1) } return options return options.filter(option => option.value <= this.max) }, }, } Loading
src/models/appointmentConfig.js +1 −1 Original line number Diff line number Diff line Loading @@ -126,7 +126,7 @@ export default class AppointmentConfig { if (scheduleInbox && scheduleInbox.availability) { const converted = vavailabilityToSlots(scheduleInbox.availability) slots = converted.slots timezoneId = slots.timezoneId timezoneId = converted.timezoneId ?? timezoneId } else { // Set default availability to Mo-Fr 9-5 const tsAtTime = (hours, minutes) => Math.round((new Date()).setHours(hours, minutes, 0, 0) / 1000); Loading