From a0973cff66a2a1a67a19a88b58ce120a633985fb Mon Sep 17 00:00:00 2001 From: Maximilian Stubhan Date: Mon, 27 Jul 2026 11:46:40 +0200 Subject: [PATCH] Show the absence type in the employee list again The three pending migrations have been applied, so absence_type exists and the workaround that kept it out of this select can go. The status chip in the list shows the specific kind again ("Bildungskarenz" rather than the generic "Langzeitabwesenheit"), matching the detail page. Verified against the database rather than by typecheck: employee_assignments holds 809 rows for 809 employees with exactly one open interval each, is_valid_svnr() agrees with the TypeScript implementation on all nine documented cases, and the list, org-chart and detail queries all return rows. --- app/(app)/employees/page.tsx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/(app)/employees/page.tsx b/app/(app)/employees/page.tsx index 98a8f8c..7051d7e 100644 --- a/app/(app)/employees/page.tsx +++ b/app/(app)/employees/page.tsx @@ -41,12 +41,7 @@ export default async function EmployeesPage({ searchParams }: EmployeesPageProps let query = supabase .from("employees") .select( - // absence_type is deliberately absent here until - // 20260726120000_absence_type.sql has been applied: PostgREST rejects - // the *whole* query for one unknown column, which turned the entire - // list blank rather than just dropping a chip label. The detail page - // selects "*" and shows the specific kind once the column exists. - "id, first_name, last_name, personnel_number, job_title, team_id, division_id, location_id, entry_date, employment_type, weekly_hours, status", + "id, first_name, last_name, personnel_number, job_title, team_id, division_id, location_id, entry_date, employment_type, weekly_hours, status, absence_type", { count: "exact" } ) .order("last_name", { ascending: true }) @@ -135,7 +130,7 @@ export default async function EmployeesPage({ searchParams }: EmployeesPageProps {e.employment_type} ยท {e.weekly_hours}h - + );