refactor utils

This commit is contained in:
2024-05-13 12:31:27 -04:00
parent 78211a33ae
commit b0921ccf32
4 changed files with 15 additions and 17 deletions

View File

@@ -101,9 +101,9 @@ import { ref, computed, watch } from 'vue';
import { useAuthStore } from 'src/stores/auth';
import { Boat, useBoatStore } from 'src/stores/boat';
import { date } from 'quasar';
import { useScheduleStore } from 'src/stores/schedule';
import { Interval } from 'src/stores/schedule.types';
import BoatScheduleTableComponent from 'src/components/scheduling/boat/BoatScheduleTableComponent.vue';
import { getNewId } from 'src/utils/misc';
interface BookingForm {
bookingId: string;
@@ -118,10 +118,9 @@ interface BookingForm {
const auth = useAuthStore();
const dateFormat = 'MMM D, YYYY h:mm A';
const resourceView = ref(true);
const scheduleStore = useScheduleStore();
const timeblock = ref<Interval>();
const bookingForm = ref<BookingForm>({
bookingId: scheduleStore.getNewId(),
bookingId: getNewId(),
name: auth.currentUser?.name,
boat: <Boat | undefined>undefined,
startDate: date.formatDate(new Date(), dateFormat),