Fix documents (#6816)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2024-10-04 23:18:40 +05:00 committed by GitHub
parent 2f5efd9560
commit 90f4d02f71
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 3 additions and 10 deletions

View File

@ -338,7 +338,6 @@ async function createDBPageWithAttachments (
description: collabId,
parent: parentId,
attachments: 0,
children: 0,
embeddings: 0,
labels: 0,
comments: 0,
@ -486,7 +485,6 @@ async function importPageDocument (
description: collabId,
parent,
attachments: 0,
children: 0,
embeddings: 0,
labels: 0,
comments: 0,

View File

@ -114,7 +114,7 @@ export class TDoc extends TObj implements Doc {
createdOn!: Timestamp
}
@Model(core.class.Card, core.class.Obj)
@Model(core.class.Card, core.class.Doc)
@UX(core.string.Object)
export class TCard extends TDoc implements Card {
@Prop(TypeString(), core.string.Name)

View File

@ -91,9 +91,6 @@ export class TDocument extends TCard implements Document, Todoable {
@Hidden()
lockedBy?: Ref<Account>
@Prop(Collection(document.class.Document), document.string.ChildDocument)
children!: CollectionSize<Document>
@Prop(Collection(document.class.DocumentEmbedding), document.string.Embeddings)
embeddings?: number
@ -447,7 +444,7 @@ function defineDocument (builder: Builder): void {
allowedForAuthor: false,
label: document.string.Document,
group: document.ids.DocumentNotificationGroup,
field: 'content',
field: 'description',
txClasses: [core.class.TxUpdateDoc],
objectClass: document.class.Document,
defaultEnabled: false,
@ -471,7 +468,7 @@ function defineDocument (builder: Builder): void {
document.class.Document,
document.ids.DocumentNotificationGroup,
[],
['attachments', 'children', 'comments']
['attachments', 'comments']
)
// Activity & Inbox

View File

@ -81,7 +81,6 @@ export async function createEmptyDocument (
title,
description: makeCollaborativeDoc(id, 'description'),
attachments: 0,
children: 0,
embeddings: 0,
labels: 0,
comments: 0,

View File

@ -33,7 +33,6 @@ export interface Document extends Card, IconProps {
snapshots?: number
attachments?: number
children?: number
comments?: number
embeddings?: number
labels?: number