Started work on Schedule Management
This commit is contained in:
@@ -12,12 +12,13 @@ import type {
|
||||
Reservation,
|
||||
TimeBlockTemplate,
|
||||
Timeblock,
|
||||
TimeTuple,
|
||||
} from '../schedule.types';
|
||||
|
||||
export const templateA: TimeBlockTemplate = {
|
||||
id: '1',
|
||||
name: 'WeekdayBlocks',
|
||||
blocks: [
|
||||
timeTuple: [
|
||||
['08:00', '12:00'],
|
||||
['12:00', '16:00'],
|
||||
['17:00', '21:00'],
|
||||
@@ -27,7 +28,7 @@ export const templateA: TimeBlockTemplate = {
|
||||
export const templateB: TimeBlockTemplate = {
|
||||
id: '2',
|
||||
name: 'WeekendBlocks',
|
||||
blocks: [
|
||||
timeTuple: [
|
||||
['07:00', '10:00'],
|
||||
['10:00', '13:00'],
|
||||
['13:00', '16:00'],
|
||||
@@ -46,7 +47,7 @@ export function getSampleTimeBlocks(): Timeblock[] {
|
||||
result.push(
|
||||
...boats.value
|
||||
.map((b): Timeblock[] => {
|
||||
return template.blocks.map((t): Timeblock => {
|
||||
return template.blocks.map((t: TimeTuple): Timeblock => {
|
||||
return {
|
||||
$id: 'id' + Math.random().toString(32).slice(2),
|
||||
boatId: b.$id,
|
||||
|
||||
Reference in New Issue
Block a user