Browse Source

fix(nc-gui): fix incorrect sidebar filter method

pull/7611/head
DarkPhoenix2704 9 months ago
parent
commit
f9e34c97ab
  1. 14
      packages/nc-gui/components/smartsheet/calendar/SideMenu.vue

14
packages/nc-gui/components/smartsheet/calendar/SideMenu.vue

@ -36,17 +36,25 @@ const sideBarListRef = ref<VNodeRef | null>(null)
const options = computed(() => { const options = computed(() => {
switch (activeCalendarView.value) { switch (activeCalendarView.value) {
case 'day' as const: case 'day' as const:
if (calDataType.value === UITypes.Date) {
return [
{ label: 'in this day', value: 'day' },
{ label: 'without dates', value: 'withoutDates' },
{ label: 'all records', value: 'allRecords' },
]
} else {
return [ return [
{ label: 'in this day', value: 'day' }, { label: 'in this day', value: 'day' },
{ label: 'without dates', value: 'withoutDates' }, { label: 'without dates', value: 'withoutDates' },
{ label: 'in selected hours', value: 'selectedHours' },
{ label: 'all records', value: 'allRecords' }, { label: 'all records', value: 'allRecords' },
].filter((o) => o.value !== 'selectedHours' && calDataType.value === UITypes.Date) { label: 'in selected hours', value: 'selectedHours' },
{ label: 'in selected date', value: 'selectedDate' },
]
}
case 'week' as const: case 'week' as const:
return [ return [
{ label: 'in this week', value: 'week' }, { label: 'in this week', value: 'week' },
{ label: 'without dates', value: 'withoutDates' }, { label: 'without dates', value: 'withoutDates' },
{ label: 'in selected hours', value: 'selectedHours' },
{ label: 'all records', value: 'allRecords' }, { label: 'all records', value: 'allRecords' },
] ]
case 'month' as const: case 'month' as const:

Loading…
Cancel
Save