Update naming

This commit is contained in:
2024-05-20 21:53:09 -04:00
parent a6e357f973
commit 737de91bbc
11 changed files with 201 additions and 152 deletions

View File

@@ -113,12 +113,9 @@
</template>
<script setup lang="ts">
import {
copyIntervalTemplate,
timeTuplesOverlapped,
useScheduleStore,
} from 'src/stores/schedule';
import { useScheduleStore } from 'src/stores/schedule';
import { IntervalTemplate } from 'src/stores/schedule.types';
import { copyIntervalTemplate, timeTuplesOverlapped } from 'src/utils/schedule';
import { ref } from 'vue';
const alert = ref(false);
const overlapped = ref();

View File

@@ -91,7 +91,6 @@ const calendar = ref<QCalendarDay | null>(null);
onMounted(async () => {
await useBoatStore().fetchBoats();
await scheduleStore.fetchIntervals();
await scheduleStore.fetchIntervalTemplates();
});
@@ -177,7 +176,7 @@ function selectBlock(event: MouseEvent, scope: DayBodyScope, block: Interval) {
const boatBlocks = computed((): Record<string, Interval[]> => {
return scheduleStore
.getIntervalsForDate(selectedDate.value)
.getIntervals(selectedDate.value)
.reduce((result, interval) => {
if (!result[interval.boatId]) result[interval.boatId] = [];
if (