Browse Source

fix(nc-gui): included record to card for debugging

pull/7611/head
DarkPhoenix2704 9 months ago
parent
commit
5562d6171f
  1. 3
      packages/nc-gui/components/smartsheet/calendar/DayView.vue
  2. 1
      packages/nc-gui/components/smartsheet/calendar/MonthView.vue
  3. 1
      packages/nc-gui/components/smartsheet/calendar/RecordCard.vue
  4. 7
      packages/nc-gui/components/smartsheet/calendar/WeekView.vue

3
packages/nc-gui/components/smartsheet/calendar/DayView.vue

@ -157,10 +157,10 @@ const dropEvent = (event: DragEvent) => {
>
<LazySmartsheetRow v-for="(record, rowIndex) in recordsAcrossAllRange" :key="rowIndex" :row="record">
<LazySmartsheetCalendarRecordCard
:key="rowIndex"
:date="record.row[record.rowMeta.range.fk_from_col.title]"
:name="record.row[displayField.title]"
:position="record.rowMeta.position"
:record="record"
color="blue"
size="small"
@click="emit('expand-record', record)"
@ -218,6 +218,7 @@ const dropEvent = (event: DragEvent) => {
:date="dayjs(record.row[record.rowMeta.range.fk_from_col.title]).format('H:mm')"
:name="record.row[displayField.title]"
:position="record.rowMeta.position"
:record="record"
class="!h-full"
color="blue"
size="small"

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

@ -367,6 +367,7 @@ const isDateSelected = (date: Date) => {
"
:name="record.row[displayField.title]"
:position="record.rowMeta.position"
:record="record"
@click="emit('expand-record', record)"
/>
</LazySmartsheetRow>

1
packages/nc-gui/components/smartsheet/calendar/RecordCard.vue

@ -1,5 +1,6 @@
<script lang="ts" setup>
interface Props {
record: Record<string, string>
name: string
date?: string
color?: string

7
packages/nc-gui/components/smartsheet/calendar/WeekView.vue

@ -67,7 +67,11 @@ const calendarData = computed(() => {
const fromCol = range.fk_from_col
const toCol = range.fk_to_col
if (fromCol && toCol) {
for (const record of formattedData.value) {
for (const record of [...formattedData.value].filter((r) => {
const startDate = dayjs(r.row[fromCol.title])
const endDate = dayjs(r.row[toCol.title])
return !endDate.isBefore(startDate)
})) {
let startDate = dayjs(record.row[fromCol.title])
const ogStartDate = startDate.clone()
const endDate = dayjs(record.row[toCol.title])
@ -213,6 +217,7 @@ const calendarData = computed(() => {
"
:name="record.row[displayField.title]"
:position="record.rowMeta.position"
:record="record"
color="blue"
@click="emits('expand-record', record)"
/>

Loading…
Cancel
Save