Projects (Parent View)
The parent app's Projects page is the parent-side window into the same homework system documented in Homework. Same underlying assignments, different framing: read-only, parent-app-specific UI, and a status mapping that adds In Progress, Completed, and Overdue on top of the core teacher-side states.
At a glance
| Who can do this | Parents view (read-only) |
| Where it lives | Parent app /projects (header label: "Homework") |
| Underlying system | Same student-assignments backing the Homework flow |
| Triggers notifications? | Yes — parent gets a push on assign and again on review (handled by Homework, not by this page) |
| Related features | Homework · Notifications |
How it flows
Status lifecycle
The parent's projects list uses a slightly wider status set than the teacher-facing homework lifecycle. Mapping:
The parent UI badges:
| Status | Badge styling |
|---|---|
Assigned | Neutral secondary |
InProgress | Muted (rendered as "In Progress") |
Submitted | Primary tint |
Completed | Primary tint (with score progress bar) |
Overdue | Destructive / red tint |
Note: this view does not surface a separate Reviewed → Graded step the way the canonical Homework page implies — Completed is the terminal state once a score lands.
Step-by-step
1. Parent opens Projects
- App / route: Parent app →
/projects. The on-screenPageHeaderreads "Homework" (with the child's name as subtitle). The route name "projects" is preserved for legacy reasons but the label users see is Homework. - The page resolves the active child:
- Prefer
location.state.studentProfileId(set when navigating from the home dashboard or a notification). - Fallback: the first linked student in the parent's profile.
- Prefer
2. Stats summary
- A single rounded card at the top of the list shows three columns:
- Total — count of all assignments returned.
- Pending — total minus completed/submitted.
- Completed — assignments with status
CompletedorSubmitted.
3. Assignment cards
- Each card shows:
- Subject badge (primary tint).
- Difficulty badge —
Easy/Medium/Hard(Easy = primary, Medium = muted, Hard = destructive). - Title (bold).
- Description (line-clamped to two lines).
- Due date (
Due: D MMM YYYY). - Status badge (see mapping above).
- If
Completedand a score is set, a score progress bar:- Coloured by score percentage (chart-5 ≥ 70%, chart-4 ≥ 50%, destructive otherwise).
- Shows
score/totalMarksto the right.
- Cards are wrapped in
motion.divwith a tap-scale, but tapping currently does not navigate to a detail page — there is no parent-side submission detail surface.
4. Empty / error states
- No linked student: header without subtitle; loading spinner times out then nothing rendered (parent likely not yet linked to a child).
- No assignments: empty state — folder icon + "No homework yet" + "Homework and assignments will appear here once they are assigned."
- API error: error icon + "Failed to load projects. Please try again." with a Retry button (full page reload).
What's distinct from the Homework page
This page is intentionally a slim re-skin. The differences worth knowing:
- Read-only: no submit, no edit, no comment, no attachment download flow on this page.
- Different status set: adds
InProgress,Completed,Overduebadges on top ofAssigned/Submitted. - Header label: shows "Homework" even though the route is
/projectsand the docs/sidebar refer to it as "Projects" — that's the legacy reframe. - Single-child scope: one child at a time; the parent must switch the active child elsewhere (typically from the home page) to see another child's list.
- Stats card: an aggregate counter not present on the student or teacher side.
Edge cases & things to test
- Parent with no linked students: page should show an empty / "no child linked" state, not a perpetual spinner.
- Multi-child parent: switching the active child (via home page) should refetch
/student-assignments/parent/:newIdand replace the list — no leakage from the previous child. - Status drift: teacher reviews after the parent's last visit — on next open, status should flip from
Submitted→Completedand the score bar should appear. - Long titles / descriptions: 200-char title, 1000-char description — title should not wrap into the badges; description should clip to two lines without breaking layout.
- Score = 0 / Score = totalMarks: progress bar should render correctly at both ends; colour band must update across the 50% / 70% thresholds.
totalMarks = 0: don't render a divide-by-zero or a 100% bar — the code skips it, but verify.- Overdue with submission: assignment was Overdue then student submitted — should now read
Submitted, notOverdue. - Navigation from notification: tap a "result available" push → should land on
/projectswith the right child active and the relevant assignment near the top. - Stats accuracy: total = pending + completed must always hold (Submitted + Completed counted as "Completed" in the stats but not as "Pending").
- Pagination: page requests up to 50 (
limit: 50); a child with 60 assignments should not silently drop the rest — verify either pagination is wired or the limit is bumped. - Assignment deleted by teacher: parent's list should not show ghost cards on next refresh.
Related
- Homework — canonical lifecycle (teacher creates, student submits, teacher reviews); this page is the parent-facing window onto that
- Notifications — parent's push entry-points into this page