Commit Graph

17 Commits

Author SHA1 Message Date
a86795fdf6 fixing ui master 2025-10-25 16:08:42 +07:00
2abed31bde fix field + role user 2025-10-24 18:44:08 +07:00
50d040953f color picker 2025-10-24 11:46:58 +07:00
98e5ed250c modify color card by data 2025-10-22 16:11:52 +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
9f6cb66c37 feat: add password requirements validation and indicators in ChangePasswordModal and DetailUser components 2025-10-14 15:42:28 +07:00
d0bf6782d5 update mengikuti pusat 2025-10-11 03:07:27 +07:00
c5f0c73ae1 refactor: change search parameter from 'search' to 'criteria'
- 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
2025-10-10 15:59:38 +07:00
e00ecbf116 feat: add change password functionality for users
Add ChangePasswordModal component:
- Create modal with new password and confirmation fields
- Implement password validation (min 8 chars, uppercase, lowercase, number, special char)
- Add real-time error validation and display
- Show password requirements info box
- Display username for confirmation
- Add loading state during password change
- Success/error notifications

Update IndexUser:
- Add state management for change password modal
- Pass props to ListUser and ChangePasswordModal
- Integrate ChangePasswordModal component

Update ListUser:
- Add KeyOutlined icon for change password button
- Add purple change password button in action column
- Implement showChangePasswordModal function
- Update columns to include change password handler
- Increase action column width to 18%

API endpoint: PUT /api/user/change-password/:id
2025-10-10 15:49:31 +07:00
c3b5ec2121 feat: refactor role display with dynamic colors and capitalize
- Add helper function capitalizeFirstLetter for consistent formatting
- Add helper function getRoleColor to determine tag color by role_level or role_name
- Refactor role_name column render to use dynamic helpers
- Replace 30+ lines of hardcoded conditions with 8 lines of clean code
- Support any role name from database without code changes
- Display role names with first letter capitalized
- Color mapping: Level 1=purple, Level 2=blue, Level 3=cyan, Level 4=green
- Add KeyOutlined icon import for change password feature
2025-10-10 15:44:46 +07:00
59c90c3519 feat: integrate dynamic role selection in user form
- Add getAllRole API import to fetch roles dynamically
- Add roleList and loadingRoles state management
- Implement fetchRoles function to get all roles from API
- Update Select component to display roles dynamically from database
- Display role format: Role Name (Level X)
- Add loading indicator while fetching roles
- Fetch roles automatically when modal opens
2025-10-10 15:44:21 +07:00
76e40ced3f integrasi role user 2025-10-10 14:59:21 +07:00
5f6c156c12 feat: add role fetching functionality to DetailUser component 2025-10-10 14:49:16 +07:00
823492a381 add detailuser file 2025-10-09 22:53:06 +07:00
8ef1bdb142 update data index username, fullname, user phone 2025-10-09 03:47:13 +07:00
bc46328832 feat: implement user management API functions and create ListUser component for user listing 2025-10-08 14:45:41 +07:00