improvement: notify counter badge added to treatment and tasks tabs for upadted and edited cases.

This commit is contained in:
2026-07-13 17:44:44 +03:30
parent 547457d637
commit 2ad572f4c8
33 changed files with 908 additions and 31 deletions

View File

@@ -0,0 +1,19 @@
import { apiClient } from '@/lib/api/client';
import type { LabCaseTabReadTarget, TabBadgeCounts } from '@/lib/tabBadgeUtils';
export const notificationsApi = {
tabCounts: async (): Promise<{ success: boolean; data: TabBadgeCounts }> => {
const response = await apiClient.get('/notifications/tab-counts');
return response.data;
},
markTabRead: async (tab: LabCaseTabReadTarget): Promise<{ success: boolean }> => {
const response = await apiClient.post('/notifications/mark-tab-read', { tab });
return response.data;
},
markCaseRead: async (labCaseId: string): Promise<{ success: boolean }> => {
const response = await apiClient.post('/notifications/mark-case-read', { labCaseId });
return response.data;
},
};