init
This commit is contained in:
13
worklenz-frontend/src/utils/check-task-dependency-status.ts
Normal file
13
worklenz-frontend/src/utils/check-task-dependency-status.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { tasksApiService } from "@/api/tasks/tasks.api.service";
|
||||
import logger from "./errorLogger";
|
||||
|
||||
export const checkTaskDependencyStatus = async (taskId: string, statusId: string) => {
|
||||
if (!taskId || !statusId) return false;
|
||||
try {
|
||||
const res = await tasksApiService.getTaskDependencyStatus(taskId, statusId);
|
||||
return res.done ? res.body.can_continue : false;
|
||||
} catch (error) {
|
||||
logger.error('Error checking task dependency status:', error);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user