nang cap san sang import
This commit is contained in:
53
app/Filament/Resources/Contracts/Schemas/ContractForm.php
Normal file
53
app/Filament/Resources/Contracts/Schemas/ContractForm.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Contracts\Schemas;
|
||||
|
||||
use App\Enums\ContractStatus;
|
||||
use App\Enums\ContractType;
|
||||
use Filament\Forms\Components\DatePicker;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Schemas\Components\Section;
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class ContractForm
|
||||
{
|
||||
public static function configure(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
Section::make('Thông tin hợp đồng')
|
||||
->schema([
|
||||
Select::make('product_id')
|
||||
->relationship('product', 'name')
|
||||
->searchable()
|
||||
->preload()
|
||||
->required(),
|
||||
Select::make('customer_id')
|
||||
->relationship('customer', 'name')
|
||||
->searchable()
|
||||
->preload()
|
||||
->required(),
|
||||
Select::make('type')
|
||||
->options(ContractType::options())
|
||||
->required()
|
||||
->native(false),
|
||||
Select::make('status')
|
||||
->options(ContractStatus::ACTIVE->options())
|
||||
->default('active')
|
||||
->required()
|
||||
->native(false),
|
||||
DatePicker::make('start_date')
|
||||
->label('Ngày bắt đầu'),
|
||||
DatePicker::make('end_date')
|
||||
->label('Ngày kết thúc'),
|
||||
DatePicker::make('printed_at')
|
||||
->label('Ngày in HĐ'),
|
||||
TextInput::make('signed_status')
|
||||
->label('Tình trạng ký')
|
||||
->maxLength(255),
|
||||
])
|
||||
->columns(2),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user