Commit Graph

5 Commits

Author SHA1 Message Date
4bd0348a2a clean code master plant sub section and master device 2025-10-21 20:26:05 +07:00
5e728a6ff3 refactor: enhance error handling and logging in API requests 2025-10-12 22:08:57 +07:00
d7a09840b9 feat: update device API with server-side pagination support
- 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
2025-10-10 15:50:20 +07:00
3b51f59679 update: enhance device API functions with pagination and response structure; modify device form validation and UI components 2025-10-01 14:33:55 +07:00
2778c96143 add: device API functions for CRUD device 2025-10-01 11:33:10 +07:00