Fix edit statuses link (#4593)

Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
Vyacheslav Tumanov
2024-02-09 22:30:26 +07:00
committed by GitHub
parent be2e435ade
commit 2e4d07fb1b
3 changed files with 5 additions and 19 deletions
+2 -13
View File
@@ -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)
}