Hoan thien core finance v2

This commit is contained in:
2026-04-25 04:04:14 +00:00
parent 86216ef872
commit 002c9a8b99
39 changed files with 1308 additions and 89 deletions

View File

@@ -0,0 +1,65 @@
<?php
namespace App\Filament\Resources\Appendices\Schemas;
use Filament\Forms\Components\DatePicker;
use Filament\Forms\Components\KeyValue;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Components\Section;
use Filament\Schemas\Components\Grid;
use Filament\Schemas\Schema;
class AppendixForm
{
public static function configure(Schema $schema): Schema
{
return $schema
->components([
Grid::make(3)
->schema([
Section::make('Thông tin phụ lục')
->columnSpan(2)
->columns(2)
->schema([
Select::make('contract_id')
->label('Hợp đồng gốc')
->relationship('contract', 'contract_number')
->searchable()
->preload()
->required(),
Select::make('product_id')
->label('Sản phẩm')
->relationship('product', 'code')
->searchable()
->preload()
->required(),
TextInput::make('type')
->label('Loại phụ lục')
->required(),
TextInput::make('apply_from_order')
->label('Áp dụng từ CN thứ')
->numeric()
->default(0)
->required(),
DatePicker::make('signing_date')
->label('Ngày ký phụ lục')
->required(),
]),
Section::make('Dữ liệu bổ sung')
->columnSpan(1)
->schema([
KeyValue::make('custom_data')
->label('Thông tin bổ sung')
->keyLabel('Thông tin')
->valueLabel('Giá trị'),
]),
]),
]);
}
}