mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-10 03:37:43 +02:00
Process minor fixes (#10704)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
@@ -36,6 +36,8 @@
|
||||
dispatch('close', { value: values })
|
||||
}
|
||||
|
||||
$: canSaveValue = inputs.every((input) => values[input.id] != null)
|
||||
|
||||
export function canClose (): boolean {
|
||||
return false
|
||||
}
|
||||
@@ -48,8 +50,9 @@
|
||||
on:close
|
||||
width={'small'}
|
||||
label={plugin.string.EnterValue}
|
||||
canSave
|
||||
canSave={canSaveValue}
|
||||
okAction={save}
|
||||
hideClose
|
||||
okLabel={presentation.string.Save}
|
||||
>
|
||||
{#if processVal !== undefined}
|
||||
@@ -67,8 +70,10 @@
|
||||
key={input.key}
|
||||
_class={input._class}
|
||||
{space}
|
||||
value={values[input.id]}
|
||||
on:change={(e) => {
|
||||
values[input.id] = e.detail
|
||||
values = values
|
||||
}}
|
||||
/>
|
||||
{/each}
|
||||
|
||||
@@ -547,7 +547,7 @@ export async function getTransitionUserInput (
|
||||
}
|
||||
}
|
||||
if (inputs.length > 0) {
|
||||
const promise = new Promise<void>((resolve) => {
|
||||
const promise = new Promise<void>((resolve, reject) => {
|
||||
showPopup(
|
||||
process.component.RequestUserInput,
|
||||
{
|
||||
@@ -559,13 +559,16 @@ export async function getTransitionUserInput (
|
||||
},
|
||||
undefined,
|
||||
(res) => {
|
||||
if (res?.value !== undefined) {
|
||||
const isComplete = res?.value !== undefined && inputs.every((input) => res.value[input.id] != null)
|
||||
if (isComplete) {
|
||||
changed = true
|
||||
for (const [key, value] of Object.entries(res.value)) {
|
||||
userContext[key as ContextId] = value
|
||||
}
|
||||
resolve()
|
||||
} else {
|
||||
reject(new PlatformError(new Status(Severity.ERROR, process.error.ResultNotProvided, {})))
|
||||
}
|
||||
resolve()
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user