[STU-111] Add Civil ID fact panel to candidate profile#37
Conversation
Show civil ID number, expiry date with warning/expired state, photo front/back thumbnails, and needs-verification badge below the profile facts grid. Adds a dedicated CivilIdPanel component with expiry date threshold alerts (90 days) and responsive photo layout. Co-Authored-By: Paperclip <noreply@paperclip.ing>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughAdds a CivilIdPanel component and corresponding CSS, updates CandidateProfile to render the panel and simplify the Civil ID fact display, and includes two small fixes: form action prop changes and adding ChangesCivil ID Panel
Miscellaneous fixes
🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs:
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Comment |
…Action casts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/modules/candidates/WorkLogStaffActions.tsx (1)
17-24: ⚡ Quick winRemove redundant
as WorkLogActioncasts inuseActionState
approveWorkLogandrejectWorkLoginsrc/modules/candidates/worklog-actions.tshave the same signature asWorkLogAction((state: { error: string }, formData: FormData) => Promise<{ error: string }>), so theas WorkLogActioncasts atsrc/modules/candidates/WorkLogStaffActions.tsxlines 18 and 22 are unnecessary.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/modules/candidates/WorkLogStaffActions.tsx` around lines 17 - 24, The explicit type assertions "as WorkLogAction" on approveWorkLog and rejectWorkLog are redundant; remove the casts so useActionState is called with approveWorkLog and rejectWorkLog directly. Update the two lines that call useActionState with approveWorkLog and rejectWorkLog in WorkLogStaffActions.tsx (keeping the same initial state { error: "" }) and ensure no other code relies on those casts; the function signatures already match the WorkLogAction type.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/modules/candidates/WorkLogStaffActions.tsx`:
- Around line 17-24: The explicit type assertions "as WorkLogAction" on
approveWorkLog and rejectWorkLog are redundant; remove the casts so
useActionState is called with approveWorkLog and rejectWorkLog directly. Update
the two lines that call useActionState with approveWorkLog and rejectWorkLog in
WorkLogStaffActions.tsx (keeping the same initial state { error: "" }) and
ensure no other code relies on those casts; the function signatures already
match the WorkLogAction type.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: a25d406f-b7f8-48a6-aa49-3330c2721fd1
📒 Files selected for processing (2)
src/modules/candidates/WorkLogStaffActions.tsxsrc/modules/workspace/data.ts
…ts [STU-111] Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
Adds a dedicated Civil ID fact panel below the profile facts grid on the candidate profile page. The panel shows:
Changes
src/modules/candidates/CandidateProfile.tsx— AddedCivilIdPanelcomponent + wired it below the facts gridsrc/app/styles.css— Added ~103 lines of CSS for.civilIdPanel, badges, photos, dark mode, and responsive breakpointsTest plan
Database has candidates covering all scenarios (see QA test matrix in STU-125).
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Style