From 0452b44f21c7c1b8c9e4bb816bf838e6e412ba06 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 21 Nov 2022 12:07:22 +0100 Subject: [PATCH] Make sure maximumAttendeeCapacity is a number, not a string Closes #1194 Signed-off-by: Thomas Citharel --- js/src/views/Event/EditView.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/js/src/views/Event/EditView.vue b/js/src/views/Event/EditView.vue index ad22e701..dd6b2cff 100644 --- a/js/src/views/Event/EditView.vue +++ b/js/src/views/Event/EditView.vue @@ -279,7 +279,7 @@ :aria-minus-label="t('Decrease')" :aria-plus-label="t('Increase')" min="1" - v-model="eventOptions.maximumAttendeeCapacity" + v-model="maximumAttendeeCapacity" id="number-of-places" /> @@ -1292,6 +1292,15 @@ watch(isOnline, (newIsOnline) => { } }); +const maximumAttendeeCapacity = computed({ + get(): string { + return eventOptions.value.maximumAttendeeCapacity.toString(); + }, + set(newMaximumAttendeeCapacity: string) { + eventOptions.value.maximumAttendeeCapacity = parseInt(newMaximumAttendeeCapacity); + } +}) + const dateFnsLocale = inject("dateFnsLocale"); const firstDayOfWeek = computed((): number => {