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:
@@ -293,6 +293,29 @@ final class FormBuilderDevSeeder
|
||||
'display_width' => 'full',
|
||||
'value_storage_hint' => FormValueStorageHint::JSON,
|
||||
],
|
||||
[
|
||||
'type' => FormFieldType::AVAILABILITY_PICKER,
|
||||
'slug' => 'beschikbaarheid',
|
||||
'label' => 'Wanneer ben je beschikbaar?',
|
||||
'help_text' => 'Vink alle dagdelen aan waarop je kunt werken.',
|
||||
'is_required' => true,
|
||||
'is_filterable' => false,
|
||||
'display_width' => 'full',
|
||||
'value_storage_hint' => FormValueStorageHint::JSON,
|
||||
],
|
||||
[
|
||||
'type' => FormFieldType::SECTION_PRIORITY,
|
||||
'slug' => 'sectie_voorkeur',
|
||||
'label' => 'Bij welke sectie wil je het liefst werken?',
|
||||
'help_text' => 'Sleep je voorkeuren in volgorde. Nummer 1 is je eerste keuze.',
|
||||
// UI soft cap; the hard cap of 5 lives in
|
||||
// FormValueService shape validation.
|
||||
'validation_rules' => ['max_priorities' => 3],
|
||||
'is_required' => false,
|
||||
'is_filterable' => false,
|
||||
'display_width' => 'full',
|
||||
'value_storage_hint' => FormValueStorageHint::JSON,
|
||||
],
|
||||
[
|
||||
'type' => FormFieldType::TEXTAREA,
|
||||
'slug' => 'opmerkingen',
|
||||
@@ -340,6 +363,7 @@ final class FormBuilderDevSeeder
|
||||
'field_type' => $def['type']->value,
|
||||
'slug' => $def['slug'],
|
||||
'label' => $def['label'],
|
||||
'help_text' => $def['help_text'] ?? null,
|
||||
'options' => $def['options'] ?? null,
|
||||
'validation_rules' => $def['validation_rules'] ?? null,
|
||||
'is_required' => $def['is_required'] ?? false,
|
||||
|
||||
Reference in New Issue
Block a user