feat(form-builder): extend public form backend for S3a PR 2
- Seed AVAILABILITY_PICKER and SECTION_PRIORITY demo fields in the
event_registration showcase, and augment seedEchtFeesten with a
parent-level VOLUNTEER time slot pair + a standard registration-
visible section whose name duplicates a child section so the
PublicFormController dedup path is exercised end-to-end.
- Validate SECTION_PRIORITY value shape in FormValueService: arrays of
{ section_id, priority } with unique section_ids + priorities in 1..5,
max 5 entries, and section_ids scoped to the schema's event tree
(parent + children). Error envelope is the standard VALIDATION_FAILED
FieldValidationException shape so the portal renders errors next to
the field.
- Enrich admin-facing FormSubmissionResource with a nested identity_match
block mirroring the PublicFormSubmissionResource contract (status only;
leaves room for future matched_user_id / confidence).
- Lock in the FORM-05 stub contract with 6 tests against the existing
TriggerPersonIdentityMatchOnFormSubmit listener (no new listener was
needed — the current one already writes 'pending' for public
event_registration submissions per ARCH §31.1).
- 24 new backend assertions across seeder, shape validation, listener
state matrix, and resource serialisation.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -64,6 +64,11 @@ final class FormSubmissionResource extends JsonResource
|
||||
'first_interacted_at' => optional($this->first_interacted_at)->toIso8601String(),
|
||||
'submission_duration_seconds' => $this->submission_duration_seconds,
|
||||
'is_test' => (bool) $this->is_test,
|
||||
'identity_match' => $this->identity_match_status !== null && $this->identity_match_status !== ''
|
||||
? ['status' => $this->identity_match_status instanceof \BackedEnum
|
||||
? $this->identity_match_status->value
|
||||
: (string) $this->identity_match_status]
|
||||
: null,
|
||||
'values' => $values,
|
||||
'section_statuses' => $this->sectionStatuses->map(fn ($s) => [
|
||||
'form_schema_section_id' => $s->form_schema_section_id,
|
||||
|
||||
Reference in New Issue
Block a user