Manage Majors
| Major Name | Faculty | Status | Learners | Actions |
|---|---|---|---|---|
| Civil Construction | Construction | Inactive | 0 | |
| Electrical Technology | Engineering | Active | 18 | |
| Business Administration | Information Technology | Active | 7 | |
| Computer Engineering | Information Technology | Active | 42 | |
| Automotive Mechanics | Mechanical Engineering | Active | 0 |
Screen Flow (from UC-IDP.29 flow.puml):
📝 Spec notes — UC-IDP.29 / SCR-IDP.71 + embedded SCR-IDP.72, SCR-IDP.73 (fields, actions, requirements)
- Screen: SCR-IDP.71 — Major List (entry page)
- Use case: UC-IDP.29 — Manage Majors
- Also embedded: SCR-IDP.72 — Major Form (dialog), SCR-IDP.73 — Delete Major Confirmation (dialog)
Page listing all academic majors globally across all faculties. Super Administrator accesses this from the Global Admin navigation group — no Working Institute scoping; all majors from every faculty are visible. Results sorted by Faculty name (A–Z) then Major name (A–Z). A name search field, Faculty filter dropdown, and Status filter appear at top. Delete is disabled when learner_count > 0.
filter_name"Search by name" — text · not persisted · always · read-write · default: "" · Filter Controlsfilter_faculty"Faculty" — enum [All, <Faculty names A–Z>] · not persisted · always · read-write · default: All · Filter Controlsfilter_status"Status" — enum [All, Active, Inactive] · not persisted · always · read-write · default: All · Filter Controlsname"Major Name" — text · Major.name · always · read-only · Majors Tablefaculty"Faculty" — text · Faculty.name · always · read-only · Majors Tablestatus"Status" — enum [Active, Inactive] · Major.status · always · read-only · Majors Tablelearner_count"Learners" — number · computed (global count of InstituteLearner records referencing this major) · always · read-only · fallback: 0 · determines Delete enabled state · Majors Table
add_major"Add Major" — enabled always · triggers UC-IDP.29-A-1A-1 · opens modal-major-form (add mode)edit_major"Edit" — enabled always · triggers UC-IDP.29-A-1B-1 · opens modal-major-form (edit mode, pre-filled Faculty/name/status)delete_major"Delete" — enabled when learner_count == 0; disabled + tooltip "Cannot delete — this major is assigned to one or more students" when learner_count > 0 · triggers UC-IDP.29-A-1C-1search_filter"Search" — enabled always · triggers UC-IDP.29-M-2 · applies all three filters simultaneously (main flow — default list interaction, not an alternative flow)clear_filter"Clear" — enabled always · triggers UC-IDP.29-M-2 · resets filter_name, filter_faculty to "All", filter_status to "All", then re-applies
- Delete button must be visually disabled (greyed out, non-clickable) for any Major with learner_count > 0. Tooltip: "Cannot delete — this major is assigned to one or more students." [refs: —]
- Majors Table sorted by Faculty name (A–Z) as primary key, then by Major name (A–Z) as secondary key. Default, non-user-changeable. [refs: —]
- Empty state (no majors globally): "No majors defined yet — click Add Major to get started." Filter no results: "No results found — try adjusting your search or filter." [refs: —]
- Search applies all three filters simultaneously. Clear resets filter_name, filter_faculty, and filter_status then re-applies automatically. [refs: —]
↳ Embedded dialog: SCR-IDP.72 — Major Form
Dialog for adding a new major or editing an existing one. Add mode: Faculty empty, name empty, Status defaults to Active, title "Add Major". Edit mode: Faculty/name/Status pre-filled with current values, title "Edit Major". Save validates that faculty is selected, name is non-empty (max 100 chars), and name is unique within the selected faculty (case-insensitive). In edit mode, the major's own current name is excluded from the duplicate check.
faculty_id"Faculty" — enum [all Faculty names A–Z] · Major.faculty_id (FK → Faculty.id) · required · validation: not_blank · default: param.faculty_id (fallback "") · always · read-write · Form regionname"Major Name" — text · Major.name · required · max 100 chars · validation: not_blank, max_length:100, unique_per_faculty_case_insensitive · default: param.name (fallback "") · always · read-write · Form regionstatus"Status" — enum [Active, Inactive] · Major.status · required · validation: one_of [Active, Inactive] · default: param.status (fallback Active) · always · read-write · Form region
save"Save" — enabled when required_fields_valid · triggers UC-IDP.29-A-1A-4 (add) / UC-IDP.29-A-1B-4 (edit)cancel"Cancel" — enabled always · closes dialog without changes
- Name uniqueness checked within the selected faculty (case-insensitive). In edit mode, the major's own current name under the same faculty is excluded from the check. On duplicate: inline error below name field: "A major with this name already exists under the selected faculty." Save disabled until corrected. [refs: —]
- Edit mode: title "Edit Major", all three fields (Faculty, name, Status) pre-filled. Add mode: title "Add Major", Faculty unselected, name empty, Status defaults to Active. [refs: —]
↳ Embedded dialog: SCR-IDP.73 — Delete Major Confirmation
Confirmation dialog shown when Super Administrator clicks Delete on a major row (only reachable when learner_count == 0). Displays the major name and faculty with a warning. Delete confirms and closes; Cancel closes without changes. An audit log entry is created on successful deletion.
major_name"Major Name" — text · Major.name · read-only · always · displayed inline in confirmation message · Confirmation Message regionfaculty"Faculty" — text · Faculty.name · read-only · always · displayed below major name · Confirmation Message region
confirm_delete"Delete" — enabled always · triggers UC-IDP.29-A-1C-4 · deletes Major record, closes dialog, refreshes listcancel"Cancel" — enabled always · triggers UC-IDP.29-A-1C.3A-1 · closes dialog without changes
- Confirmation message must display the major name and faculty prominently. Suggested wording: "Delete major «[major_name]»? Faculty: [faculty]. This action cannot be undone." [refs: —]