mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-28 04:25:03 +02:00
Rework processes (#9322)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com> Signed-off-by: Andrey Sobolev <haiodo@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
co-authored by
Copilot
Andrey Sobolev
parent
d900cc5d01
commit
f50b0fab71
@@ -17,7 +17,7 @@
|
||||
import core, { generateId, Ref } from '@hcengineering/core'
|
||||
import { translate } from '@hcengineering/platform'
|
||||
import { createQuery, getClient } from '@hcengineering/presentation'
|
||||
import { Process, State, Step } from '@hcengineering/process'
|
||||
import { Process, State } from '@hcengineering/process'
|
||||
import { ButtonIcon, getCurrentLocation, Icon, IconAdd, Label, navigate } from '@hcengineering/ui'
|
||||
import process from '../plugin'
|
||||
|
||||
@@ -31,19 +31,25 @@
|
||||
name: await translate(process.string.NewProcess, {}),
|
||||
masterTag: masterTag._id,
|
||||
context: {},
|
||||
description: '',
|
||||
initState
|
||||
description: ''
|
||||
})
|
||||
await client.createDoc(
|
||||
process.class.State,
|
||||
core.space.Model,
|
||||
{
|
||||
process: id,
|
||||
title: await translate(process.string.NewState, {}),
|
||||
actions: []
|
||||
title: await translate(process.string.NewState, {})
|
||||
},
|
||||
initState
|
||||
)
|
||||
await client.createDoc(process.class.Transition, core.space.Model, {
|
||||
process: id,
|
||||
from: null,
|
||||
to: initState,
|
||||
trigger: process.trigger.OnExecutionStart,
|
||||
actions: [],
|
||||
triggerParams: {}
|
||||
})
|
||||
handleSelect(id)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user