Files
citrus/app/Filament/Admin/Resources/Pages/Schemas/Sections/BankAccountsSection.php
T

76 lines
3.0 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?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')
->live()
->required(),
TextInput::make('swift_code')
->label('SWIFT / BIC')
->placeholder('Örn: TRHBTR2A')
->required(fn (Get $get): bool => $get('currency') !== 'TRY'),
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();
}
}