Commit Graph

22 Commits

Author SHA1 Message Date
4bd0348a2a clean code master plant sub section and master device 2025-10-21 20:26:05 +07:00
55213480c9 Merge branch 'lavoce' of https://gitea.idetama.id/yogiedigital/cod-fe into lavoce 2025-10-21 17:07:37 +07:00
cf063822eb feat: add brand device management with error code handling and navigation 2025-10-21 17:07:36 +07:00
94d395fe49 feat: implement CRUD operations for status management in master-status API 2025-10-21 08:39:17 +07:00
d2c755c03d Refactor: shift management API and UI components 2025-10-20 13:49:42 +07:00
6be90b6ea9 feat: add unit management functionality with list, detail, and API integration 2025-10-17 15:48:14 +07:00
172e14e77d update handle reject & is_active 2025-10-16 11:30:00 +07:00
2d2b1a6b0c pending reject handle 2025-10-15 19:42:47 +07:00
e13d7eb3be refactor: update tag management with improved validation and device integration 2025-10-14 12:18:08 +07:00
d9fb7c9fce refactor plant section 2025-10-13 11:02:17 +07:00
54290baaac feat: add shift management functionality with CRUD operations and UI components 2025-10-13 02:25:16 +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
2817f3c31c feat: update user API with server-side pagination and enhanced filtering
- 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
2025-10-10 15:48:22 +07:00
7a8a46ee64 fix: remove duplicate /roles in API endpoints
- 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
2025-10-10 15:45:39 +07:00
a6e8c39ed8 integrasi role 2025-10-10 11:39:31 +07:00
f1fe0e0bc4 filter hide superadmin from get all user 2025-10-09 22:51:27 +07:00
bc46328832 feat: implement user management API functions and create ListUser component for user listing 2025-10-08 14:45:41 +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
c64b7b3490 update: route 2025-09-26 11:07:03 +07:00
27b060845b Add api 2025-09-17 12:19:00 +07:00