Skip to main content

Yearly Plans

The school's annual curriculum scaffold. For each (class, subject) pair, an admin defines the overall academic period and assigns a start/end window to every chapter. Teachers later subdivide those chapter windows into weekly lesson plans inside the teacher app.

At a glance

Who can do thisAdmins & sub-admins with curriculum permission (super admin too)
Where it livesAdmin panel → /dashboard/school/:id/yearly-plans
Companion flowTeachers turn each chapter window into a weekly lesson plan
Related featuresSections & Teacher Assignment · Syllabus

How it flows

What a yearly plan contains

A yearly plan is one row per (class, subject). Each row carries:

  • A period: an overall start date and end date (the academic year, term, or semester).
  • A status: active (default) or completed.
  • A list of chapter timelines — one entry per chapter in that subject's syllabus, with its own start and end date that must sit inside the plan's period.

The list page columns are: Class · Subject · Period · Status · Created · Actions (view, delete).

Step-by-step

1. Open Yearly Plans for the school

  • Route: /dashboard/school/:id/yearly-plans
  • The page lists all yearly plans the school has created. If there are none, an empty state explains "create one to set chapter timelines for teachers."

2. Create a yearly plan (3-step wizard)

Click Create Yearly Plan to open the modal. It uses an Ant Steps component with three steps.

Step 1 — Select Subject

FieldNotes
ClassSearchable dropdown of the classes attached to this school
SubjectSearchable dropdown of subjects assigned to that class

The subject dropdown stays disabled until a class is chosen. If a class has no subjects assigned yet, the dropdown shows "No subjects found" — that's a hint to go set up subject assignments first (see Sections & Teacher Assignment).

Step 2 — Plan Dates

FieldRequiredValidation
Start DateyesMust be before End Date
End DateyesMust be after Start Date

A warning toast appears if start ≥ end.

Step 3 — Chapter Timelines

The modal fetches every chapter associated with the selected subject and renders them in a table. For each chapter the admin picks a Start Date and an End Date. Both date pickers disable any date outside the plan's overall period — chapter windows are clamped inside the plan window by the picker itself.

Click Create Plan to commit. The form refuses submission unless every chapter has both dates set.

3. View / edit an existing plan

Click the eye icon on any row to open the detail modal. It shows:

  • Header: Class – Subject Yearly Plan
  • Period and status tag
  • A table of chapters with their current start/end dates and an inline edit button per row

Editing a chapter timeline is row-level: tap the pencil icon → date pickers appear in-row → check icon to save, X to cancel. The same "must stay inside the plan window" constraint applies to the edit pickers.

4. Deletion

Delete from the list page (trash icon). The confirm dialog warns: "This will also delete all chapter timelines."

There is no concept of locking in the current UI. A plan in active state can be edited and chapter timelines can be moved at any time. Status flips to completed automatically when the plan's end date is reached (this is reflected in the green tag on the list).

How this connects to weekly plans

Teachers see the yearly plan as the rails for their weekly plan. For the chapter window the admin set (e.g. "Photosynthesis: 12 Jul – 26 Jul"), the teacher's weekly planner suggests dividing it into ~2 weeks of lessons. The teacher fills in the actual lesson breakdown inside that window.

See Yearly Plan → Weekly Plan for the teacher side.

Edge cases & things to test

  • No subjects on the chosen class — the Subject dropdown should show "No subjects found" and the Next button should warn rather than silently advance.
  • Plan window shorter than a chapter — set a 5-day plan for a subject with 12 chapters. Each chapter's date pickers will fight for the same range. Verify there's no client-side validation requiring chapters to be non-overlapping (overlap is allowed today).
  • Chapter date outside plan window after edit — happen if you edit the plan dates after chapters were set. The edit-chapter date picker will still clamp to the plan window, but existing rows might already lie outside it. Confirm the table renders them and the inline edit forces them back in-range.
  • Create two plans for the same class+subject — should it be allowed (e.g. one for term 1, one for term 2)? Verify the list shows both with non-overlapping periods.
  • Status flip — a plan with endDate < today should display the green "Completed" tag. Check timezone handling (UTC vs local).
  • Delete plan after teachers built weekly plans on top — confirm what happens to the teacher's weekly plans (are they orphaned, hidden, deleted?). Verify the warning message accurately reflects the consequence.
  • Mobile layout — the create modal is 720 px wide; on narrow phones the chapter table should scroll horizontally rather than overflow.
  • Many chapters (50+) — chapter table has scroll={{ y: 400 }}. Verify the date pickers in scrolled rows still open above/below correctly without being clipped.