feat: registration form fields, section preferences, tag sync & schema updates
Implement EAV system for dynamic event-specific registration fields with organisation-level templates, person section preferences with priority ranking, and TagSyncService for deferred tag_picker sync. New tables: registration_field_templates, registration_form_fields, person_field_values, person_section_preferences. New columns: persons.remarks, events.registration_show_section_preferences, events.registration_show_availability. 58 tests, 126 assertions — all 432 tests pass (zero regressions). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
33
api/app/Enums/RegistrationFieldType.php
Normal file
33
api/app/Enums/RegistrationFieldType.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Enums;
|
||||
|
||||
enum RegistrationFieldType: string
|
||||
{
|
||||
case TEXT = 'text';
|
||||
case TEXTAREA = 'textarea';
|
||||
case SELECT = 'select';
|
||||
case MULTISELECT = 'multiselect';
|
||||
case CHECKBOX = 'checkbox';
|
||||
case RADIO = 'radio';
|
||||
case BOOLEAN = 'boolean';
|
||||
case NUMBER = 'number';
|
||||
case TAG_PICKER = 'tag_picker';
|
||||
|
||||
public function isMultiValue(): bool
|
||||
{
|
||||
return in_array($this, [self::MULTISELECT, self::CHECKBOX, self::TAG_PICKER], true);
|
||||
}
|
||||
|
||||
public function requiresOptions(): bool
|
||||
{
|
||||
return in_array($this, [self::SELECT, self::MULTISELECT, self::RADIO, self::CHECKBOX], true);
|
||||
}
|
||||
|
||||
public function prohibitsOptions(): bool
|
||||
{
|
||||
return in_array($this, [self::TEXT, self::TEXTAREA, self::BOOLEAN, self::NUMBER, self::TAG_PICKER], true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user