Skip to main content

Students Page

Route: /dashboard/students
File: app/dashboard/students/page.tsx

This page manages the school's student records. Students created here can be enrolled into classes and assigned to subjects.

Features

Student List

A searchable table displaying all students:

ColumnDescription
NameFirst and last name
GenderBadge showing gender
Date of BirthFormatted date
StatusActive/Inactive badge
ActionsEdit button

A text input with 300ms debounce that searches by first or last name. The search is performed server-side via the search query parameter.

Create Student

A dialog form with:

FieldRequiredDescription
First NameYes
Last NameYes
GenderYesSelect dropdown
Date of BirthNoDate input
Enrollment DateNoDate input

Edit Student

Same form pre-filled with existing data, plus an Active toggle to enable/disable the student.

API Calls

ActionEndpoint
List/SearchGET /api/students?search=<query>
CreatePOST /api/students
UpdatePATCH /api/students/:id