Browse Source

fix(nc-gui): calendar year view data not loading

pull/7611/head
DarkPhoenix2704 9 months ago
parent
commit
93513b93b8
  1. 6
      packages/nc-gui/components/smartsheet/calendar/index.vue
  2. 4
      packages/nc-gui/composables/useCalendarViewStore.ts

6
packages/nc-gui/components/smartsheet/calendar/index.vue

@ -151,10 +151,10 @@ const headerText = computed(() => {
/>
</NcButton>
</div>
<LazySmartsheetCalendarYearView v-if="activeCalendarView === 'year'" class="flex-grow-1" />
<template v-if="!isCalendarDataLoading">
<LazySmartsheetCalendarYearView v-if="activeCalendarView === 'year'" class="flex-grow-1" />
<LazySmartsheetCalendarMonthView
v-else-if="activeCalendarView === 'month'"
v-if="activeCalendarView === 'month'"
class="flex-grow-1"
@expand-record="expandRecord"
/>
@ -169,7 +169,7 @@ const headerText = computed(() => {
@expand-record="expandRecord"
/>
</template>
<div v-if="isCalendarDataLoading" class="flex w-full items-center h-full justify-center">
<div v-if="isCalendarDataLoading && activeCalendarView !== 'year'" class="flex w-full items-center h-full justify-center">
<GeneralLoader size="xlarge" />
</div>
</div>

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

@ -374,9 +374,7 @@ const [useProvideCalendarViewStore, useCalendarViewStore] = useInjectionState(
}
watch(selectedDate, async () => {
if (activeCalendarView.value !== 'year') {
await loadCalendarData()
}
await loadCalendarData()
await loadSidebarData()
})

Loading…
Cancel
Save