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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user