diff --git a/apps/web/src/components/GraduationPlans.jsx b/apps/web/src/components/GraduationPlans.jsx index 9deb47d..bae478e 100644 --- a/apps/web/src/components/GraduationPlans.jsx +++ b/apps/web/src/components/GraduationPlans.jsx @@ -5,6 +5,8 @@ import { StudentIdentity } from "./CoordinatorRecords.jsx"; import OfferingCourseIcon from "./OfferingCourseIcon.jsx"; import PaperTossButton, { waitForPaperToss } from "./PaperTossButton.jsx"; +const seasonList = new Intl.ListFormat("en", { type: "conjunction" }); + function assignmentsFor(plan) { return Object.fromEntries((plan?.termPlans ?? []).flatMap(({ term, courses }) => courses.map((course) => [course, term]))); @@ -145,6 +147,7 @@ export default function GraduationPlans({ student, token, onBack, backLabel }) { exam.course === currentExamCourse?._id && ["pending", "approved"].includes(exam.status)); const canRequestExam = currentExamCourse && !examEligibility.message && !examAlreadyRequested; const readOnly = Boolean(plan && plan.status !== "draft"); + const { count: electiveCount, hours: electiveHours } = workspace?.electiveRequirement ?? {}; const visibleCourses = courses.filter((course) => `${course.code} ${course.name}`.toLowerCase().includes(courseSearch.trim().toLowerCase())); return
@@ -190,10 +193,12 @@ export default function GraduationPlans({ student, token, onBack, backLabel }) { } {editing &&
-

{readOnly ? "Saved plan" : plan ? "Edit private draft" : "New plan"}

+
+

{readOnly ? "Saved plan" : plan ? "Edit private draft" : "New plan"}

+ {!readOnly &&

This draft stays private until you submit it to the coordinator.

} +
- {!readOnly &&

This plan is private until you submit it for coordinator review.

} {plan?.responseNote &&

Coordinator response: {plan.responseNote}

} {readOnly ? ( <> @@ -204,10 +209,15 @@ export default function GraduationPlans({ student, token, onBack, backLabel }) { {plan.exitExamRequest &&

This plan uses an approved exit exam.

} ) : <> -

Choose at least {workspace.electiveRequirement.count} remaining electives totalling {workspace.electiveRequirement.hours} credit hours.

- {workspace.missingSeasons.length > 0 &&

- Upcoming terms still to be configured: {workspace.missingSeasons.join(", ")}. -

} +
+

+ Choose at least {electiveCount} remaining {electiveCount === 1 ? "elective" : "electives"} + {" "}for a minimum of {electiveHours} credit {electiveHours === 1 ? "hour" : "hours"}. +

+ {workspace.missingSeasons.length > 0 &&

+ Term setup is pending for {seasonList.format(workspace.missingSeasons.map((season) => termLabel({ season })))}. +

} +
{terms.length > 0 &&
{terms.map((term) => { diff --git a/apps/web/src/portal-academic.css b/apps/web/src/portal-academic.css index fe622e1..16bfea4 100644 --- a/apps/web/src/portal-academic.css +++ b/apps/web/src/portal-academic.css @@ -126,8 +126,8 @@ letter-spacing: normal; } .academic-services-embedded table td { padding: 18px 14px; border-bottom: 1px solid var(--line); } -.academic-services-embedded table:not(.catalogue-table) :is(th, td):first-child { padding-inline-start: 0; } -.academic-services-embedded table:not(.catalogue-table) :is(th, td):last-child { padding-inline-end: 0; } +.academic-services-embedded table:not(.catalogue-table):not(:where(.terms-table > table, .offering-register > table)) :is(th, td):first-child { padding-inline-start: 0; } +.academic-services-embedded table:not(.catalogue-table):not(:where(.terms-table > table, .offering-register > table)) :is(th, td):last-child { padding-inline-end: 0; } .academic-services-embedded table td strong { font-weight: 500; } .academic-services-embedded tbody tr:hover { background: transparent; } .academic-services-embedded :is(.primary-button, .outline-button) { @@ -1302,6 +1302,16 @@ .review-decision .graduation-response p, .graduation-planner-page .planner-exams p { margin:0; } .planner-sections { display:grid; gap:28px; min-width:0; } .planner-sections > section { min-width:0; } +.planner-editor-heading, .planner-editor-requirements { display:grid; gap:5px; } +.planner-editor-requirements { + margin-block-end:16px; + padding:10px 12px; + border-inline-start:2px solid var(--line); + background:color-mix(in srgb,var(--raised) 45%, transparent); + font-size:14px; + line-height:1.5; +} +.planner-editor-requirements p { margin:0; } .academic-services-embedded .graduation-planner-page .table-scroll > table :is(th, td):first-child { padding-inline-start: clamp(12px, 2vw, 16px); } diff --git a/tests/browser/portal.spec.mjs b/tests/browser/portal.spec.mjs index cf32b9a..ce47fe0 100644 --- a/tests/browser/portal.spec.mjs +++ b/tests/browser/portal.spec.mjs @@ -230,7 +230,7 @@ test("Req 6–10: student directory finds the matching profile and changes the a await page.route(url => url.pathname === "/api/admin/students" && url.searchParams.get("search") === "invalid response", route => route.fulfill({ contentType: "application/json", body: "null" })); await search.fill("invalid response"); - await expect(page.getByRole("alert")).toContainText("The student directory could not load."); + await expect(page.getByRole("main").getByRole("alert")).toContainText("The student directory could not load."); await search.fill("28-90001"); await search.press("Enter"); await student.click();
TermAssigned hoursCredit limit