70 lines
2.7 KiB
PHP
70 lines
2.7 KiB
PHP
<?php
|
||
|
||
namespace App\Filament\Admin\Resources\Pages\Schemas\Sections;
|
||
|
||
use Filament\Forms\Components\FileUpload;
|
||
use Filament\Forms\Components\Repeater;
|
||
use Filament\Forms\Components\Select;
|
||
use Filament\Forms\Components\TextInput;
|
||
use Filament\Schemas\Components\Section;
|
||
use Filament\Schemas\Components\Utilities\Get;
|
||
|
||
class BankAccountsSection
|
||
{
|
||
public static function make(): Section
|
||
{
|
||
return Section::make(__('Banka Hesapları'))
|
||
->description(__('Bu sayfada gösterilecek banka hesap bilgilerini buradan yönetebilirsiniz.'))
|
||
->schema([
|
||
Repeater::make('data.bank_accounts')
|
||
->label('Hesaplar')
|
||
->schema([
|
||
TextInput::make('bank_name')
|
||
->label('Banka Adı')
|
||
->placeholder('Örn: Ziraat Bankası')
|
||
->required(),
|
||
|
||
TextInput::make('branch_name')
|
||
->label('Şube Adı / Kodu')
|
||
->placeholder('Örn: Konak Şubesi / 1234'),
|
||
|
||
TextInput::make('account_holder')
|
||
->label('Hesap Sahibi')
|
||
->default('Trunçgil Teknoloji')
|
||
->required(),
|
||
|
||
TextInput::make('iban')
|
||
->label('IBAN')
|
||
->placeholder('TR00 0000 0000 0000 0000 0000 00')
|
||
->required(),
|
||
|
||
Select::make('currency')
|
||
->label('Para Birimi')
|
||
->options([
|
||
'TRY' => 'Türk Lirası (₺)',
|
||
'USD' => 'Amerikan Doları ($)',
|
||
'EUR' => 'Euro (€)',
|
||
'GBP' => 'Sterlin (£)',
|
||
])
|
||
->default('TRY')
|
||
->required(),
|
||
|
||
FileUpload::make('logo')
|
||
->label('Banka Logosu')
|
||
->image()
|
||
->disk('public')
|
||
->directory('banks')
|
||
->visibility('public'),
|
||
])
|
||
->grid(3)
|
||
->columnSpanFull()
|
||
->reorderableWithButtons()
|
||
->collapsible()
|
||
->cloneable(),
|
||
])
|
||
->visible(fn (Get $get): bool => $get('template') === 'corporate.bank-accounts')
|
||
->columnSpanFull()
|
||
->collapsible();
|
||
}
|
||
}
|