Flow
Setup sau login đầu tiên
Journey setup ở frontend sau lần login branch-scoped đầu tiên thành công.
Mục tiêu
Đưa user vừa authenticate qua setup khi current context cho biết setup chưa complete.
User journey
User login, load current context, vào setup, nhập thông tin center cần thiết và quay lại app khi setup complete.
API sequence
GET /api/workspaces/current-contextPOST /api/setup/startGET /api/setup/statePUT /api/setup/center-profile
Thay đổi state FE
- Đánh dấu setup route active.
- Persist setup step state.
- Refresh current context sau khi setup complete.
Rule redirect
- Setup chưa complete redirect tới setup.
- Setup complete redirect tới app shell.
Xử lý lỗi
Hiển thị validation error inline và route auth failure về login.