From d9cfa4ab5602889f807ad5e04ff80341485825e5 Mon Sep 17 00:00:00 2001 From: Patrick Toal Date: Mon, 29 Apr 2024 08:37:15 -0400 Subject: [PATCH] Convert type to interface --- .../ResourceScheduleViewerComponent.vue | 8 +-- src/components/scheduling/BoatSelection.vue | 4 +- .../boat/BoatScheduleTableComponent.vue | 41 +++++++++---- .../boat/CalendarHeaderComponent.vue | 6 +- src/stores/sampledata/schedule.ts | 0 src/stores/schedule.ts | 61 ++++++++++--------- 6 files changed, 72 insertions(+), 48 deletions(-) create mode 100644 src/stores/sampledata/schedule.ts diff --git a/src/components/ResourceScheduleViewerComponent.vue b/src/components/ResourceScheduleViewerComponent.vue index 3e4e467..4a19b62 100644 --- a/src/components/ResourceScheduleViewerComponent.vue +++ b/src/components/ResourceScheduleViewerComponent.vue @@ -118,7 +118,7 @@ import { date } from 'quasar'; import { computed } from 'vue'; import type { StatusTypes } from 'src/stores/schedule'; -type EventData = { +interface EventData { event: object; scope: { timestamp: object; @@ -126,16 +126,16 @@ type EventData = { activeDate: boolean; droppable: boolean; }; -}; +} const durations = [1, 1.5, 2, 2.5, 3, 3.5, 4]; -type ResourceIntervalScope = { +interface ResourceIntervalScope { resource: Boat; intervals: []; timeStartPosX(start: TimestampOrNull): number; timeDurationWidth(duration: number): number; -}; +} const statusLookup = { confirmed: ['#14539a', 'white'], diff --git a/src/components/scheduling/BoatSelection.vue b/src/components/scheduling/BoatSelection.vue index 3d1d012..8b9902d 100644 --- a/src/components/scheduling/BoatSelection.vue +++ b/src/components/scheduling/BoatSelection.vue @@ -20,7 +20,7 @@ import { computed } from 'vue'; import { date } from 'quasar'; import BoatScheduleTableComponent from './boat/BoatScheduleTableComponent.vue'; -type EventData = { +interface EventData { event: object; scope: { timestamp: object; @@ -28,7 +28,7 @@ type EventData = { activeDate: boolean; droppable: boolean; }; -}; +} const calendar = ref(); const scheduleStore = useScheduleStore(); diff --git a/src/components/scheduling/boat/BoatScheduleTableComponent.vue b/src/components/scheduling/boat/BoatScheduleTableComponent.vue index e38e5b6..9e88ac8 100644 --- a/src/components/scheduling/boat/BoatScheduleTableComponent.vue +++ b/src/components/scheduling/boat/BoatScheduleTableComponent.vue @@ -8,6 +8,11 @@ flat animated dense + :disabled-before="disabledBefore" + interval-height="24" + interval-count="18" + interval-start="06:00" + :short-interval-label="true" v-model="selectedDate" :column-count="boats.length" @change="scrollToEvent()" @@ -19,10 +24,7 @@