mirror of
https://github.com/hcengineering/platform.git
synced 2026-08-17 18:05:42 +02:00
Handle mixin for todo result (#10792)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
@@ -739,8 +739,14 @@ export async function requestResult (
|
||||
const client = getClient()
|
||||
const doc = await client.findOne(card.class.Card, { _id: execution.card })
|
||||
if (doc === undefined) return
|
||||
const _process = client.getModel().findObject(execution.process)
|
||||
if (_process === undefined) return
|
||||
const h = client.getHierarchy()
|
||||
const isMixin = h.isMixin(_process.masterTag)
|
||||
const targetDoc = isMixin ? h.as(doc, _process.masterTag) : doc
|
||||
|
||||
const promise = new Promise<void>((resolve, reject) => {
|
||||
showPopup(process.component.ResultInput, { results, context, doc }, undefined, (res) => {
|
||||
showPopup(process.component.ResultInput, { results, context, doc: targetDoc }, undefined, (res) => {
|
||||
if (res !== undefined) {
|
||||
for (const contextId in res) {
|
||||
const val = res[contextId]
|
||||
|
||||
Reference in New Issue
Block a user