From e4c52701b72cd84713d3ca82580036c01ae8f76b Mon Sep 17 00:00:00 2001 From: adisposkofh Date: Mon, 10 Aug 2026 11:40:06 +0200 Subject: [PATCH] added awaits on room reservation creation/deletion requests, issue with race conditions and refetches completing before changes --- public/js/components/Cis/Mylv/RoomInformation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/components/Cis/Mylv/RoomInformation.js b/public/js/components/Cis/Mylv/RoomInformation.js index cff9f0e4b..d71ad32fd 100644 --- a/public/js/components/Cis/Mylv/RoomInformation.js +++ b/public/js/components/Cis/Mylv/RoomInformation.js @@ -75,7 +75,7 @@ export default { async handleCreateEvent(event) { event.ort_kurzbz = this.propsViewData.ort_kurzbz; - this.$api.call(ApiRoomPlan.addRoomReservation(event)); + await this.$api.call(ApiRoomPlan.addRoomReservation(event)); this.$refs.calendar.resetEventLoader(); this.$refs.calendar.closeModal(); }, @@ -87,7 +87,7 @@ export default { if (luxon.DateTime.fromISO(`${event.datum}T${event.beginn}`) < luxon.DateTime.now()) return; - this.$api.call(ApiRoomPlan.deleteRoomReservation(event.reservierung_id)); + await this.$api.call(ApiRoomPlan.deleteRoomReservation(event.reservierung_id)); this.$refs.calendar.reset();