Backend: Form – Predstavljanje kandidata
Last modified with commit 54c7b1e on
by TjasaSimovic.
Backend task for the Predstavljanje kandidata notes form (activity presentation) – check the field keys and status rule against the API spec and DB structure, implement, and verify.
Docs: Form – Predstavljanje kandidata
Spec: activity presentation on /assessments/{assessmentId}/forms/{activity} (candidateId required) in api-docs/openapi.yaml
DB: AssessmentNotes (presentation, fieldKey q1–q5) in api/database/create_schema.sql
An individual notes form with 5 open questions and no grades.
1. Double check API spec and DB structure
- Field keys
q1–q5match the 5 questions in the docs, in order. - Status rule: Zaključeno when all 5 fields are filled in (for this board member and candidate).
- Notes from all board members feed Bilješke – Predstavljanje kandidata.
- Roles and permissions: Trainer and Assessment evaluator, if they are active board members.
- DB: no grades. The AssessmentGrades check constraint doesn’t allow
presentation; the spec should reject grades too.Note NVARCHAR(MAX)— is a max length needed in the spec?
2. Implementation
- Roles and permissions: handled by the shared form endpoint. No extra checks.
- DB / catalog: add the presentation fields to the catalog.
- Status helper for this form. A whitespace-only note counts as empty.
3. Verify implementation against spec
- Missing
candidateId→ 400. - 4 fields filled in →
false; 5 →true. - Grades sent → 400.
Done when
Predstavljanje kandidata can be filled in per candidate, and its status is correct.