UBER-1182: Fix task type categories (#4222)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2023-12-20 13:29:31 +07:00
committed by GitHub
parent 5029c18f02
commit 5062febad9
26 changed files with 382 additions and 478 deletions
+8
View File
@@ -109,6 +109,14 @@ export interface TaskTypeDescriptor extends Doc {
allowCreate: boolean
}
/**
* @public
*/
export interface TaskStatusFactory {
category: Ref<StatusCategory>
statuses: (string | [string, number])[]
}
/**
* @public
*/
-13
View File
@@ -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
*/