Add calendar field metadata id to view table (#14478)
This commit is contained in:
@@ -50,4 +50,7 @@ export class CreateViewInput {
|
||||
|
||||
@Field(() => ViewCalendarLayout, { nullable: true })
|
||||
calendarLayout?: ViewCalendarLayout;
|
||||
|
||||
@Field(() => UUIDScalarType, { nullable: true })
|
||||
calendarFieldMetadataId?: string;
|
||||
}
|
||||
|
||||
@@ -44,4 +44,7 @@ export class UpdateViewInput {
|
||||
|
||||
@Field(() => ViewCalendarLayout, { nullable: true })
|
||||
calendarLayout?: ViewCalendarLayout;
|
||||
|
||||
@Field(() => UUIDScalarType, { nullable: true })
|
||||
calendarFieldMetadataId?: string;
|
||||
}
|
||||
|
||||
@@ -60,6 +60,9 @@ export class ViewDTO {
|
||||
@Field(() => UUIDScalarType, { nullable: true })
|
||||
kanbanAggregateOperationFieldMetadataId?: string | null;
|
||||
|
||||
@Field(() => UUIDScalarType, { nullable: true })
|
||||
calendarFieldMetadataId?: string | null;
|
||||
|
||||
@Field(() => UUIDScalarType, { nullable: false })
|
||||
workspaceId: string;
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@ import { ObjectMetadataEntity } from 'src/engine/metadata-modules/object-metadat
|
||||
'objectMetadataId',
|
||||
])
|
||||
@Check(
|
||||
'CHK_VIEW_CALENDAR_LAYOUT_NOT_NULL_WHEN_TYPE_CALENDAR',
|
||||
`("type" != 'CALENDAR' OR "calendarLayout" IS NOT NULL)`,
|
||||
'CHK_VIEW_CALENDAR_INTEGRITY',
|
||||
`("type" != 'CALENDAR' OR ("calendarLayout" IS NOT NULL AND "calendarFieldMetadataId" IS NOT NULL))`,
|
||||
)
|
||||
export class ViewEntity extends SyncableEntity implements Required<ViewEntity> {
|
||||
@PrimaryGeneratedColumn('uuid')
|
||||
@@ -108,6 +108,9 @@ export class ViewEntity extends SyncableEntity implements Required<ViewEntity> {
|
||||
})
|
||||
calendarLayout: ViewCalendarLayout | null;
|
||||
|
||||
@Column({ nullable: true, type: 'uuid' })
|
||||
calendarFieldMetadataId: string | null;
|
||||
|
||||
@Column({ nullable: false, type: 'uuid' })
|
||||
workspaceId: string;
|
||||
|
||||
|
||||
+1
@@ -33,5 +33,6 @@ export const fromPartialFlatViewToFlatViewWithDefault = (
|
||||
universalIdentifier: partialFlatView.universalIdentifier ?? viewId,
|
||||
viewFieldIds: partialFlatView.viewFieldIds ?? [],
|
||||
calendarLayout: partialFlatView.calendarLayout ?? null,
|
||||
calendarFieldMetadataId: partialFlatView.calendarFieldMetadataId ?? null,
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user