- Update defaultFilter to use criteria instead of search
- Update handleSearch to use criteria parameter
- Update handleSearchClear to use criteria parameter
- Update auto-clear onChange to use criteria parameter
API endpoint now uses: /api/roles?page=1&limit=10&criteria=keyword
- Update defaultFilter to use criteria instead of search
- Update handleSearch to use criteria parameter
- Update handleSearchClear to use criteria parameter
- Update auto-clear onChange to use criteria parameter
API endpoint now uses: /api/device?page=1&limit=10&criteria=keyword
- Update defaultFilter to use criteria instead of search
- Update handleSearch to use criteria parameter
- Update handleSearchClear to use criteria parameter
- Update auto-clear onChange to use criteria parameter
API endpoint now uses: /api/user?page=1&limit=10&criteria=keyword
- Add support for backend pagination with current_page, current_limit, total_limit, total_page
- Handle multiple sources for total count (total_data, rows, data.length)
- Transform backend paging structure to frontend format
- Maintain client-side pagination as fallback
- Add comprehensive error handling with try-catch
- Add detailed console logging for debugging
- Map backend fields: current_page->page, current_limit->limit, total_limit->total
- Calculate total_page if not provided by backend
Backend response format: GET /api/device?page=1&limit=10
Supports both server-side and client-side pagination modes
- Add support for server-side pagination from backend
- Maintain client-side pagination as fallback
- Filter out super admin users (is_sa = true or 1) in both paths
- Add comprehensive error handling with try-catch
- Add console logging for debugging
- Return standardized response structure
- Handle both boolean and integer values for is_sa field
- Recalculate pagination info after filtering SA users
API now supports both backend pagination and ensures SA users are always hidden from the list
- Fix getAllRole endpoint from roles/roles to roles
- Fix getRoleById endpoint from roles/roles/:id to roles/:id
- Fix createRole endpoint from roles/roles to roles
- Fix updateRole endpoint from roles/roles/:id to roles/:id
- Fix deleteRole endpoint from roles/roles/:id to roles/:id
- Add try-catch error handling in getAllRole
- Support both server-side and client-side pagination
This fixes SQL error: Conversion failed when converting the nvarchar value 'roles' to data type int
Backend was interpreting duplicate /roles as an ID parameter