feat: admin Visas tab — table + edit dialog + visibility toggle

Activates the previously-disabled Visas tab on /admin/logistics.

VisasTab renders a flat table joined per attendee per project, sorted
by status priority. Status filter pills mirror the Confirmations tab.
The header carries a "Visible to teams" Switch backed by a new
logistics.getVisaVisibility query and the existing setVisaVisibility
mutation; toggling it controls whether members see their own status.

VisaEditDialog is a per-row editor with a status dropdown,
nationality input, three native date inputs (invitation / appointment
/ decision), and a notes textarea. No file uploads — the platform
deliberately holds zero document artifacts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Matt
2026-04-28 19:37:55 +02:00
parent 7c86e42413
commit fe630e0e2d
5 changed files with 506 additions and 3 deletions

View File

@@ -316,6 +316,17 @@ export const logisticsRouter = router({
return updated
}),
/** Read Program.visaStatusVisibleToMembers — drives the admin Visas tab toggle. */
getVisaVisibility: adminProcedure
.input(z.object({ programId: z.string() }))
.query(async ({ ctx, input }) => {
const program = await ctx.prisma.program.findUniqueOrThrow({
where: { id: input.programId },
select: { visaStatusVisibleToMembers: true },
})
return { visible: program.visaStatusVisibleToMembers }
}),
/**
* Flip Program.visaStatusVisibleToMembers. Controls whether the team can
* see their own visa status on the applicant dashboard.