5.3 KiB
5.3 KiB
Staff Support Pages
Purpose
The Autism Support Steps, Certifications & Degrees, and Awards Earned & Reviews pages were adapted from the legacy education-support-management template into the current three-layer frontend.
Frontend Layers
View:
frontend/src/pages/modules/AutismSupportStepsPage.tsxfrontend/src/pages/modules/ParaCertificationsPage.tsxfrontend/src/pages/modules/AwardsReviewsPage.tsxfrontend/src/components/frameworks/AutismSupportSteps.tsxfrontend/src/components/frameworks/ParaCertifications.tsxfrontend/src/components/frameworks/AwardsReviews.tsx
Business:
frontend/src/business/staff-support/hooks.tsfrontend/src/business/staff-support/selectors.ts
API/data:
frontend/src/shared/api/contentCatalog.tsfrontend/src/shared/api/staffAwardsReviews.tsfrontend/src/shared/api/files.tsfrontend/src/shared/types/staffSupport.ts
Backend Contracts
Autism Support Steps:
- Reads
GET /api/content-catalog/read/autism-support-steps. - Managers update
PUT /api/content-catalog/autism-support-steps. - Visual card images upload through
POST /api/file/upload/autism-support/visual-cards. - Payload shape is
stepsplusvisualCards. Step cards storeid,iconId,title,subtitle, andspans. Visual cards storeid,label, optionalimageUrl, and fallbackiconText. - The page renders normal read-only cards by default. Users with management access get a collapsed
Edit Contentpanel for step cards and printable lanyard cards. Print Stepsprints the staff step cards;Print Lanyardsprints the visual cards using the same payload.
Certifications & Degrees:
- Reads
GET /api/content-catalog/read/para-certifications. - Managers update
PUT /api/content-catalog/para-certifications. - Hero image uploads through
POST /api/file/upload/para-certifications/hero. - Payload shape is
heroImage,heroTitle,heroSubtitle,highlights, andprograms. - Highlight cards store
id,iconId,title, andsubtitle. Program cards storeid,name,organization,description,url, andtag. - The page renders normal read-only cards by default. Users with management access get a collapsed
Edit Contentpanel for the hero, highlights, and certification cards.
Awards Earned & Reviews:
- Reads records through
GET /api/staff_awards_reviews. - Managers list visible staff through
GET /api/staff_awards_reviews/staff. - Creates, updates, and deletes records through
POST /,PUT /:id, andDELETE /:id. - Attachments upload through
POST /api/file/upload/staff-awards-reviews/attachments. - Staff users see only their own records and a collapsed add/edit form.
- Leaders and office managers with management permission see a staff list first; selecting a staff member loads that staff member's records and enables cross-staff create/update/delete.
Access
- Route visibility is driven by
READ_AUTISM_SUPPORT_STEPS,READ_PARA_CERTIFICATIONS, andREAD_AWARDS_REVIEWS. - Content management is driven by
MANAGE_AUTISM_SUPPORT_STEPSandMANAGE_PARA_CERTIFICATIONS, and is enabled only at campus effective scope. - Awards/reviews self-service is available to readers for their own records. Cross-staff staff list and mutation require
MANAGE_AWARDS_REVIEWS; backend scope checks decide which staff are visible. - Campus staff readers are
director,office_manager,teacher, andsupport_staffthrough seeded preset permissions. Leaders (owner,superintendent,principal) access the pages through scope drilling and the same permission names. registraris intentionally not granted these pages.
Data Ownership
- Autism Support Steps and Certifications & Degrees content belongs in backend
content_catalogseed payloads and campus-scoped content rows. - Awards/reviews records belong in
staff_awards_reviews, notuser_progress, because leaders can maintain records for scoped staff users. - Uploaded images/files are stored in the shared file subsystem; payloads and rows store only the returned private URLs.
Seeded Defaults
backend/src/db/seeders/content-catalog-data/content-catalog-seed-payloads.tscontains the default Autism Support Steps and Certifications & Degrees payloads.backend/src/db/seeders/20260608103000-content-catalog.tsincludes those payloads for standard seeding.ContentCatalogSeedService.seedDefaultContentForTenantcreates campus-scoped rows for every new campus so new organizations see the legacy template content immediately.backend/src/db/seeders/20260613060000-staff-awards-reviews.tsseeds demo and rival teacher/support-staff award/review records, so seeded staff pages are not empty by default.
Tests
frontend/src/business/staff-support/selectors.test.tscovers payload normalization for Autism Support Steps and Certifications & Degrees.frontend/src/shared/api/staffAwardsReviews.test.tscovers Awards Earned & Reviews API route construction and mutation payloads.frontend/src/business/app-shell/selectors.test.tscovers sidebar visibility for the three staff-support modules across organization, school, campus, and class effective scopes.- Backend behavior is covered by
backend/src/services/content_catalog.test.ts,backend/src/services/content_catalog_seed.test.ts,backend/src/services/staff_awards_reviews.test.ts, andbackend/src/db/seeders/user-roles.test.ts.