mirror of
https://github.com/hcengineering/platform.git
synced 2026-10-01 14:05:05 +02:00
fix: copy template content when creating controlled document (#6441)
Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
Ref,
|
||||
SortingOrder
|
||||
} from '@hcengineering/core'
|
||||
import { Card, createQuery, getClient } from '@hcengineering/presentation'
|
||||
import { Card, copyDocument, createQuery, getClient } from '@hcengineering/presentation'
|
||||
import { createFocusManager, EditBox, FocusHandler } from '@hcengineering/ui'
|
||||
import { ObjectBox } from '@hcengineering/view-resources'
|
||||
import {
|
||||
@@ -91,7 +91,17 @@
|
||||
return
|
||||
}
|
||||
|
||||
await createControlledDocFromTemplate(client, templateId, id, object, space, undefined, undefined, documentClass)
|
||||
await createControlledDocFromTemplate(
|
||||
client,
|
||||
templateId,
|
||||
id,
|
||||
object,
|
||||
space,
|
||||
undefined,
|
||||
undefined,
|
||||
documentClass,
|
||||
copyDocument
|
||||
)
|
||||
|
||||
dispatch('close', id)
|
||||
}
|
||||
|
||||
+4
-2
@@ -24,7 +24,7 @@
|
||||
type Data,
|
||||
type Ref
|
||||
} from '@hcengineering/core'
|
||||
import { MessageBox, getClient } from '@hcengineering/presentation'
|
||||
import { MessageBox, copyDocument, getClient } from '@hcengineering/presentation'
|
||||
import {
|
||||
AnySvelteComponent,
|
||||
addNotification,
|
||||
@@ -160,7 +160,9 @@
|
||||
docObject,
|
||||
_space,
|
||||
$locationStep.project,
|
||||
$locationStep.parent
|
||||
$locationStep.parent,
|
||||
documents.class.ControlledDocument,
|
||||
copyDocument
|
||||
)
|
||||
|
||||
if (!success) {
|
||||
|
||||
Reference in New Issue
Block a user