diff --git a/packages/nc-gui/components/nc/Button.vue b/packages/nc-gui/components/nc/Button.vue index 701daebe41..79388c433f 100644 --- a/packages/nc-gui/components/nc/Button.vue +++ b/packages/nc-gui/components/nc/Button.vue @@ -111,7 +111,7 @@ useEventListener(NcButton, 'mousedown', () => { :class="{ 'font-medium': type === 'primary' || type === 'danger', }" - class="flex flex-row items-center w-full" + class="flex flex-row items-center" > diff --git a/packages/nc-gui/components/smartsheet/calendar/DayView/DateTimeField.vue b/packages/nc-gui/components/smartsheet/calendar/DayView/DateTimeField.vue index cd424f1b12..fdd304c9ae 100644 --- a/packages/nc-gui/components/smartsheet/calendar/DayView/DateTimeField.vue +++ b/packages/nc-gui/components/smartsheet/calendar/DayView/DateTimeField.vue @@ -10,8 +10,17 @@ const container = ref() const { isUIAllowed } = useRoles() -const { selectedDate, selectedTime, formattedData, calendarRange, formattedSideBarData, updateRowProperty, displayField } = - useCalendarViewStoreOrThrow() +const { + selectedDate, + selectedTime, + formattedData, + calendarRange, + formattedSideBarData, + updateRowProperty, + displayField, + sideBarFilterOption, + showSideMenu, +} = useCalendarViewStoreOrThrow() const hours = computed(() => { const hours: Array = [] @@ -101,6 +110,11 @@ const recordsAcrossAllRange = computed<{ let _startDate = startDate.clone() + const style: Partial = { + height: `${heightInPixels}px`, + top: `${topInPixels + 5 + startHour * 2}px`, + } + while (_startDate.isBefore(endDate)) { const timeKey = _startDate.format('HH:mm') if (!overlaps[timeKey]) { @@ -120,13 +134,6 @@ const recordsAcrossAllRange = computed<{ _startDate = _startDate.add(15, 'minutes') } - const finalTopInPixels = topInPixels + 5 + startHour * 2 - - const style: Partial = { - top: `${finalTopInPixels}px`, - height: `${heightInPixels}px`, - } - let position = 'none' const isSelectedDay = (date: dayjs.Dayjs) => date.isSame(selectedDate.value, 'day') const isBeforeSelectedDay = (date: dayjs.Dayjs) => date.isBefore(selectedDate.value, 'day') @@ -169,7 +176,6 @@ const recordsAcrossAllRange = computed<{ while (_startDate.isBefore(endDate)) { const timeKey = _startDate.format('HH:mm') - console.log('timeKey', timeKey) if (!overlaps[timeKey]) { overlaps[timeKey] = { @@ -551,6 +557,12 @@ const dragStart = (event: MouseEvent, record: Row) => { document.addEventListener('mouseup', onMouseUp) } + +const viewMore = (hour: dayjs.Dayjs) => { + sideBarFilterOption.value = 'selectedHours' + selectedTime.value = hour + showSideMenu.value = true +}