Browse Source

fix(nc-gui): store calendar range type

pull/7611/head
DarkPhoenix2704 9 months ago
parent
commit
63c892513d
  1. 5
      packages/nc-gui/composables/useCalendarViewStore.ts

5
packages/nc-gui/composables/useCalendarViewStore.ts

@ -1,5 +1,5 @@
import type { ComputedRef, Ref } from 'vue' import type { ComputedRef, Ref } from 'vue'
import type { ColumnType, CalendarType, PaginatedType, TableType, ViewType } from 'nocodb-sdk' import {ColumnType, CalendarType, PaginatedType, TableType, ViewType, UITypes} from 'nocodb-sdk'
import { IsPublicInj, ref, storeToRefs, useBase, useInjectionState, useMetas } from '#imports' import { IsPublicInj, ref, storeToRefs, useBase, useInjectionState, useMetas } from '#imports'
import type { Row } from '#imports' import type { Row } from '#imports'
import {addDays, addMonths, addWeeks, addYears} from "../utils"; import {addDays, addMonths, addWeeks, addYears} from "../utils";
@ -29,6 +29,8 @@ const [useProvideCalendarViewStore, useCalendarViewStore] = useInjectionState(
const activeCalendarView = ref<'month' | 'year' | 'day' | 'week'>('month') const activeCalendarView = ref<'month' | 'year' | 'day' | 'week'>('month')
const calDataType = ref<UITypes.Date | UITypes.DateTime>(UITypes.Date)
const selectedDate = ref<Date>(new Date()) const selectedDate = ref<Date>(new Date())
const selectedDateRange = ref<{ const selectedDateRange = ref<{
start: Date | null start: Date | null
@ -135,6 +137,7 @@ const [useProvideCalendarViewStore, useCalendarViewStore] = useInjectionState(
return { return {
formattedData, formattedData,
changeCalendarView, changeCalendarView,
calDataType,
loadCalendarMeta, loadCalendarMeta,
updateCalendarMeta, updateCalendarMeta,
calendarMetaData, calendarMetaData,

Loading…
Cancel
Save