Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix documents #6816

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions dev/import-tool/src/notion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,6 @@ async function createDBPageWithAttachments (
description: collabId,
parent: parentId,
attachments: 0,
children: 0,
embeddings: 0,
labels: 0,
comments: 0,
Expand Down Expand Up @@ -486,7 +485,6 @@ async function importPageDocument (
description: collabId,
parent,
attachments: 0,
children: 0,
embeddings: 0,
labels: 0,
comments: 0,
Expand Down
2 changes: 1 addition & 1 deletion models/core/src/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 2 additions & 5 deletions models/document/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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,
Expand All @@ -471,7 +468,7 @@ function defineDocument (builder: Builder): void {
document.class.Document,
document.ids.DocumentNotificationGroup,
[],
['attachments', 'children', 'comments']
['attachments', 'comments']
)

// Activity & Inbox
Expand Down
1 change: 0 additions & 1 deletion plugins/document-resources/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ export async function createEmptyDocument (
title,
description: makeCollaborativeDoc(id, 'description'),
attachments: 0,
children: 0,
embeddings: 0,
labels: 0,
comments: 0,
Expand Down
1 change: 0 additions & 1 deletion plugins/document/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export interface Document extends Card, IconProps {

snapshots?: number
attachments?: number
children?: number
comments?: number
embeddings?: number
labels?: number
Expand Down
Loading