|
|
@ -7,6 +7,7 @@ import { generateRandomNumber, isRowEmpty } from '~/utils' |
|
|
|
const emit = defineEmits(['expandRecord', 'new-record']) |
|
|
|
const emit = defineEmits(['expandRecord', 'new-record']) |
|
|
|
|
|
|
|
|
|
|
|
const { |
|
|
|
const { |
|
|
|
|
|
|
|
activeCalendarView, |
|
|
|
selectedDate, |
|
|
|
selectedDate, |
|
|
|
selectedTime, |
|
|
|
selectedTime, |
|
|
|
formattedData, |
|
|
|
formattedData, |
|
|
@ -29,16 +30,17 @@ const fields = inject(FieldsInj, ref()) |
|
|
|
const { fields: _fields } = useViewColumnsOrThrow() |
|
|
|
const { fields: _fields } = useViewColumnsOrThrow() |
|
|
|
|
|
|
|
|
|
|
|
const getFieldStyle = (field: ColumnType) => { |
|
|
|
const getFieldStyle = (field: ColumnType) => { |
|
|
|
|
|
|
|
if (!_fields.value) return { underline: false, bold: false, italic: false } |
|
|
|
const fi = _fields.value.find((f) => f.title === field.title) |
|
|
|
const fi = _fields.value.find((f) => f.title === field.title) |
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
return { |
|
|
|
underline: fi.underline, |
|
|
|
underline: fi?.underline, |
|
|
|
bold: fi.bold, |
|
|
|
bold: fi?.bold, |
|
|
|
italic: fi.italic, |
|
|
|
italic: fi?.italic, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const fieldsWithoutDisplay = computed(() => fields.value.filter((f) => !isPrimary(f))) |
|
|
|
const fieldsWithoutDisplay = computed(() => fields.value?.filter((f) => !isPrimary(f))) |
|
|
|
|
|
|
|
|
|
|
|
const hours = computed(() => { |
|
|
|
const hours = computed(() => { |
|
|
|
const hours: Array<dayjs.Dayjs> = [] |
|
|
|
const hours: Array<dayjs.Dayjs> = [] |
|
|
@ -707,6 +709,7 @@ const viewMore = (hour: dayjs.Dayjs) => { |
|
|
|
> |
|
|
|
> |
|
|
|
<LazySmartsheetRow :row="record"> |
|
|
|
<LazySmartsheetRow :row="record"> |
|
|
|
<LazySmartsheetCalendarVRecordCard |
|
|
|
<LazySmartsheetCalendarVRecordCard |
|
|
|
|
|
|
|
:view="activeCalendarView" |
|
|
|
:hover="hoverRecord === record.rowMeta.id" |
|
|
|
:hover="hoverRecord === record.rowMeta.id" |
|
|
|
:position="record.rowMeta!.position" |
|
|
|
:position="record.rowMeta!.position" |
|
|
|
:record="record" |
|
|
|
:record="record" |
|
|
@ -718,10 +721,10 @@ const viewMore = (hour: dayjs.Dayjs) => { |
|
|
|
<LazySmartsheetCalendarCell |
|
|
|
<LazySmartsheetCalendarCell |
|
|
|
v-if="!isRowEmpty(record, displayField!)" |
|
|
|
v-if="!isRowEmpty(record, displayField!)" |
|
|
|
v-model="record.row[displayField!.title!]" |
|
|
|
v-model="record.row[displayField!.title!]" |
|
|
|
:bold="getFieldStyle(displayField).bold" |
|
|
|
:bold="getFieldStyle(displayField!).bold" |
|
|
|
:column="displayField" |
|
|
|
:column="displayField" |
|
|
|
:italic="getFieldStyle(displayField).italic" |
|
|
|
:italic="getFieldStyle(displayField!).italic" |
|
|
|
:underline="getFieldStyle(displayField).underline" |
|
|
|
:underline="getFieldStyle(displayField!).underline" |
|
|
|
/> |
|
|
|
/> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template v-for="(field, id) in fieldsWithoutDisplay"> |
|
|
|
<template v-for="(field, id) in fieldsWithoutDisplay"> |
|
|
|