Persist issue read state and clear unread on open

This commit is contained in:
Dotta
2026-03-06 08:34:19 -06:00
parent 86bd26ee8a
commit 38d3d5fa59
11 changed files with 6062 additions and 44 deletions

View File

@@ -32,6 +32,7 @@ export const issuesApi = {
api.post<IssueLabel>(`/companies/${companyId}/labels`, data),
deleteLabel: (id: string) => api.delete<IssueLabel>(`/labels/${id}`),
get: (id: string) => api.get<Issue>(`/issues/${id}`),
markRead: (id: string) => api.post<{ id: string; lastReadAt: Date }>(`/issues/${id}/read`, {}),
create: (companyId: string, data: Record<string, unknown>) =>
api.post<Issue>(`/companies/${companyId}/issues`, data),
update: (id: string, data: Record<string, unknown>) => api.patch<Issue>(`/issues/${id}`, data),