Skip to content

enhance: update combobox label in 'reporting' page#241

Merged
superb-sushi merged 1 commit into
mainfrom
enhance/teacher-dropdown-subjects
May 21, 2026
Merged

enhance: update combobox label in 'reporting' page#241
superb-sushi merged 1 commit into
mainfrom
enhance/teacher-dropdown-subjects

Conversation

@superb-sushi
Copy link
Copy Markdown
Collaborator

@superb-sushi superb-sushi commented May 21, 2026

Description

This PR enhances the user experience on the public absence reporting page by enriching the Combobox dropdown choices. It adds contextual subject descriptions alongside teacher names, making it easier for teachers to identify themselves should there be other teachers with identical or similar names.

Key Changes

  1. Data Fetching: Updated the Prisma query on the server side (page.tsx) to pull the subjects relation/field for the dropdown data set.
  2. UI Label Enrichment: Adjusted the frontend Combobox mapping options to concatenate the teacher's full name with their respective assigned subjects, matching the specification: TeacherFullName (Subject 1, Subject 2, ...).
  3. Data Integrity Maintained: Verified that this is purely a visual enhancement. The Combobox option value attribute continues to map directly to the clean database primary key ID (teacher.id).

Manual Verification Steps

  1. Navigate to /demo/reporting as an unauthenticated visitor.
  2. Click on the Your name dropdown.
  3. Observe that teachers are now listed with their subjects appended within parentheses.
  4. Select a teacher, fill in all other relevant information, and submit the form.
  5. Observe that the form submits successfully.

Fixes #232

- update database query to include subjects each teacher teaches
- update label to follow the format 'TeacherFullName (Subject 1, Subject 2,...)
@vercel
Copy link
Copy Markdown

vercel Bot commented May 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
relief-teacher-planning Ready Ready Preview, Comment May 21, 2026 3:40am

@superb-sushi superb-sushi merged commit 0362384 into main May 21, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

enhance: making teacher name options on absence reporting page distinguishable

1 participant