Fix result input without result (#9937)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov
2025-09-25 13:55:59 +07:00
committed by GitHub
parent c4bb0e51a0
commit 2427f484aa
2 changed files with 8 additions and 3 deletions
@@ -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
}
+2 -2
View File
@@ -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]