-
Notifications
You must be signed in to change notification settings - Fork 0
Add candidate self-service: profile edit, invitation response, work log appeal, payments #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
70b3c36
Fix broken chord navigation by populating shortcut on OS commands
BAWES 35bfcef
Install and configure Tailwind CSS v4 with PostCSS plugin
BAWES 1b60265
merge: bring in main with Tailwind v4 and slide panel
BAWES 8ec7387
Add candidate self-service: profile edit, invitation response, work l…
BAWES 7bbe431
Add bank fields, skills/experience CRUD, and status columns to candid…
BAWES 348d066
Enhance candidate profile readiness with 14 granular field checks
BAWES 7a5a183
Add form styles and fix build: WorkTabs module name, Prisma transacti…
BAWES 5e5ed0b
Normalize import paths in candidate form components
BAWES 78bf011
Fix CodeRabbit review: import aliases, upload validation hardening
BAWES File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| import { requireRoleCapability } from "@/modules/auth/session"; | ||
| import { CandidateEditForm } from "@/modules/candidates/CandidateEditForm"; | ||
| import { getCountryOptions, getUniversityOptions, getBankOptions } from "@/modules/candidates/actions"; | ||
| import { getCandidateDetail } from "@/modules/workspace/data"; | ||
| import { WorkspaceShell } from "@/modules/workspace/WorkspaceShell"; | ||
|
|
||
| export const dynamic = "force-dynamic"; | ||
|
|
||
| export default async function CandidateEditPage() { | ||
| const session = await requireRoleCapability("candidate", "candidate.read.own"); | ||
| const [data, countries, universities, banks] = await Promise.all([ | ||
| getCandidateDetail(Number(session.id), "/candidate/invitations"), | ||
| getCountryOptions(), | ||
| getUniversityOptions(), | ||
| getBankOptions(), | ||
| ]); | ||
| const c = data.candidate; | ||
|
|
||
| return ( | ||
| <WorkspaceShell | ||
| session={session} | ||
| eyebrow="Edit Profile" | ||
| title="Update your candidate profile" | ||
| metrics={data.metrics} | ||
| > | ||
| <CandidateEditForm | ||
| candidate={{ | ||
| name: c?.candidate_name ?? "", | ||
| nameAr: c?.candidate_name_ar ?? "", | ||
| email: c?.candidate_email ?? "", | ||
| phone: c?.candidate_phone ?? "", | ||
| objective: c?.candidate_objective ?? "", | ||
| intro: c?.candidate_intro ?? "", | ||
| civilId: c?.candidate_civil_id ?? "", | ||
| profileUrl: c?.profile_url ?? "", | ||
| birthDate: c?.candidate_birth_date | ||
| ? new Date(c.candidate_birth_date).toISOString().slice(0, 10) | ||
| : "", | ||
| address: c?.candidate_address_line1 ?? "", | ||
| countryId: c?.country_id ?? null, | ||
| universityId: c?.university_id ?? null, | ||
| bankId: c?.bank_id ?? null, | ||
| bankAccountName: c?.bank_account_name ?? "", | ||
| iban: c?.candidate_iban ?? "", | ||
| personalPhoto: c?.candidate_personal_photo ?? null, | ||
| resume: c?.candidate_resume ?? null, | ||
| video: c?.candidate_video ?? null, | ||
| civilPhotoFront: c?.candidate_civil_photo_front ?? null, | ||
| civilPhotoBack: c?.candidate_civil_photo_back ?? null, | ||
| }} | ||
| countries={countries} | ||
| universities={universities} | ||
| banks={banks} | ||
| skills={data.skills.map((s) => ({ id: Number(s.id), title: s.title }))} | ||
| experiences={data.experiences.map((e) => ({ | ||
| id: Number(e.id), | ||
| title: e.title, | ||
| subtitle: e.subtitle, | ||
| }))} | ||
| /> | ||
| </WorkspaceShell> | ||
| ); | ||
| } | ||
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| import { requireRoleCapability } from "@/modules/auth/session"; | ||
| import { DataTable } from "@/modules/workspace/DataTable"; | ||
| import { WorkspaceShell } from "@/modules/workspace/WorkspaceShell"; | ||
| import { getCandidateTransferRows } from "@/modules/workspace/data"; | ||
|
|
||
| export const dynamic = "force-dynamic"; | ||
|
|
||
| export default async function CandidatePaymentsPage() { | ||
| const session = await requireRoleCapability("candidate", "candidate.read.own"); | ||
| const rows = await getCandidateTransferRows(Number(session.id)); | ||
|
|
||
| return ( | ||
| <WorkspaceShell session={session} eyebrow="Candidate" title="Payment History" metrics={[]}> | ||
| <DataTable | ||
| title="Transfer & Payment History" | ||
| description="Payout rows linked to your candidate account. Paid status, amounts, and payment dates are from the imported production data." | ||
| rows={rows} | ||
| columns={[ | ||
| { key: "company", label: "Company / Store", render: (row) => <strong>{row.company}</strong> }, | ||
| { key: "period", label: "Period", render: (row) => row.period }, | ||
| { key: "hours", label: "Hours", render: (row) => row.hours }, | ||
| { key: "candidateTotal", label: "Your Total", render: (row) => row.candidateTotal }, | ||
| { key: "companyTotal", label: "Company Total", render: (row) => row.companyTotal }, | ||
| { key: "cost", label: "Transfer Cost", render: (row) => row.cost }, | ||
| { key: "paid", label: "Paid", render: (row) => row.paid }, | ||
| { key: "paymentDate", label: "Payment Date", render: (row) => row.paymentDate }, | ||
| { key: "updated", label: "Updated", render: (row) => row.updated }, | ||
| ]} | ||
| /> | ||
| </WorkspaceShell> | ||
| ); | ||
| } |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.