Skip to content

feat: home shows the papers waiting for you to mark - #624

Merged
phamtruonghung merged 3 commits into
mainfrom
wt/t_fcbec07d
Nov 26, 2026
Merged

phamtruonghung merged 3 commits into
mainfrom
wt/t_fcbec07d

Conversation

@phamtruonghung

Copy link
Copy Markdown
Owner

Home now shows a Marker the papers waiting for them, the counterpart of #622 for the candidate side.

Stacked on #622 (base wt/t_7b65fe73): both edit home_bloc.dart / home_screen.dart. Merge #622 first; GitHub retargets this PR to main when that branch goes.

  • A "To mark" group (VI "Bài cần chấm") right after the Assessments group, read from the existing marking queue GET /api/people/assessment-marking (already scoped to the caller's write reach). No backend change.
  • One card per submitted paper, oldest first, up to 6; a tap opens that paper's marking screen. When the queue's total is over 6, one more card with the total opens /assessments/marking.
  • Earned by the same rule as the marking route's guard (PPL_ASSESSMENT_MARK, or a maintenance role when no permissions are recorded). Hidden when the queue is empty, and a 403 is read as empty. Any other error gets its own failure state with a retry.
  • Home goldens are unchanged: the shared fake's marking queue is empty, so nothing new is drawn.

Tests: home_test.dart group "Papers to mark" (6 cases).

Kanban t_fcbec07d.

phamtruonghung and others added 3 commits November 26, 2026 20:44
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>
A Marker now finds the submitted Attempts waiting for them right on Home, in
a "To mark" group placed after Assessments. HomeBloc earns the new section by
the same rule as the marking route's guard (the PPL_ASSESSMENT_MARK permission,
or a maintenance role when no permissions are recorded), reads the marking
queue concurrently with the other sections, treats a 403 as an empty queue, and
has its own retry. Home lists up to six papers oldest first, each opening its
marking screen, plus a card with the queue's total that opens the whole queue
when more are waiting. An empty queue draws nothing, and the all-clear check
counts the queue's total. New EN/VI strings were added and the generated
localizations were edited by hand because no Flutter SDK was available.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# 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
@phamtruonghung
phamtruonghung changed the base branch from wt/t_7b65fe73 to main November 26, 2026 14:49
@phamtruonghung
phamtruonghung merged commit 87cbc12 into main Nov 26, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant