feat: server-side filter, village filter, and sortable columns on users page
This commit is contained in:
@@ -9,8 +9,15 @@ export const API_URLS = {
|
||||
`${DESA_PLUS_PROXY}/api/monitoring/grid-villages?id=${id}`,
|
||||
graphLogVillages: (id: string, time: string) =>
|
||||
`${DESA_PLUS_PROXY}/api/monitoring/graph-log-villages?id=${id}&time=${time}`,
|
||||
getUsers: (page: number, search: string) =>
|
||||
`${DESA_PLUS_PROXY}/api/monitoring/user?page=${page}&search=${encodeURIComponent(search)}`,
|
||||
getUsers: (page: number, search: string, isActive?: string, idUserRole?: string, idVillage?: string, orderBy?: string, orderDir?: string) => {
|
||||
const params = new URLSearchParams({ page: String(page), search })
|
||||
if (isActive !== undefined) params.set('isActive', isActive)
|
||||
if (idUserRole) params.set('idUserRole', idUserRole)
|
||||
if (idVillage) params.set('idVillage', idVillage)
|
||||
if (orderBy) params.set('orderBy', orderBy)
|
||||
if (orderDir) params.set('orderDir', orderDir)
|
||||
return `${DESA_PLUS_PROXY}/api/monitoring/user?${params}`
|
||||
},
|
||||
getLogsAllVillages: (page: number, search: string) =>
|
||||
`${DESA_PLUS_PROXY}/api/monitoring/log-all-villages?page=${page}&search=${encodeURIComponent(search)}`,
|
||||
getGridOverview: () => `${DESA_PLUS_PROXY}/api/monitoring/grid-overview`,
|
||||
|
||||
Reference in New Issue
Block a user