Browse Source

fix(nc-gui): include tz in filters

pull/7611/head
DarkPhoenix2704 10 months ago
parent
commit
a0b40e4eae
  1. 6
      packages/nc-gui/components/smartsheet/calendar/DayView/DateTimeField.vue
  2. 18
      packages/nc-gui/composables/useCalendarViewStore.ts

6
packages/nc-gui/components/smartsheet/calendar/DayView/DateTimeField.vue

@ -63,11 +63,11 @@ const recordsAcrossAllRange = computed<Row[]>(() => {
if (!startDate.isValid() || startDate.isAfter(endDate)) continue
if (startDate.isBefore(scheduleStart)) {
if (startDate.isBefore(scheduleStart, 'minutes')) {
startDate = scheduleStart
}
if (endDate.isAfter(scheduleEnd)) {
if (endDate.isAfter(scheduleEnd, 'minutes')) {
endDate = scheduleEnd
}
@ -88,7 +88,7 @@ const recordsAcrossAllRange = computed<Row[]>(() => {
overlaps[startMinutes].push(id)
startMinutes += 15
}
const finalTopInPixels = topInPixels + startHour
const finalTopInPixels = topInPixels + 5 + startHour * 2
const style: Partial<CSSStyleDeclaration> = {
top: `${finalTopInPixels}px`,

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

@ -181,13 +181,8 @@ const [useProvideCalendarViewStore, useCalendarViewStore] = useInjectionState(
break
}
if (calDataType.value === UITypes.Date) {
fromDate = dayjs(fromDate).format('YYYY-MM-DDZ')
toDate = dayjs(toDate).format('YYYY-MM-DDZ')
} else if (calDataType.value === UITypes.DateTime) {
fromDate = dayjs(fromDate).format('YYYY-MM-DD HH:mm:ssZ')
toDate = dayjs(toDate).format('YYYY-MM-DD HH:mm:ssZ')
}
fromDate = dayjs(fromDate).format('YYYY-MM-DD HH:mm:ssZ')
toDate = dayjs(toDate).format('YYYY-MM-DD HH:mm:ssZ')
calendarRange.value.forEach((range) => {
const fromCol = range.fk_from_col
@ -352,13 +347,8 @@ const [useProvideCalendarViewStore, useCalendarViewStore] = useInjectionState(
break
}
if (calDataType.value === UITypes.Date) {
fromDate = dayjs(fromDate).format('YYYY-MM-DDZ')
toDate = dayjs(toDate).format('YYYY-MM-DDZ')
} else if (calDataType.value === UITypes.DateTime) {
fromDate = dayjs(fromDate).format('YYYY-MM-DD HH:mm:ssZ')
toDate = dayjs(toDate).format('YYYY-MM-DD HH:mm:ssZ')
}
fromDate = dayjs(fromDate).format('YYYY-MM-DD HH:mm:ssZ')
toDate = dayjs(toDate).format('YYYY-MM-DD HH:mm:ssZ')
calendarRange.value.forEach((range) => {
const fromCol = range.fk_from_col

Loading…
Cancel
Save