feat(portal) : allow client to edit own tickets

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-15 20:41:25 +01:00
parent d2f6d84d03
commit ffe4a0117c
3 changed files with 213 additions and 72 deletions

View File

@@ -30,11 +30,17 @@ export function useClientTicketService() {
})
}
async function update(id: number, data: Partial<ClientTicketWrite>): Promise<ClientTicket> {
return api.patch<ClientTicket>(`/client_tickets/${id}`, data as Record<string, unknown>, {
toastSuccessKey: 'clientTicket.statusUpdated',
})
}
async function remove(id: number): Promise<void> {
await api.delete(`/client_tickets/${id}`, {}, {
toastSuccessKey: 'clientTicket.deleted',
})
}
return { getAll, getById, create, updateStatus, remove }
return { getAll, getById, create, update, updateStatus, remove }
}