Skip to content

Commit

Permalink
🔨 Type booking view store
Browse files Browse the repository at this point in the history
  • Loading branch information
devmount committed Jun 21, 2024
1 parent 7b442d5 commit c02a29d
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
import { Dayjs, ConfigType } from 'dayjs';
import { defineStore } from 'pinia';
import { ref, inject } from 'vue';
import { bookingCalendarViews } from '@/definitions';
import { Appointment, Attendee } from '@/models';

/**
* Store for BookingView and its tightly coupled components.
*/
// eslint-disable-next-line import/prefer-default-export
export const useBookingViewStore = defineStore('bookingView', () => {
const dj = inject('dayjs');
const dj = inject<(date?: ConfigType) => Dayjs>('dayjs');

// States
const activeView = ref(bookingCalendarViews.loading);
const activeDate = ref(dj());
// Data
const selectedEvent = ref(null);
const appointment = ref(null);
const attendee = ref(null);
const selectedEvent = ref<Dayjs>(null);
const appointment = ref<Appointment>(null);
const attendee = ref<Attendee>(null);

/**
* Restore default state, set date to today and remove other data
Expand Down

0 comments on commit c02a29d

Please sign in to comment.