Backend: Form – Igranje uloga – prvi kontakt
Last modified with commit 54c7b1e on
by TjasaSimovic.
Backend task for the Igranje uloga – prvi kontakt form (activity first-contact) – check the criterion keys and status rule against the API spec and DB structure, implement, and verify.
Docs: Form – Igranje uloga – prvi kontakt
Spec: activity first-contact on /assessments/{assessmentId}/forms/{activity} in api-docs/openapi.yaml
DB: AssessmentGrades (first-contact) in api/database/create_schema.sql
A shared grading form. Its grades are also used for argumentacija when argumentacija is disabled (see Backend: Assessment results).
1. Double check API spec and DB structure
- Criterion keys for the 7 categories / 16 sub-criteria in the docs:
- Zadatak – 1
- Orijentacija prema kupcu – 2
- Društvenost / Empatija – 3
- Posvećenost / samo-motiviranost – 2
- Pojava / ponašanje – 2
- Tehnika i sposobnost – 3
- Pripreme i razgovor za ocjenjivanje – 3
- Agree on the category keys and add them to the spec or the shared contract.
- Status rule: Zaključeno when, for every candidate, every category has at least one sub-criterion filled in.
- “Kandidat dobro poznaje Škoda proizvode”: if the brand name is filled in dynamically (docs open question), it’s only a frontend label and the key stays the same. Confirm.
- Roles and permissions: Trainer and Assessment evaluator, if they are active board members.
- DB: no notes on this form. The AssessmentNotes check constraint doesn’t allow
first-contact. Make sure the spec doesn’t suggest notes here either.
2. Implementation
- Roles and permissions: handled by the shared form endpoint. No extra checks.
- DB / catalog: add the first-contact criteria to the catalog.
- Status helper for this form.
3. Verify implementation against spec
- Status true / false cases, as for Grupna diskusija.
- Notes sent for
first-contact→ 400.
Done when
Prvi kontakt can be filled in and saved, and its status and POGODNOST are correct.