added awaits on room reservation creation/deletion requests, issue with race conditions and refetches completing before changes

This commit is contained in:
adisposkofh
2026-08-10 11:40:06 +02:00
parent cad23ef1ad
commit e4c52701b7
@@ -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();