Fix update of timblock
This commit is contained in:
@@ -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) => {
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { Boat } from './boat';
|
||||
|
||||
export type StatusTypes = 'tentative' | 'confirmed' | 'pending' | undefined;
|
||||
export interface Reservation {
|
||||
id: number;
|
||||
id: string;
|
||||
user: string;
|
||||
start: Date;
|
||||
end: Date;
|
||||
|
||||
Reference in New Issue
Block a user