Fix login bug. Improve reservations
This commit is contained in:
@@ -51,6 +51,7 @@ export const useReservationStore = defineStore('reservation', () => {
|
||||
reservation
|
||||
);
|
||||
reservations.value.set(response.$id, response as Reservation);
|
||||
console.info('Reservation booked: ', response);
|
||||
} catch (e) {
|
||||
console.error('Error creating Reservation: ' + e);
|
||||
}
|
||||
|
||||
@@ -71,6 +71,7 @@ export function getSampleReservations(): Reservation[] {
|
||||
end: '10:00',
|
||||
boat: '66359729003825946ae1',
|
||||
status: 'confirmed',
|
||||
reason: 'Open Sail',
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
@@ -79,6 +80,7 @@ export function getSampleReservations(): Reservation[] {
|
||||
end: '19:00',
|
||||
boat: '66359729003825946ae1',
|
||||
status: 'confirmed',
|
||||
reason: 'Open Sail',
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
@@ -87,6 +89,7 @@ export function getSampleReservations(): Reservation[] {
|
||||
end: '13:00',
|
||||
boat: '663597030029b71c7a9b',
|
||||
status: 'tentative',
|
||||
reason: 'Open Sail',
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
@@ -95,6 +98,7 @@ export function getSampleReservations(): Reservation[] {
|
||||
end: '13:00',
|
||||
boat: '663597030029b71c7a9b',
|
||||
status: 'pending',
|
||||
reason: 'Open Sail',
|
||||
},
|
||||
{
|
||||
id: '5',
|
||||
@@ -103,6 +107,7 @@ export function getSampleReservations(): Reservation[] {
|
||||
end: '19:00',
|
||||
boat: '663596b9000235ffea55',
|
||||
status: 'confirmed',
|
||||
reason: 'Private Sail',
|
||||
},
|
||||
{
|
||||
id: '6',
|
||||
@@ -110,6 +115,7 @@ export function getSampleReservations(): Reservation[] {
|
||||
start: '13:00',
|
||||
end: '16:00',
|
||||
boat: '663596b9000235ffea55',
|
||||
reason: 'Open Sail',
|
||||
},
|
||||
];
|
||||
const boatStore = useBoatStore();
|
||||
@@ -137,6 +143,7 @@ export function getSampleReservations(): Reservation[] {
|
||||
end: date.adjustDate(now, makeOpts(splitTime(entry.end))).toISOString(),
|
||||
resource: boat.$id,
|
||||
reservationDate: now,
|
||||
reason: entry.reason,
|
||||
status: entry.status as StatusTypes,
|
||||
};
|
||||
});
|
||||
|
||||
@@ -8,6 +8,7 @@ export type Reservation = Partial<Models.Document> & {
|
||||
end: string;
|
||||
resource: string; // Boat ID
|
||||
status?: StatusTypes;
|
||||
reason: string;
|
||||
};
|
||||
|
||||
// 24 hrs in advance only 2 weekday, and 1 weekend slot
|
||||
|
||||
Reference in New Issue
Block a user