feat(admin): add categories and teams management page
This commit is contained in:
@@ -3,6 +3,7 @@ import type {
|
||||
InterventionSummaryResponse,
|
||||
OkResponse,
|
||||
PagedReportListResponse,
|
||||
TeamListResponse,
|
||||
UpdateStatusRequest
|
||||
} from "~/types/api";
|
||||
|
||||
@@ -16,6 +17,9 @@ export const useOperator = () => {
|
||||
const getOtherOperatorReports = (query?: { page?: number; per_page?: number }) =>
|
||||
useApiFetch<PagedReportListResponse>('/api/v1/operator/reports/others', { method: 'GET', query })
|
||||
|
||||
const getTeams = () =>
|
||||
useApiFetch<TeamListResponse>('/api/v1/operator/teams', { method: 'GET' })
|
||||
|
||||
const takeReport = (id: number) =>
|
||||
useApiFetch<OkResponse>(`/api/v1/reports/${id}/take`, { method: 'POST' })
|
||||
|
||||
@@ -32,9 +36,10 @@ export const useOperator = () => {
|
||||
getOpenReports,
|
||||
getAssignedReports,
|
||||
getOtherOperatorReports,
|
||||
getTeams,
|
||||
takeReport,
|
||||
updateReportStatus,
|
||||
assignTeam,
|
||||
getInterventionSummary,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user