Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 4e959020 authored by Anna Larch's avatar Anna Larch Committed by GitHub
Browse files

Merge pull request #3703 from nextcloud/fix/appointments-missing-commits

Fix missing appointments commits
parents 64c300de ff9815d5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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" />
+12 −1
Original line number Diff line number Diff line
@@ -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') },
@@ -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)
		},
	},
}
+1 −1
Original line number Diff line number Diff line
@@ -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);