feat: improve logs page with debounce, action/village/date filters, and timestamp fix
This commit is contained in:
@@ -18,8 +18,14 @@ export const API_URLS = {
|
||||
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)}`,
|
||||
getLogsAllVillages: (page: number, search: string, action?: string, idVillage?: string, dateFrom?: string, dateTo?: string) => {
|
||||
const params = new URLSearchParams({ page: String(page), search })
|
||||
if (action) params.set('action', action)
|
||||
if (idVillage) params.set('idVillage', idVillage)
|
||||
if (dateFrom) params.set('dateFrom', dateFrom)
|
||||
if (dateTo) params.set('dateTo', dateTo)
|
||||
return `${DESA_PLUS_PROXY}/api/monitoring/log-all-villages?${params}`
|
||||
},
|
||||
getGridOverview: () => `${DESA_PLUS_PROXY}/api/monitoring/grid-overview`,
|
||||
getDailyActivity: () => `${DESA_PLUS_PROXY}/api/monitoring/daily-activity`,
|
||||
getComparisonActivity: () => `${DESA_PLUS_PROXY}/api/monitoring/comparison-activity`,
|
||||
|
||||
Reference in New Issue
Block a user