Backend: Bilješke – Grupna diskusija
Last modified with commit e90a924 on
by Aljaž.
Backend task for the aggregated Grupna diskusija notes (GET /assessments/{assessmentId}/notes/group-discussion) – check the API spec and DB structure, trainer-only access, implement, and verify.
Docs: Bilješke – Grupna diskusija
Spec: GET /assessments/{assessmentId}/notes/{activity} (getAssessmentNotes) with group-discussion, AssessmentNotesOverview in api-docs/openapi.yaml
DB: AssessmentNotes (group-discussion, fieldKey notes), AssessmentBoardMembers in api/database/create_schema.sql
A read-only, trainer-only page showing every board member’s Grupna diskusija note per candidate.
1. Double check API spec and DB structure
- Header data in the docs (brand · date · assessment name): does the frontend get it from
the detail endpoint, or should it be in
AssessmentNotesOverview? - Notes from removed board members are included (spec). Check that the docs agree.
- Board members who haven’t written a note: does the page show them (“Nema bilješki.”)? If yes, the response must list them too, because the spec currently only returns existing notes. Decide and update the spec.
- Ordering of candidates and board members: define it in the spec.
- Roles and permissions: requires
assessments.notes-access(Trainer only). Decide whether a Trainer outside the komisija can see it (the docs recommend yes). - DB: board member names come from
AssessmentBoardMembers.FullName, including soft-deleted rows.
2. Implementation
- Roles and permissions:
assessments.notes-access→ 403 otherwise. Unknown assessment → 404. - DB: join notes with board members (including
DeletedAt IS NOT NULL) to getfullName. - Function + repository, shared with
Backend: Bilješke – Predstavljanje kandidata
and parameterised by activity.
activityother thangroup-discussion/presentation→ 400.
3. Verify implementation against spec
- The response matches
AssessmentNotesOverview. - Evaluator → 403. A removed member’s note is still shown.
-
interview-notescan’t be requested here.
Done when
The trainer sees every board member’s Grupna diskusija notes, grouped by candidate.