Add full-page student intake form matching Bayside paper forms

- Migration: student intake fields (health, academic, dismissal, agreement),
  student_guardians + student_curriculum_logins tables, extend authorized_pickups
  (alt_phone, notes, kind) with RLS mirroring existing policies
- New /students/new full-page multi-section form (replaces the add dialog)
- Students list links to the full page; regenerate Supabase types

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-18 22:21:38 -04:00
co-authored by Claude Opus 4.8
parent f509fa6528
commit cee27a6189
5 changed files with 663 additions and 58 deletions
+194
View File
@@ -12,6 +12,31 @@ export type Database = {
__InternalSupabase: {
PostgrestVersion: "14.5"
}
graphql_public: {
Tables: {
[_ in never]: never
}
Views: {
[_ in never]: never
}
Functions: {
graphql: {
Args: {
extensions?: Json
operationName?: string
query?: string
variables?: Json
}
Returns: Json
}
}
Enums: {
[_ in never]: never
}
CompositeTypes: {
[_ in never]: never
}
}
public: {
Tables: {
attendance: {
@@ -54,27 +79,39 @@ export type Database = {
}
authorized_pickups: {
Row: {
alt_phone: string | null
created_at: string
id: string
kind: string
name: string
notes: string | null
phone: string | null
relationship: string | null
sort_order: number
student_id: string
}
Insert: {
alt_phone?: string | null
created_at?: string
id?: string
kind?: string
name: string
notes?: string | null
phone?: string | null
relationship?: string | null
sort_order?: number
student_id: string
}
Update: {
alt_phone?: string | null
created_at?: string
id?: string
kind?: string
name?: string
notes?: string | null
phone?: string | null
relationship?: string | null
sort_order?: number
student_id?: string
}
Relationships: [
@@ -415,41 +452,195 @@ export type Database = {
}
Relationships: []
}
student_curriculum_logins: {
Row: {
created_at: string
id: string
parent_account: string | null
parent_password: string | null
student_id: string
student_login: string | null
student_password: string | null
website: string | null
}
Insert: {
created_at?: string
id?: string
parent_account?: string | null
parent_password?: string | null
student_id: string
student_login?: string | null
student_password?: string | null
website?: string | null
}
Update: {
created_at?: string
id?: string
parent_account?: string | null
parent_password?: string | null
student_id?: string
student_login?: string | null
student_password?: string | null
website?: string | null
}
Relationships: [
{
foreignKeyName: "student_curriculum_logins_student_id_fkey"
columns: ["student_id"]
isOneToOne: false
referencedRelation: "students"
referencedColumns: ["id"]
},
]
}
student_guardians: {
Row: {
address: string | null
city: string | null
created_at: string
email: string | null
employer: string | null
full_name: string
id: string
is_primary: boolean
phone: string | null
relationship: string | null
state: string | null
student_id: string
zip: string | null
}
Insert: {
address?: string | null
city?: string | null
created_at?: string
email?: string | null
employer?: string | null
full_name: string
id?: string
is_primary?: boolean
phone?: string | null
relationship?: string | null
state?: string | null
student_id: string
zip?: string | null
}
Update: {
address?: string | null
city?: string | null
created_at?: string
email?: string | null
employer?: string | null
full_name?: string
id?: string
is_primary?: boolean
phone?: string | null
relationship?: string | null
state?: string | null
student_id?: string
zip?: string | null
}
Relationships: [
{
foreignKeyName: "student_guardians_student_id_fkey"
columns: ["student_id"]
isOneToOne: false
referencedRelation: "students"
referencedColumns: ["id"]
},
]
}
students: {
Row: {
agreement_signed_by: string | null
agreement_signed_date: string | null
allergies: string | null
backup_transport_plan: string | null
chronic_conditions: string | null
class_id: string | null
created_at: string
custody_agreement: string | null
disciplinary_history: string | null
dismissal_methods: string[]
dismissal_other: string | null
dob: string | null
first_name: string
gender: string | null
grade_level: string | null
home_ed_eval_due: string | null
id: string
interests: string | null
last_name: string
notes: string | null
other_info: string | null
photo_release: boolean
physician_phone: string | null
portfolio_keeper: string | null
preferred_start_date: string | null
previous_schools: string | null
primary_physician: string | null
special_needs: string | null
updated_at: string
}
Insert: {
agreement_signed_by?: string | null
agreement_signed_date?: string | null
allergies?: string | null
backup_transport_plan?: string | null
chronic_conditions?: string | null
class_id?: string | null
created_at?: string
custody_agreement?: string | null
disciplinary_history?: string | null
dismissal_methods?: string[]
dismissal_other?: string | null
dob?: string | null
first_name: string
gender?: string | null
grade_level?: string | null
home_ed_eval_due?: string | null
id?: string
interests?: string | null
last_name: string
notes?: string | null
other_info?: string | null
photo_release?: boolean
physician_phone?: string | null
portfolio_keeper?: string | null
preferred_start_date?: string | null
previous_schools?: string | null
primary_physician?: string | null
special_needs?: string | null
updated_at?: string
}
Update: {
agreement_signed_by?: string | null
agreement_signed_date?: string | null
allergies?: string | null
backup_transport_plan?: string | null
chronic_conditions?: string | null
class_id?: string | null
created_at?: string
custody_agreement?: string | null
disciplinary_history?: string | null
dismissal_methods?: string[]
dismissal_other?: string | null
dob?: string | null
first_name?: string
gender?: string | null
grade_level?: string | null
home_ed_eval_due?: string | null
id?: string
interests?: string | null
last_name?: string
notes?: string | null
other_info?: string | null
photo_release?: boolean
physician_phone?: string | null
portfolio_keeper?: string | null
preferred_start_date?: string | null
previous_schools?: string | null
primary_physician?: string | null
special_needs?: string | null
updated_at?: string
}
Relationships: [
@@ -659,6 +850,9 @@ export type CompositeTypes<
: never
export const Constants = {
graphql_public: {
Enums: {},
},
public: {
Enums: {
app_role: ["admin", "teacher", "parent"],