feature: Tasks tab added for lab organizations. tasks now can be assigned and their status can be updated by the assignee.

This commit is contained in:
2026-06-28 22:56:56 +03:30
parent feb0b26ad0
commit 2a48946a51
29 changed files with 851 additions and 43 deletions

View File

@@ -0,0 +1,20 @@
import { apiClient } from './client';
import type { LabTaskListItem, LabTaskStatus, PaginatedLabTasks } from '@/types/cases';
export const tasksApi = {
list: async (params: { page?: number; limit?: number } = {}): Promise<{
success: boolean;
data: PaginatedLabTasks;
}> => {
const response = await apiClient.get('/tasks', { params });
return response.data;
},
updateStatus: async (
taskId: string,
status: LabTaskStatus,
): Promise<{ success: boolean; data: LabTaskListItem }> => {
const response = await apiClient.patch(`/tasks/${taskId}`, { status });
return response.data;
},
};