Import Preview
| # | First Name | Last Name | Student ID | Faculty | Major | Mobile | Date of Birth | Gender | Institution | |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Somchai | Vongkhamphanh | STU2026001 | Engineering | Electrical Engineering | somchai.v@example.com | +856 20 1234 5678 | 2000-05-15 | M | Vientiane Technical Institute |
| 2 | Bouakham | Phasouk | STU2026002 | Business | Accounting | bouakham.p@example.com | — | 1998-11-20 | F | Vientiane Technical Institute |
| 3 | Viengkham | Saysombath | STU2026003 | Engineering | Construction Technology | viengkham.s@example.com | +856 20 9876 5432 | — | O | Vientiane Technical Institute |
| … 47 more rows | ||||||||||
Screen Flow (from uc-idp-06-bulk-import-learners.flow.puml):
📝 Spec notes — UC-IDP.06 / SCR-IDP.20 (fields, actions, requirements)
- Screen: SCR-IDP.20 — Import Preview
- Use case: UC-IDP.06 — Bulk Import Learners
Import preview page showing the validation results of the Excel file uploaded from SCR-IDP.19, before the import is confirmed. Two states: (1) All rows passed — shows a validation summary (passed status + row count) and a preview table of all learner records to be imported (columns: First Name, Last Name, Student ID, Faculty, Major, Email, Mobile, Date of Birth, Gender, Institution); Faculty and Major values are resolved from the names in the file; institution auto-assigned from the PA's institution; "Confirm Import [N] Learners" button enabled. (2) Errors found — shows a validation summary (failed status + error count) and an error list grouped by row and column; the confirm button is disabled; Download Error Report and Upload Again buttons are shown.
- Validation passed (main flow): Learner Preview region visible; Error List hidden; Confirm Import enabled
- Validation failed (AF-3A): Error List region visible; Learner Preview hidden; Confirm Import disabled; Download Error Report + Upload Again visible
file_name"File Name" — text · Validation Summary · session.uploaded_file_name · always · read-onlytotal_rows"Total Rows" — number · Validation Summary · computed · always · read-onlyvalidation_status"Validation Status" — enum (passed/failed) · Validation Summary · computed · always · read-onlyerror_count"Error Count" — number · Validation Summary · computed · visible when validation_status == failed · read-onlycol_preview_no"#" — number · Learner Preview · computed · visible when passed · read-onlycol_preview_firstname"First Name" — text · Learner Preview · computed · visible when passed · read-onlycol_preview_lastname"Last Name" — text · Learner Preview · computed · visible when passed · read-onlycol_preview_email"Email" — text · Learner Preview · computed · visible when passed · read-onlycol_preview_student_id"Student ID" — text · Learner Preview · computed (fallback: "—") · visible when passed · read-onlycol_preview_mobile"Mobile" — text · Learner Preview · computed (fallback: "—") · visible when passed · read-onlycol_preview_date_of_birth"Date of Birth" — text · Learner Preview · computed (fallback: "—") · visible when passed · read-onlycol_preview_gender"Gender" — enum (M/F/O/—) · Learner Preview · computed · visible when passed · read-onlycol_preview_institution"Institution" — text · Learner Preview · session.pa_institution_name (fallback: "") · visible when passed · read-only · auto-assigned from PA's institution; same value for all rowscol_preview_faculty"Faculty" — text · Learner Preview · computed (resolved from faculty name in file) · visible when passed · read-onlycol_preview_major"Major" — text · Learner Preview · computed (resolved from major name in file; must be Active, under the given faculty) · visible when passed · read-onlycol_error_no"#" — number · Error List · computed · visible when validation_status == failed · read-onlycol_error_row"Row" — number · Error List · computed · visible when failed · read-onlycol_error_column"Column" — text · Error List · computed · visible when failed · read-onlycol_error_type"Error Type" — text · Error List · computed · visible when failed · read-only
confirm_import"Confirm Import [N] Learners" — enabled when validation_status == passed · triggers UC-IDP.06-M-4 · label shows N = total_rowsdownload_error_report"Download Error Report (.xlsx)" — enabled when validation_status == failed · triggers UC-IDP.06-A-3A-2upload_again"Upload Again" — enabled when validation_status == failed · triggers UC-IDP.06-A-3A-2cancel"Cancel" — enabled always · triggers UC-IDP.06-A-4A-1
- All-or-nothing validation: if any row fails, the entire file is rejected — no partial import; confirm_import disabled immediately when validation_status == failed [refs: SS-IDP.11]
- Institution for all learner rows auto-assigned from PA's institution — col_preview_institution shows same value for all rows; no institution column in Excel file [refs: SS-IDP.11]
- confirm_import button label shows actual import count (total_rows), e.g. "Confirm Import 50 Learners" — N value from computed total_rows
- total_rows = number of data rows in the uploaded Excel file after the header row; completely empty rows (all cells blank) excluded from the count
- error_count = number of rows failing one or more validation rules defined in SS-IDP.11; each failing row counted once regardless of how many errors it contains [refs: SS-IDP.11]
- validation_status derived from error_count: "passed" when error_count == 0; "failed" when error_count >= 1 — drives visibility of Learner Preview region (passed) and Error List region (failed)