Replace the per-field `section` text property with a dedicated HEADING field type that organizers add as a separate block for visual grouping. Also fixes duplicate heading bug on portal radio fields, replaces cramped VBtnToggle with VSelect for field width, and adds grouped field type dropdown with structure/input categories. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
37 lines
1.2 KiB
PHP
37 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Resources\Api\V1;
|
|
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
final class RegistrationFieldTemplateResource extends JsonResource
|
|
{
|
|
public function toArray(Request $request): array
|
|
{
|
|
return [
|
|
'id' => $this->id,
|
|
'organisation_id' => $this->organisation_id,
|
|
'label' => $this->label,
|
|
'slug' => $this->slug,
|
|
'field_type' => $this->field_type->value,
|
|
'options' => $this->options,
|
|
'normalized_options' => $this->normalized_options,
|
|
'tag_category' => $this->tag_category,
|
|
'is_required' => $this->is_required,
|
|
'is_filterable' => $this->is_filterable,
|
|
'is_portal_visible' => $this->is_portal_visible,
|
|
'is_admin_only' => $this->is_admin_only,
|
|
'help_text' => $this->help_text,
|
|
'sort_order' => $this->sort_order,
|
|
'display_width' => $this->display_width->value,
|
|
'is_system' => $this->is_system,
|
|
'is_active' => $this->is_active,
|
|
'created_at' => $this->created_at->toIso8601String(),
|
|
'updated_at' => $this->updated_at->toIso8601String(),
|
|
];
|
|
}
|
|
}
|