Commit Graph

7 Commits

Author SHA1 Message Date
hosseintaromi e52ea39e60 feat(shipping-methods): add full CRUD scaffolding (list + form), API routes, query keys and React Query hooks; improve dropdown selected contrast; numeric inputs with thousand separators and no default zeros 2025-09-01 01:21:29 +03:30
hossein taromi dce0f918ef feat(admin-users): enhance admin user management with permissions and roles
- Add permissions and roles multi-select to admin user form
- Update admin user models to include permissions and roles arrays
- Make permissions list page read-only by removing CRUD actions
- Integrate MultiSelectAutocomplete for better UX
2025-07-27 14:45:01 +03:30
hosseintaromi 5862bd97a1 ui: update navigation and routing
- Add routes for admin users, roles, and permissions management
- Update sidebar with System Management section
- Remove undeveloped menu items for cleaner demo
- Add proper route protection and loading states
- Export new permission management types
2025-07-22 08:48:52 +03:30
hosseintaromi 4d385f2031 auth: update authentication system
- Update AuthContext with new login response structure
- Add isLoading state to prevent premature redirects
- Implement proper session restoration from localStorage
- Update permission checking logic (id=1 = super admin)
- Fix login form to use new API structure
- Store tokens, user info, and permissions in localStorage
2025-07-22 08:48:12 +03:30
hosseintaromi d06135824d feat(auth): implement Super Admin permission system
- Update AdminUser interface to match new API response structure
- Remove permissions/roles from AdminUser (they come separately)
- Update hasPermission logic: id=1 (AdminAll) = Super Admin access
- Fix localStorage handling to remove admin_all_permissions key
- Super Admin (permission id=1) now has access to everything
- Other users checked against their specific permissions
2025-07-22 00:01:53 +03:30
hosseintaromi 2ea8d19c87 feat(types): add authentication type definitions
- Add Permission, Role, AdminUser interfaces
- Add LoginRequest, LoginResponse, AuthState types
- Update main types index with auth exports
2025-07-18 13:06:03 +03:30
hosseintaromi 46d9c20d87 Update file structure and improve code organization in the main directory 2025-07-13 22:03:22 +03:30