Skip to main content

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 thisParents view (read-only)
Where it livesParent app /projects (header label: "Homework")
Underlying systemSame 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 featuresHomework · 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:

StatusBadge styling
AssignedNeutral secondary
InProgressMuted (rendered as "In Progress")
SubmittedPrimary tint
CompletedPrimary tint (with score progress bar)
OverdueDestructive / 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-screen PageHeader reads "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.

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 Completed or Submitted.

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 Completed and a score is set, a score progress bar:
      • Coloured by score percentage (chart-5 ≥ 70%, chart-4 ≥ 50%, destructive otherwise).
      • Shows score/totalMarks to the right.
  • Cards are wrapped in motion.div with 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, Overdue badges on top of Assigned / Submitted.
  • Header label: shows "Homework" even though the route is /projects and 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/:newId and 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 SubmittedCompleted and 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, not Overdue.
  • Navigation from notification: tap a "result available" push → should land on /projects with 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.
  • 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