Summary
The frontend dean dashboard now includes a Faculty Requiring Attention section powered by:
GET /api/v1/analytics/attention
We also want the dashboard to support filtering by:
At the moment, overview already supports programCode, but attention does not, so the dashboard cannot be filtered consistently by program.
Role scope rules
Expected access model:
Dean
- scoped to their department(s) for the selected semester
- can view all programs inside those departments
Example:
- specific campus
- specific department
- all programs under that department (
BSCS, BSIT, etc.)
Chairperson
- still within the parent department context
- but limited to one or more assigned programs only
Example:
- same department as dean scope
- only assigned programs such as
BSCS
- or multiple programs if assigned
Requested backend changes
1. Add scoped analytics programs endpoint
Proposed route:
GET /api/v1/analytics/programs
Query params:
Auth:
DEAN
CHAIRPERSON
SUPER_ADMIN
Response:
Array<{
id: string;
code: string;
name: string | null;
}>
Expected behavior:
DEAN: return all programs inside the dean's scoped department(s) for the selected semester
CHAIRPERSON: return only assigned/in-scope programs for the selected semester
SUPER_ADMIN: unrestricted list is acceptable
2. Extend attention endpoint to support program filter
Existing route:
GET /api/v1/analytics/attention
Add optional query param:
Expected behavior:
- when
programCode is provided, return only attention items for that program
- still enforce caller scope
- if the requested program is outside caller scope, either return empty results or reject with
403
Either is acceptable as long as behavior is intentional and documented.
Why this is needed
Frontend wants a consistent dean/chairperson dashboard filter model:
Current state:
GET /analytics/overview supports semesterId + programCode
GET /analytics/attention supports only semesterId
Because of that mismatch, the dashboard cannot safely expose a real program filter yet without creating inconsistent sections.
Frontend dependency
Frontend is waiting on:
- scoped program options endpoint
programCode support on GET /analytics/attention
Once available, frontend will wire the dashboard filter so both:
- overview metrics/chart
- faculty requiring attention
follow the same selected semester and program.
Notes
This should be reusable for both:
- dean dashboard
- future chairperson dashboard
Summary
The frontend dean dashboard now includes a
Faculty Requiring Attentionsection powered by:GET /api/v1/analytics/attentionWe also want the dashboard to support filtering by:
semesterprogramAt the moment,
overviewalready supportsprogramCode, butattentiondoes not, so the dashboard cannot be filtered consistently by program.Role scope rules
Expected access model:
Dean
Example:
BSCS,BSIT, etc.)Chairperson
Example:
BSCSRequested backend changes
1. Add scoped analytics programs endpoint
Proposed route:
GET /api/v1/analytics/programsQuery params:
semesterIdrequiredAuth:
DEANCHAIRPERSONSUPER_ADMINResponse:
Expected behavior:
DEAN: return all programs inside the dean's scoped department(s) for the selected semesterCHAIRPERSON: return only assigned/in-scope programs for the selected semesterSUPER_ADMIN: unrestricted list is acceptable2. Extend attention endpoint to support program filter
Existing route:
GET /api/v1/analytics/attentionAdd optional query param:
programCode?: stringExpected behavior:
programCodeis provided, return only attention items for that program403Either is acceptable as long as behavior is intentional and documented.
Why this is needed
Frontend wants a consistent dean/chairperson dashboard filter model:
SemesterProgramCurrent state:
GET /analytics/overviewsupportssemesterId+programCodeGET /analytics/attentionsupports onlysemesterIdBecause of that mismatch, the dashboard cannot safely expose a real program filter yet without creating inconsistent sections.
Frontend dependency
Frontend is waiting on:
programCodesupport onGET /analytics/attentionOnce available, frontend will wire the dashboard filter so both:
follow the same selected
semesterandprogram.Notes
This should be reusable for both: