Browse Source

Merge pull request #7838 from nocodb/nc/cal-opt

fix: missing calendar optmzin on oss
pull/6831/head
Raju Udava 9 months ago committed by GitHub
parent
commit
21e50b7074
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      packages/nc-gui/components/smartsheet/calendar/DayView/DateTimeField.vue
  2. 5
      packages/nc-gui/components/smartsheet/calendar/MonthView.vue
  3. 5
      packages/nc-gui/components/smartsheet/calendar/WeekView/DateTimeField.vue

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

@ -969,9 +969,9 @@ const newRecord = (hour: dayjs.Dayjs) => {
</div> </div>
<div class="absolute inset-0 pointer-events-none"> <div class="absolute inset-0 pointer-events-none">
<div class="relative !ml-[60px]" data-testid="nc-calendar-day-record-container"> <div class="relative !ml-[60px]" data-testid="nc-calendar-day-record-container">
<template v-for="(record, rowIndex) in recordsAcrossAllRange.record" :key="rowIndex">
<div <div
v-for="(record, rowIndex) in recordsAcrossAllRange.record" v-if="record.rowMeta.style?.display !== 'none'"
:key="rowIndex"
:data-testid="`nc-calendar-day-record-${record.row[displayField!.title!]}`" :data-testid="`nc-calendar-day-record-${record.row[displayField!.title!]}`"
:data-unique-id="record.rowMeta.id" :data-unique-id="record.rowMeta.id"
:style="record.rowMeta.style" :style="record.rowMeta.style"
@ -1014,6 +1014,7 @@ const newRecord = (hour: dayjs.Dayjs) => {
</LazySmartsheetCalendarVRecordCard> </LazySmartsheetCalendarVRecordCard>
</LazySmartsheetRow> </LazySmartsheetRow>
</div> </div>
</template>
</div> </div>
</div> </div>
</div> </div>

5
packages/nc-gui/components/smartsheet/calendar/MonthView.vue

@ -772,9 +772,9 @@ const addRecord = (date: dayjs.Dayjs) => {
</div> </div>
</div> </div>
<div class="absolute inset-0 pointer-events-none mt-8 pb-7.5" data-testid="nc-calendar-month-record-container"> <div class="absolute inset-0 pointer-events-none mt-8 pb-7.5" data-testid="nc-calendar-month-record-container">
<template v-for="(record, recordIndex) in recordsToDisplay.records" :key="recordIndex">
<div <div
v-for="(record, recordIndex) in recordsToDisplay.records" v-if="record.rowMeta.style?.display !== 'none'"
:key="recordIndex"
:data-testid="`nc-calendar-month-record-${record.row[displayField!.title!]}`" :data-testid="`nc-calendar-month-record-${record.row[displayField!.title!]}`"
:data-unique-id="record.rowMeta.id" :data-unique-id="record.rowMeta.id"
:style="{ :style="{
@ -818,6 +818,7 @@ const addRecord = (date: dayjs.Dayjs) => {
</LazySmartsheetCalendarRecordCard> </LazySmartsheetCalendarRecordCard>
</LazySmartsheetRow> </LazySmartsheetRow>
</div> </div>
</template>
</div> </div>
</div> </div>
</template> </template>

5
packages/nc-gui/components/smartsheet/calendar/WeekView/DateTimeField.vue

@ -805,9 +805,9 @@ const addRecord = (date: dayjs.Dayjs) => {
class="absolute pointer-events-none inset-0 overflow-hidden !mt-[29px]" class="absolute pointer-events-none inset-0 overflow-hidden !mt-[29px]"
data-testid="nc-calendar-week-record-container" data-testid="nc-calendar-week-record-container"
> >
<template v-for="(record, rowIndex) in recordsAcrossAllRange.records" :key="rowIndex">
<div <div
v-for="(record, rowIndex) in recordsAcrossAllRange.records" v-if="record.rowMeta.style?.display !== 'none'"
:key="rowIndex"
:data-testid="`nc-calendar-week-record-${record.row[displayField!.title!]}`" :data-testid="`nc-calendar-week-record-${record.row[displayField!.title!]}`"
:data-unique-id="record.rowMeta!.id" :data-unique-id="record.rowMeta!.id"
:style="record.rowMeta!.style " :style="record.rowMeta!.style "
@ -850,6 +850,7 @@ const addRecord = (date: dayjs.Dayjs) => {
</LazySmartsheetCalendarVRecordCard> </LazySmartsheetCalendarVRecordCard>
</LazySmartsheetRow> </LazySmartsheetRow>
</div> </div>
</template>
</div> </div>
</div> </div>
</div> </div>

Loading…
Cancel
Save