Browse Source

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

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

22
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:
return [ if (calDataType.value === UITypes.Date) {
{ label: 'in this day', value: 'day' }, return [
{ label: 'without dates', value: 'withoutDates' }, { label: 'in this day', value: 'day' },
{ label: 'in selected hours', value: 'selectedHours' }, { label: 'without dates', value: 'withoutDates' },
{ label: 'all records', value: 'allRecords' }, { label: 'all records', value: 'allRecords' },
].filter((o) => o.value !== 'selectedHours' && calDataType.value === UITypes.Date) ]
} else {
return [
{ label: 'in this day', value: 'day' },
{ label: 'without dates', value: 'withoutDates' },
{ label: 'all records', value: 'allRecords' },
{ 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