mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-22 17:45:02 +02:00
Fix edit statuses link (#4593)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
@@ -76,21 +76,10 @@ export * from './utils'
|
||||
export { StatePresenter, StateRefPresenter, TypeStatesPopup, TaskKindSelector }
|
||||
|
||||
async function editStatuses (object: Project, ev: Event): Promise<void> {
|
||||
const client = getClient()
|
||||
const descriptor = await client.findOne(task.class.ProjectTypeDescriptor, { attachedToClass: object._class })
|
||||
const loc = getCurrentLocation()
|
||||
loc.path[2] = 'setting'
|
||||
loc.path[3] = 'setting'
|
||||
loc.path[4] = 'statuses'
|
||||
loc.query =
|
||||
descriptor != null
|
||||
? {
|
||||
descriptorId: descriptor._id,
|
||||
typeId: object.type
|
||||
}
|
||||
: {
|
||||
typeId: object.type
|
||||
}
|
||||
loc.path[3] = 'statuses'
|
||||
loc.path[4] = object.type
|
||||
navigate(loc)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user