update link registration site to executive dashboard
This commit is contained in:
1 parent
1e6f6b3b57
commit
d0d1ae7d24
26 files changed
+1044
-55
No files matched your search
+12
-3
@@ -19,6 +19,7 @@ import type {
|
||||
ManualInputWrite,
|
||||
Paginated,
|
||||
PanelIoT,
|
||||
PusatRegistration,
|
||||
Site,
|
||||
SiteWrite,
|
||||
User,
|
||||
@@ -165,11 +166,11 @@ export const api = {
|
||||
list: async (query?: { user_id?: number }) =>
|
||||
unwrapList(await get<Paginated<Site> | Site[]>('/sites/', query)),
|
||||
create: (body: SiteWrite) => post<Site>('/sites/', body),
|
||||
update: (id: number, body: Partial<SiteWrite>) => patch<Site>(`/sites/${id}/`, body),
|
||||
remove: (id: number) => del(`/sites/${id}/`),
|
||||
update: (id: string, body: Partial<SiteWrite>) => patch<Site>(`/sites/${id}/`, body),
|
||||
remove: (id: string) => del(`/sites/${id}/`),
|
||||
},
|
||||
kandangs: {
|
||||
list: async (query?: { site_id?: number }) =>
|
||||
list: async (query?: { site_id?: string }) =>
|
||||
unwrapList(await get<Paginated<Kandang> | Kandang[]>('/kandangs/', query)),
|
||||
create: (body: KandangWrite) => post<Kandang>('/kandangs/', body),
|
||||
update: (id: number, body: Partial<KandangWrite>) => patch<Kandang>(`/kandangs/${id}/`, body),
|
||||
@@ -199,6 +200,14 @@ export const api = {
|
||||
cancelCloseRequest: (id: number) =>
|
||||
post<Cycle>(`/cycles/${id}/cancel-close-request/`, {}),
|
||||
},
|
||||
pusat: {
|
||||
register: (body: { code: string; site_id: string }) =>
|
||||
post<PusatRegistration>('/pusat/register/', body),
|
||||
changeCode: (body: { code: string; site_id: string }) =>
|
||||
post<PusatRegistration>('/pusat/change-code/', body),
|
||||
registration: (query?: { site_id?: string }) =>
|
||||
get<PusatRegistration[]>('/pusat/registration/', query),
|
||||
},
|
||||
kpis: {
|
||||
list: async (query?: CycleFilter) =>
|
||||
unwrapList(await get<Paginated<KPI> | KPI[]>('/kpis/', query)),
|
||||
|
||||
Reference in new issue
Block a user