feat: include Pending status in task status count calculation

This commit is contained in:
puriphatt 2024-12-26 14:14:16 +07:00
parent f485d95e81
commit 9fe09ef4ae

View file

@ -564,7 +564,11 @@ function taskStatusCount(index: number, id: string) {
(t) => t.requestWorkStep.requestWork.productService.productId === id, (t) => t.requestWorkStep.requestWork.productService.productId === id,
); );
if (index === 1) { if (index === 1) {
return task?.filter((t) => t.taskStatus === TaskStatus.InProgress).length; return task?.filter(
(t) =>
t.taskStatus === TaskStatus.InProgress ||
t.taskStatus === TaskStatus.Pending,
).length;
} else if (index === 2) { } else if (index === 2) {
return task?.filter( return task?.filter(
(t) => (t) =>