feat: add Partners and Bank Accounts pages via Pages module
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
<?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();
|
||||
}
|
||||
}
|
||||
@@ -72,6 +72,8 @@ class PageSettingsSection
|
||||
'home' => 'Home',
|
||||
'corporate.testimonials' => 'Müşteri Görüşleri (Kurumsal)',
|
||||
'corporate.logos' => 'Logolarımız (Kurumsal)',
|
||||
'corporate.partners' => 'Çözüm Ortaklarımız (Kurumsal)',
|
||||
'corporate.bank-accounts' => 'Banka Bilgilerimiz (Kurumsal)',
|
||||
])
|
||||
->default('default')
|
||||
->columnSpanFull(),
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Admin\Resources\Pages\Schemas\Sections;
|
||||
|
||||
use Filament\Forms\Components\FileUpload;
|
||||
use Filament\Forms\Components\Repeater;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Schemas\Components\Section;
|
||||
use Filament\Schemas\Components\Utilities\Get;
|
||||
|
||||
class PartnersSection
|
||||
{
|
||||
public static function make(): Section
|
||||
{
|
||||
return Section::make(__('Çözüm Ortakları'))
|
||||
->description(__('Bu sayfada gösterilecek çözüm ortaklarını buradan yönetebilirsiniz.'))
|
||||
->schema([
|
||||
Repeater::make('data.partners')
|
||||
->label('Partnerler')
|
||||
->schema([
|
||||
FileUpload::make('logo')
|
||||
->label('Logo')
|
||||
->image()
|
||||
->disk('public')
|
||||
->directory('partners')
|
||||
->visibility('public')
|
||||
->required()
|
||||
->columnSpanFull(),
|
||||
|
||||
TextInput::make('url')
|
||||
->label('Website URL')
|
||||
->url()
|
||||
->placeholder('https://example.com')
|
||||
->columnSpanFull(),
|
||||
])
|
||||
->grid(4)
|
||||
->columnSpanFull()
|
||||
->reorderableWithButtons()
|
||||
->collapsible()
|
||||
->cloneable(),
|
||||
])
|
||||
->visible(fn (Get $get): bool => $get('template') === 'corporate.partners')
|
||||
->columnSpanFull()
|
||||
->collapsible();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user