This repository has been archived on 2026-08-11. You can view files and clone it, but cannot push or open issues or pull requests.
Gishen-B2B/docs/features/profile.md
kirukib 1f30f00da6 Finalize portal polish: profile, avatars, ID cards, and list UX.
Ship leftover Yimaru login/personas, sidebar sections, filter modal, chart/stat clip fixes, and matching feature docs so the polish work is fully committed.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 21:57:07 +03:00

47 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Feature: Profile
Authenticated user’s own account page — demo session details, role switch (multi-role), sign out.
**Workspace:** `/Users/kirukib/Desktop/Yaltopia Project/Gishen-B2B`
## Pages
| Route | Purpose |
|-------|---------|
| `/profile` | Own profile — name, email, active role, org, locale, avatar initials |
## Roles
All authenticated roles: `SUPER_USER`, `HR_ADMIN`, `FINANCE`, `MEMBER`.
## UI
- Account section in sidebar (`nav.profile`)
- Quick directory entry (`profile`)
- Topbar avatar menu → Profile
- `DetailPageLayout` + `DetailProfileCard` / `DetailSection` (Yimaru-style)
## Demo personas (login)
| Id | Name | Primary role | Notes |
|----|------|--------------|-------|
| `user_super` | Selam Super | SUPER_USER | Multi-role: all four; role switcher on profile |
| `user_hr` | Hanna HR | HR_ADMIN | |
| `user_fin` | Fikru Finance | FINANCE | Locale `am` |
| `user_mem` | Abebe Member | MEMBER | Locale `am` |
Login uses a **test-user dropdown** (`listDemoPersonas` / `loginAsUser`), not role-only cards.
## Endpoints (stubs)
- `GET /v1/me/profile` — current user profile
- `PATCH /v1/me/profile` — locale / display name (mock)
- Related: `GET /v1/auth/demo-profiles`, `GET /v1/auth/me`
See [`../backend/endpoints/auth.md`](../backend/endpoints/auth.md).
## Related
- [auth-roles.md](auth-roles.md)
- [i18n.md](i18n.md)