mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-22 01:25:00 +02:00
Add auto-start functionality and related triggers for processes (#8478)
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
IconDescription,
|
||||
navigate,
|
||||
NavItem,
|
||||
ToggleWithLabel,
|
||||
Scroller,
|
||||
secondNavSeparators,
|
||||
Separator,
|
||||
@@ -77,6 +78,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
async function saveAutoStart (e: CustomEvent<boolean>): Promise<void> {
|
||||
if (value !== undefined) {
|
||||
await client.update(value, { autoStart: e.detail })
|
||||
}
|
||||
}
|
||||
|
||||
async function addState (): Promise<void> {
|
||||
if (value === undefined) return
|
||||
const prevState = states[states.length - 1]
|
||||
@@ -160,6 +167,13 @@
|
||||
<EditBox bind:value={value.name} on:change={saveName} placeholder={process.string.Untitled} />
|
||||
<ButtonIcon icon={IconDelete} size="small" kind="secondary" on:click={handleDelete} />
|
||||
</div>
|
||||
<div>
|
||||
<ToggleWithLabel
|
||||
on={value.autoStart ?? false}
|
||||
on:change={saveAutoStart}
|
||||
label={process.string.StartAutomatically}
|
||||
/>
|
||||
</div>
|
||||
<div class="hulyComponent-content flex-col-center">
|
||||
<div class="flex-col-center">
|
||||
{#each sortedStates as state (state._id)}
|
||||
|
||||
Reference in New Issue
Block a user