51 lines
1.8 KiB
PHP
51 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace App\Filament\SuperAdmin\Pages\Auth;
|
|
|
|
use App\Filament\SuperAdmin\Widgets\SupportApiTokenManager;
|
|
use Filament\Auth\Pages\EditProfile as BaseEditProfile;
|
|
use Filament\Forms\Components\Select;
|
|
use Filament\Forms\Components\TextInput;
|
|
use Filament\Schemas\Components\Livewire;
|
|
use Filament\Schemas\Components\Section;
|
|
use Filament\Schemas\Schema;
|
|
|
|
class EditProfile extends BaseEditProfile
|
|
{
|
|
public function form(Schema $schema): Schema
|
|
{
|
|
return $schema
|
|
->schema([
|
|
Section::make('Profile')
|
|
->schema([
|
|
$this->getNameFormComponent(),
|
|
$this->getEmailFormComponent(),
|
|
TextInput::make('username')
|
|
->required()
|
|
->unique(ignoreRecord: true)
|
|
->maxLength(255),
|
|
Select::make('preferred_locale')
|
|
->options([
|
|
'de' => 'Deutsch',
|
|
'en' => 'English',
|
|
])
|
|
->default('de')
|
|
->required(),
|
|
])
|
|
->columns(2),
|
|
Section::make('Security')
|
|
->schema([
|
|
$this->getPasswordFormComponent(),
|
|
$this->getPasswordConfirmationFormComponent(),
|
|
$this->getCurrentPasswordFormComponent(),
|
|
])
|
|
->columns(1),
|
|
Section::make('Support API Tokens')
|
|
->description('Manage bearer tokens for external support tooling.')
|
|
->schema([
|
|
Livewire::make(SupportApiTokenManager::class),
|
|
]),
|
|
]);
|
|
}
|
|
}
|