70 lines
2.5 KiB
PHP
70 lines
2.5 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Filament\Resources\WeddingPackages\Schemas;
|
|
|
|
use Filament\Forms\Components\DateTimePicker;
|
|
use Filament\Forms\Components\Repeater;
|
|
use Filament\Forms\Components\Textarea;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Schemas\Schema;
|
|
|
|
class WeddingPackageForm
|
|
{
|
|
public static function configure(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->components([
|
|
TextInput::make('name')
|
|
->label('Nome da modalidade')
|
|
->required()
|
|
->maxLength(255),
|
|
TextInput::make('level')
|
|
->label('Número / tipo (ex.: 01 / COMPLETA)')
|
|
->required()
|
|
->maxLength(255),
|
|
TextInput::make('tag')
|
|
->label('Etiqueta curta (ex.: Assessoria completa)')
|
|
->maxLength(255),
|
|
TextInput::make('subtitle')
|
|
->label('Frase de apoio')
|
|
->maxLength(255),
|
|
Textarea::make('summary')
|
|
->label('Resumo')
|
|
->required()
|
|
->rows(4),
|
|
Repeater::make('scope_items')
|
|
->label('O que está incluído')
|
|
->schema([
|
|
TextInput::make('item')
|
|
->label('Item')
|
|
->required()
|
|
->maxLength(255),
|
|
])
|
|
->defaultItems(4)
|
|
->minItems(1)
|
|
->addActionLabel('Adicionar item')
|
|
->required(),
|
|
TextInput::make('cta_label')
|
|
->label('Texto do botão')
|
|
->required()
|
|
->maxLength(255),
|
|
TextInput::make('compare_heading')
|
|
->label('Comparação — título (leitura rápida)')
|
|
->maxLength(255),
|
|
TextInput::make('compare_summary')
|
|
->label('Comparação — resumo (leitura rápida)')
|
|
->maxLength(255),
|
|
TextInput::make('sort_order')
|
|
->label('Ordem')
|
|
->numeric()
|
|
->default(0)
|
|
->required(),
|
|
DateTimePicker::make('published_at')
|
|
->label('Publicado em')
|
|
->seconds(false),
|
|
]);
|
|
}
|
|
}
|