Backend: Bilješke – Predstavljanje kandidata
Last modified with commit e90a924 on
by Aljaž.
Backend task for the aggregated Predstavljanje kandidata notes (GET /assessments/{assessmentId}/notes/presentation) – check the API spec and DB structure, trainer-only access, implement, and verify.
Docs: Bilješke – Predstavljanje kandidata
Spec: GET /assessments/{assessmentId}/notes/{activity} (getAssessmentNotes) with presentation, AssessmentNotesOverview in api-docs/openapi.yaml
DB: AssessmentNotes (presentation, fieldKey q1–q5), AssessmentBoardMembers in api/database/create_schema.sql
A read-only, trainer-only page. For each candidate it shows the 5 questions, and under each question every board member’s note.
1. Double check API spec and DB structure
- Each docs question maps to its
fieldKey(q1–q5). The question text is a frontend label and should be the same as in the form (the docs note that Figma’s wording for question 2 is different). - “Nema bilješki.” is shown for each board member who hasn’t answered a question. Same decision as for Grupna diskusija: should the response list every board member for each candidate?
- Notes from removed board members are included.
- Roles and permissions: requires
assessments.notes-access(Trainer only). - DB: board member names come from
AssessmentBoardMembers.FullName, including soft-deleted rows.
2. Implementation
- Roles and permissions:
assessments.notes-access→ 403 otherwise. - DB: reuse the query from
Backend: Bilješke – Grupna diskusija with
activity = presentation. - Order notes by question (
q1–q5), then by board member.
3. Verify implementation against spec
- The response matches
AssessmentNotesOverview, withfieldKeyvaluesq1–q5. - Evaluator → 403.
Done when
The trainer sees all board members’ answers to the 5 questions, for each candidate.