Fix update of timblock

This commit is contained in:
2024-04-30 17:04:55 -04:00
parent b66afb5692
commit 28600578f1
4 changed files with 48 additions and 43 deletions

View File

@@ -81,9 +81,12 @@ export const useScheduleStore = defineStore('schedule', () => {
return isResourceTimeOverlapped(res.resource, res.start, res.end);
};
const getNewId = () => {
const getNewId = (): string => {
return [...Array(20)]
.map(() => Math.floor(Math.random() * 16).toString(16))
.join('');
// Trivial placeholder
return Math.max(...reservations.value.map((item) => item.id)) + 1;
//return Math.max(...reservations.value.map((item) => item.id)) + 1;
};
const addOrCreateReservation = (reservation: Reservation) => {