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>
47 lines
1.3 KiB
Markdown
47 lines
1.3 KiB
Markdown
# 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)
|