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:
@@ -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"]
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user