diff --git a/components/calendar/Dashboard.vue b/components/calendar/Dashboard.vue deleted file mode 100644 index 1f7d678..0000000 --- a/components/calendar/Dashboard.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - diff --git a/pages/calendar/[id].vue b/pages/calendar/[id].vue index 8e8abe7..476d157 100644 --- a/pages/calendar/[id].vue +++ b/pages/calendar/[id].vue @@ -1,16 +1,14 @@ diff --git a/stores/CalendarStore.ts b/stores/CalendarStore.ts index 651cce2..b3bb020 100644 --- a/stores/CalendarStore.ts +++ b/stores/CalendarStore.ts @@ -29,6 +29,14 @@ export const useCalendar = defineStore('calendar', () => { * Month list */ const months: Ref = ref([]) + + function setMonths(data: CalendarMonth[]) { + months.value = data + } + + /** + * Sorted month data + */ const sortedMonths = computed(() => months.value.sort((a, b) => a.position - b.position)) const monthsPerYear = computed(() => months.value.length) const daysPerYear = computed(() => months.value.reduce((acc, o) => acc + o.days, 0)) @@ -332,6 +340,7 @@ export const useCalendar = defineStore('calendar', () => { return { months, + setMonths, sortedMonths, daysPerYear, monthsPerYear,