Browse Source

fix: small bugs

pull/7611/head
DarkPhoenix2704 9 months ago
parent
commit
bc152c9084
  1. 2
      packages/nc-gui/components/smartsheet/calendar/SideMenu.vue
  2. 14
      packages/nocodb/src/models/View.ts

2
packages/nc-gui/components/smartsheet/calendar/SideMenu.vue

@ -303,7 +303,7 @@ const sideBarListScrollHandle = useDebounceFn(async (e: Event) => {
</div> </div>
</div> </div>
<template v-else-if="renderData.length > 0"> <template v-else-if="renderData.length > 0">
<LazySmartsheetRow v-for="(record, rowIndex) in renderData" :key="rowIndex"> <LazySmartsheetRow v-for="(record, rowIndex) in renderData" :key="rowIndex" :row="record">
<LazySmartsheetCalendarSideRecordCard <LazySmartsheetCalendarSideRecordCard
:draggable="sideBarFilterOption === 'withoutDates'" :draggable="sideBarFilterOption === 'withoutDates'"
:from-date=" :from-date="

14
packages/nocodb/src/models/View.ts

@ -468,7 +468,8 @@ export default class View implements ViewType {
const calendarView = await CalendarView.get(view_id, ncMeta); const calendarView = await CalendarView.get(view_id, ncMeta);
if (calendarRanges && calendarRanges.includes(vCol.id)) { if (calendarRanges && calendarRanges.includes(vCol.id)) {
show = true; show = true;
} else show = vCol.id === calendarView?.fk_cover_image_col_id; } else
show = vCol.id === calendarView?.fk_cover_image_col_id || vCol.pv;
// Show all Fields in Ranges // Show all Fields in Ranges
} else if (view.type === ViewTypes.MAP && !copyFromView) { } else if (view.type === ViewTypes.MAP && !copyFromView) {
const mapView = await MapView.get(view_id, ncMeta); const mapView = await MapView.get(view_id, ncMeta);
@ -815,7 +816,7 @@ export default class View implements ViewType {
const updateObj = extractProps(colData, ['order', 'show']); const updateObj = extractProps(colData, ['order', 'show']);
// keep primary_value_column always visible and first in grid view // keep primary_value_column always visible and first in grid view
if (view.type === ViewTypes.GRID) { if (view.type === ViewTypes.GRID || view.type === ViewTypes.CALENDAR) {
const primary_value_column_meta = await ncMeta.metaGet2( const primary_value_column_meta = await ncMeta.metaGet2(
null, null,
null, null,
@ -923,7 +924,6 @@ export default class View implements ViewType {
order: colData.order, order: colData.order,
show: colData.show, show: colData.show,
}); });
break;
case ViewTypes.MAP: case ViewTypes.MAP:
return await MapViewColumn.insert({ return await MapViewColumn.insert({
fk_view_id: viewId, fk_view_id: viewId,
@ -931,7 +931,6 @@ export default class View implements ViewType {
order: colData.order, order: colData.order,
show: colData.show, show: colData.show,
}); });
break;
case ViewTypes.FORM: case ViewTypes.FORM:
return await FormViewColumn.insert({ return await FormViewColumn.insert({
fk_view_id: viewId, fk_view_id: viewId,
@ -940,7 +939,12 @@ export default class View implements ViewType {
show: colData.show, show: colData.show,
}); });
case ViewTypes.CALENDAR: case ViewTypes.CALENDAR:
// todo: calendar view column return await CalendarViewColumn.insert({
fk_view_id: viewId,
fk_column_id: fkColId,
order: colData.order,
show: colData.show,
});
} }
return await ncMeta.metaInsert2(view.base_id, view.source_id, table, { return await ncMeta.metaInsert2(view.base_id, view.source_id, table, {
fk_view_id: viewId, fk_view_id: viewId,

Loading…
Cancel
Save