Files
hqland-app/app/Filament/Resources/Projects/Schemas/ProjectForm.php
2026-04-24 08:58:53 +00:00

38 lines
1.5 KiB
PHP

<?php
namespace App\Filament\Resources\Projects\Schemas;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Components\Section;
use Filament\Schemas\Schema;
class ProjectForm
{
public static function configure(Schema $schema): Schema
{
return $schema
->components([
Section::make('Thông tin Dự án')
->columns(2)
->schema([
TextInput::make('code')->label('Mã Dự án')->required()->unique(ignoreRecord: true),
TextInput::make('name')->label('Tên Dự án')->required(),
Select::make('payment_template_id')
->label('Mẫu thanh toán mặc định')
->relationship('paymentTemplate', 'name')
->placeholder('Chọn mẫu thanh toán cho toàn dự án')
->columnSpanFull(),
Select::make('type')
->label('Loại hình')
->options([
'Khu đô thị' => 'Khu đô thị',
'Chung cư' => 'Chung cư',
'Đất nền phân lô' => 'Đất nền phân lô',
])->required(),
TextInput::make('address')->label('Địa chỉ')->columnSpanFull(),
])
]);
}
}