mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-12 04:37:44 +02:00
Fix result input without result (#9937)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
@@ -14,12 +14,13 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import presentation, { Card, getAttrEditor, getClient } from '@hcengineering/presentation'
|
||||
import { ContextId, UserResult } from '@hcengineering/process'
|
||||
import { ContextId, ExecutionContext, UserResult } from '@hcengineering/process'
|
||||
import { Component, tooltip } from '@hcengineering/ui'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import plugin from '../../plugin'
|
||||
|
||||
export let results: UserResult[]
|
||||
export let context: ExecutionContext
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
const client = getClient()
|
||||
@@ -27,6 +28,10 @@
|
||||
|
||||
const values: Record<ContextId, any> = {}
|
||||
|
||||
results.forEach((r) => {
|
||||
values[r._id] = context[r._id]
|
||||
})
|
||||
|
||||
export function canClose (): boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -576,9 +576,9 @@ export async function requestResult (
|
||||
results: UserResult[] | undefined,
|
||||
context: ExecutionContext
|
||||
): Promise<void> {
|
||||
if (results == null) return
|
||||
if (results == null || results.length === 0) return
|
||||
const promise = new Promise<void>((resolve, reject) => {
|
||||
showPopup(process.component.ResultInput, { results }, undefined, (res) => {
|
||||
showPopup(process.component.ResultInput, { results, context }, undefined, (res) => {
|
||||
if (res !== undefined) {
|
||||
for (const contextId in res) {
|
||||
const val = res[contextId]
|
||||
|
||||
Reference in New Issue
Block a user