mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-13 13:17:45 +02:00
UBERF-4725 Migrate collaborative content (#5717)
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
@@ -18,11 +18,12 @@ import {
|
||||
type AttachedData,
|
||||
type Class,
|
||||
type CollaborativeDoc,
|
||||
type Doc,
|
||||
type Ref,
|
||||
type TxOperations,
|
||||
Mixin,
|
||||
generateId,
|
||||
getCollaborativeDoc
|
||||
makeCollaborativeDoc
|
||||
} from '@hcengineering/core'
|
||||
import {
|
||||
type Document,
|
||||
@@ -33,6 +34,7 @@ import {
|
||||
type DocumentMeta,
|
||||
type Project,
|
||||
DocumentState,
|
||||
HierarchyDocument,
|
||||
ProjectDocument
|
||||
} from './types'
|
||||
|
||||
@@ -261,7 +263,7 @@ export async function createDocumentTemplate (
|
||||
}
|
||||
)
|
||||
|
||||
await ops.addCollection(
|
||||
await ops.addCollection<DocumentMeta, HierarchyDocument>(
|
||||
_class,
|
||||
space,
|
||||
metaId,
|
||||
@@ -301,5 +303,7 @@ export function getCollaborativeDocForDocument (
|
||||
prefix = prefix.substring(0, prefix.length - 1)
|
||||
}
|
||||
|
||||
return getCollaborativeDoc(`${prefix}-${seqNumber}-${major}.${minor}${next ? '.next' : ''}-` + generateId())
|
||||
return makeCollaborativeDoc(
|
||||
(`${prefix}-${seqNumber}-${major}.${minor}${next ? '.next' : ''}-` + generateId()) as Ref<Doc>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user