feat(ui): 3-tab layout (Admin overview / My dashboard / Training) + Settings page

- App.vue: top tab bar (Admin overview [admin], My dashboard, Training) + Settings icon
- router: / = admin overview, /my/board, /training, /settings; non-admin '/' -> /my/board
- New views: Training.vue (pick ready product group -> personas), MyBoard.vue (win/lose +
  sessions summary), Settings.vue (change email/password, language)
- Backend: allow /api/me/board + /api/chat/sessions for any authenticated user (so the
  My dashboard tab works for admins too), not just 'user' role
- i18n EN/TH keys; rebuilt frontend/dist
Verified: build ok, /api/me/board + /api/chat/sessions + /api/groups all 200 for admin.
This commit is contained in:
Macky
2026-08-07 22:07:16 +07:00
parent aec596d1d6
commit ac35be8906
32 changed files with 308 additions and 61 deletions

View File

@@ -168,7 +168,6 @@ def finish_session(gid: str, pid: str):
@chat_bp.get("/sessions")
@require_auth
@require_roles("user")
def my_sessions():
s = _stores()
uid = current_user()["id"]

View File

@@ -23,9 +23,8 @@ def _stores():
@me_bp.get("/board")
@require_auth
@require_roles("user")
def win_lose_board():
"""Per-persona won/lost/not-tried across all groups the user sees."""
"""Per-persona won/lost/not-tried across all groups the user sees (any authenticated user)."""
s = _stores()
uid = current_user()["id"]
my_sessions = s["sessions"].list_for_user(uid)