fix: admin role change, logo access, magic link validation, login help

- Add updateTeamMemberRole mutation for admins to change team member roles
- Allow any team member (not just lead) to change project logo
- Add visible "Add logo"/"Change" label under logo for discoverability
- Pre-check email existence before sending magic link (show error)
- Add "forgot which email" contact link on login page

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-05 16:37:45 +01:00
parent 67670472f7
commit 6b6f5e33f5
6 changed files with 159 additions and 46 deletions

View File

@@ -124,17 +124,17 @@ export default function ApplicantDashboardPage() {
{/* Header */}
<div className="flex items-start justify-between flex-wrap gap-4">
<div className="flex items-center gap-4">
{/* Project logo — clickable for team leads to change */}
{project.isTeamLead ? (
<ProjectLogoUpload
projectId={project.id}
currentLogoUrl={data.logoUrl}
onUploadComplete={() => utils.applicant.getMyDashboard.invalidate()}
{/* Project logo — clickable for any team member to change */}
<ProjectLogoUpload
projectId={project.id}
currentLogoUrl={data.logoUrl}
onUploadComplete={() => utils.applicant.getMyDashboard.invalidate()}
>
<button
type="button"
className="group relative shrink-0 flex flex-col items-center gap-1 cursor-pointer"
>
<button
type="button"
className="group relative shrink-0 h-14 w-14 rounded-xl border bg-muted/50 flex items-center justify-center overflow-hidden cursor-pointer hover:ring-2 hover:ring-primary/30 transition-all"
>
<div className="relative h-14 w-14 rounded-xl border bg-muted/50 flex items-center justify-center overflow-hidden hover:ring-2 hover:ring-primary/30 transition-all">
{data.logoUrl ? (
<img src={data.logoUrl} alt={project.title} className="h-full w-full object-cover" />
) : (
@@ -143,17 +143,12 @@ export default function ApplicantDashboardPage() {
<div className="absolute inset-0 bg-black/0 group-hover:bg-black/40 transition-colors flex items-center justify-center">
<Pencil className="h-4 w-4 text-white opacity-0 group-hover:opacity-100 transition-opacity" />
</div>
</button>
</ProjectLogoUpload>
) : (
<div className="shrink-0 h-14 w-14 rounded-xl border bg-muted/50 flex items-center justify-center overflow-hidden">
{data.logoUrl ? (
<img src={data.logoUrl} alt={project.title} className="h-full w-full object-cover" />
) : (
<FileText className="h-7 w-7 text-muted-foreground/60" />
)}
</div>
)}
</div>
<span className="text-[10px] text-primary/70 group-hover:text-primary transition-colors">
{data.logoUrl ? 'Change' : 'Add logo'}
</span>
</button>
</ProjectLogoUpload>
<div>
<div className="flex items-center gap-3">
<h1 className="text-2xl font-semibold tracking-tight">{project.title}</h1>