feat(management): user management and role-based navigation #170

Closed
opened 2026-09-30 07:45:19 +00:00 by yuris · 0 comments
Owner

Summary

Port the finalized OpenDesign user management prototype into the live management web app (apps/management).

Acceptance Criteria

  • Add role-based navigation to DashboardNav:
    • Neutral "Pengaturan" trigger button in sidebar footer for all users with orange gear icon and up chevron.
    • Desktop drop-up popover with user name, email, "Profil Saya", and "Keluar" for all users.
    • "Manajemen Pengguna" item visible in drop-up only for admin users with unhighlighted styling matching "Profil Saya".
    • Mobile bottom navigation includes "Pengaturan" 5th item opening a mobile settings drawer with the same options.
    • No role badges displayed in drop-up or mobile drawer.
  • Add /settings/users page for admin user management:
    • Guarded: accessible only by admin role.
    • Metric summary cards: Total Akun, Admin count, Manager count, Operator count.
    • Search bar and role filter pills (Semua, Admin, Manager, Operator).
    • "Tambah Pengguna" button placed beside role filters on desktop and under filters on mobile.
    • User table listing users, phone/WhatsApp, role badge, module permissions, and actions.
    • Modals: Add User (with random password generator), Edit User (name, phone, role), and Reset Password.
  • Update auth schema and guards:
    • Better Auth user model supports role attribute (admin, manager, operator).
    • Seed or migration accounts configured with appropriate roles.
  • Verification:
    • pnpm --filter garage test and pnpm --filter garage typecheck pass.
    • Biome checks pass via .forgejo/scripts/biome-gate.sh.
## Summary Port the finalized OpenDesign user management prototype into the live management web app (`apps/management`). ## Acceptance Criteria - [ ] Add role-based navigation to `DashboardNav`: - Neutral "Pengaturan" trigger button in sidebar footer for all users with orange gear icon and up chevron. - Desktop drop-up popover with user name, email, "Profil Saya", and "Keluar" for all users. - "Manajemen Pengguna" item visible in drop-up only for admin users with unhighlighted styling matching "Profil Saya". - Mobile bottom navigation includes "Pengaturan" 5th item opening a mobile settings drawer with the same options. - No role badges displayed in drop-up or mobile drawer. - [ ] Add `/settings/users` page for admin user management: - Guarded: accessible only by admin role. - Metric summary cards: Total Akun, Admin count, Manager count, Operator count. - Search bar and role filter pills (`Semua`, `Admin`, `Manager`, `Operator`). - "Tambah Pengguna" button placed beside role filters on desktop and under filters on mobile. - User table listing users, phone/WhatsApp, role badge, module permissions, and actions. - Modals: Add User (with random password generator), Edit User (name, phone, role), and Reset Password. - [ ] Update auth schema and guards: - Better Auth user model supports role attribute (`admin`, `manager`, `operator`). - Seed or migration accounts configured with appropriate roles. - [ ] Verification: - `pnpm --filter garage test` and `pnpm --filter garage typecheck` pass. - Biome checks pass via `.forgejo/scripts/biome-gate.sh`.
yuris closed this issue 2026-09-30 08:14:07 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
yuris/garage#170
No description provided.