mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-27 12:04:56 +02:00
UBER-1182: Fix task type categories (#4222)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -109,6 +109,14 @@ export interface TaskTypeDescriptor extends Doc {
|
||||
allowCreate: boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export interface TaskStatusFactory {
|
||||
category: Ref<StatusCategory>
|
||||
statuses: (string | [string, number])[]
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
|
||||
@@ -23,7 +23,6 @@ import core, {
|
||||
IdMap,
|
||||
Ref,
|
||||
Status,
|
||||
StatusCategory,
|
||||
TxOperations,
|
||||
generateId,
|
||||
type AnyAttribute,
|
||||
@@ -138,18 +137,6 @@ export async function createState<T extends Status> (
|
||||
return res
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export function isTaskCategory (category: Ref<StatusCategory>): boolean {
|
||||
return (
|
||||
category === task.statusCategory.Active ||
|
||||
category === task.statusCategory.Active ||
|
||||
category === task.statusCategory.Won ||
|
||||
category === task.statusCategory.Lost
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user