Repository navigation
feat: home shows the Assessments assigned to you, one tap to sit them - #622
Merged
Merged
Conversation
Home now reads the caller's own Attempts (GET /api/people/assessment-attempts/mine) when the Account may sit Assessments — it holds the sit permission or carries no permissions at all, the same rule the sitting route's guard applies — and draws one card per open Attempt (assigned or in progress) in an Assessments group right after Actions. The running Attempt comes first, then the soonest deadline or due date, then the number; a tap opens the sitting. A 403 (no Employee) is an empty list, nothing open draws nothing, and any other failure is the section's own failure with its own retry. No backend change. AppStatTile's figure becomes optional so an Attempt card, a task rather than a tally, shows no count; tiles with a figure draw exactly as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
phamtruonghung
added a commit
that referenced
this pull request
Nov 26, 2026
# Conflicts: # frontend/lib/home_bloc.dart # frontend/lib/home_screen.dart # frontend/lib/l10n/app_en.arb # frontend/lib/l10n/app_localizations.dart # frontend/lib/l10n/app_localizations_en.dart # frontend/lib/l10n/app_localizations_vi.dart # frontend/lib/l10n/app_vi.arb # frontend/test/home_test.dart
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Home now shows the Assessments assigned to the signed-in person. Each open Attempt gets its own card, and tapping it goes straight to the sitting, the same way assigned work already appears on Home.
What changed
HomeBlocreads the existingGET /api/people/assessment-attempts/mine, and only when the Account holdsPPL_ASSESSMENT_SIT(or carries no permission codes, which is the router's own fallback). A 403, meaning no Employee is linked, is treated as an empty list. Any other failure shows its own failure state with a retry.assignedorin_progress. Running Attempts come first, then the soonest deadline or due date. A running card's caption gives its deadline; any other card shows number · process · due date. Tapping a card opensRoutes.assessmentSitting.AppStatTile.figureis now optional, so a task card has no number. Tiles that pass a figure render exactly as before.Tests
frontend/test/home_test.dart, group "Assessments assigned to me":