feat: redesign /logs page with table UI and date range filter
- Replace timeline view with table layout (Time, Operator, Type, Message) - Add date range filter using @mantine/dates DatePickerInput - Add SegmentedControl for log type filter - Disable App Logs and Settings menu on /dev - Remove Activity Logs menu from /dev (moved to /logs) - Add dateFrom/dateTo query params to /api/logs backend - Import @mantine/dates/styles.css to fix datepicker styling Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -25,8 +25,12 @@ export const API_URLS = {
|
||||
editUser: () => `${API_BASE_URL}/api/monitoring/edit-user`,
|
||||
updateStatusVillages: () => `${API_BASE_URL}/api/monitoring/update-status-villages`,
|
||||
editVillages: () => `${API_BASE_URL}/api/monitoring/edit-villages`,
|
||||
getGlobalLogs: (page: number, search: string, type: string, userId: string) =>
|
||||
`/api/logs?page=${page}&search=${encodeURIComponent(search)}&type=${type}&userId=${userId}`,
|
||||
getGlobalLogs: (page: number, search: string, type: string, userId: string, dateFrom?: string, dateTo?: string) => {
|
||||
const params = new URLSearchParams({ page: String(page), search, type, userId })
|
||||
if (dateFrom) params.set('dateFrom', dateFrom)
|
||||
if (dateTo) params.set('dateTo', dateTo)
|
||||
return `/api/logs?${params}`
|
||||
},
|
||||
getLogOperators: () => `/api/logs/operators`,
|
||||
getOperators: (page: number, search: string) =>
|
||||
`/api/operators?page=${page}&search=${encodeURIComponent(search)}`,
|
||||
|
||||
Reference in New Issue
Block a user