translation wip

This commit is contained in:
salam committed 2025-10-01 19:44:00 +02:00
1 parent ecb66a76b5
commit c7d87f9f55
7 files changed
+210 -58

No files matched your search

+53 -5
View File
@@ -5,6 +5,7 @@ namespace App\Filament\Pages\Auth;
use App\Models\Auftraggeber;
use App\Models\Gutachter;
use App\Models\Konto;
use App\Models\Plan;
use Danielebarbaro\LaravelVatEuValidator\Rules\VatNumber;
use Filament\Auth\Pages\Register as BaseRegister;
use Filament\Forms\Components\Checkbox;
@@ -17,9 +18,13 @@ use Filament\Schemas\Components\View;
use Filament\Schemas\Components\Wizard;
use Filament\Schemas\Components\Wizard\Step;
use Filament\Schemas\Schema;
use Filament\Support\Enums\Alignment;
use Filament\Support\Enums\IconPosition;
use Filament\Support\Enums\IconSize;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\HtmlString;
use JaOcero\RadioDeck\Forms\Components\RadioDeck;
use Ysfkaya\FilamentPhoneInput\Forms\PhoneInput;
class Register extends BaseRegister
@@ -40,10 +45,25 @@ class Register extends BaseRegister
'Frau' => 'Frau',
'Non-binary' => 'Non-binary',
])
->required(),
$this->getNameFormComponent(),
$this->getEmailFormComponent(),
$this->getPasswordFormComponent(),
->required()
->validationMessages([
'required' => 'Ein Geschlecht ist erforderlich.',
]),
$this->getNameFormComponent()->validationMessages([
'required' => 'Ein Name ist erforderlich.',
]),
$this->getEmailFormComponent()
->validationMessages([
'required' => 'Eine E-Mail-Adresse ist erforderlich.',
]),
$this->getPasswordFormComponent()
->validationMessages([
'required' => 'Ein Passwort ist erforderlich.',
'same' => 'Das Passwort muß mit dem "Passwort bestätigen" Feld übereinstimmen.',
'min' => [
'string' => 'Das :attribute muß mindestens :min Stellen lang sein.',
],
]),
$this->getPasswordConfirmationFormComponent(),
])->columnSpan(3),
Wizard\Step::make('Konto')
@@ -129,6 +149,33 @@ class Register extends BaseRegister
])->columnSpan(4),
]),
Wizard\Step::make('Zahlungsmodus')
->icon('phosphor-coins')
->visible(fn (Get $get): bool => $get('register-modus') == 'new')
->description('Kann jederzeit geändert werden.')
->schema([
RadioDeck::make('plan_id')
->label('Wählen sie eine Option')
->options(fn () => Plan::pluck('name', 'id')->toArray())
->descriptions(Plan::options())
->icons(fn () => Plan::pluck('icon', 'id')->toArray())
->required()
->default(1)
->disabled()
->iconPosition(IconPosition::Before) // Before | After
->iconSize(IconSize::ExtraLarge)
->alignment(Alignment::Center) // Start | Center | End
->padding('p-2') // Padding around the deck
->extraCardsAttributes([
'class' => 'rounded-xl drop-shadow-xl mt-1',
])
->extraOptionsAttributes([
'class' => 'text-2xl font-black tracking-tight lg:text-3xl',
])
->colors('primary')
->columns(3)
->columnSpanFull(),
]),
Wizard\Step::make('AGB')
->icon('lucide-receipt-text')
->description(' Allgemein Geschäftsbedignugen')
@@ -136,8 +183,9 @@ class Register extends BaseRegister
Fieldset::make('Bitte lesen und akzeptieren Sie die allgemeinen Geschäftsbedignungen um die Registrierung abzuschließen.')
->schema([
Checkbox::make('agb_akzeptiert')
->default(false)
->label('ABG akzeptieren')
->required(),
->accepted(),
]),
View::make('pages.agb'),
@@ -30,7 +30,8 @@ class KontoForm
Tab::make('Zahlungsplan')
->schema([
RadioDeck::make('plan_id')
->label('Wählen sie eine Option')
// ->label('Wählen sie eine Option')
->label('Zur Zeit bieten wie nur eine Zahlung per Gutachten an.')
->options(fn () => Plan::pluck('name', 'id')->toArray())
->descriptions(Plan::options())
->icons(fn () => Plan::pluck('icon', 'id')->toArray())
@@ -39,15 +40,12 @@ class KontoForm
->iconSize(IconSize::TwoExtraLarge)
->alignment(Alignment::Center) // Start | Center | End
->padding('px-4 py-6') // Padding around the deck
->extraCardsAttributes([ // Extra attributes for card elements
->extraCardsAttributes([
'class' => 'rounded-xl drop-shadow-xl mt-1',
])
->extraOptionsAttributes([ // Extra attributes for option elements
'class' => 'text-2xl md:text-3xl font-black tracking-tight lg:text-4xl',
->extraOptionsAttributes([
'class' => 'text-2xl font-black tracking-tight lg:text-3xl',
])
// ->extraDescriptionsAttributes([ // Extra attributes for description elements
// 'class' => 'text-sm font-light',
// ])
->colors('primary')
->columns(3)
->columnSpanFull(),
@@ -28,7 +28,6 @@ class KontosTable
->color('primary')
->icon(fn (string $state): string => $state)
->extraAttributes(['class' => 'rounded-xl border border-gray-200 dark:border-gray-700 drop-shadow-xl']),
TextColumn::make('plan.name')
->label('Zahlungs Plan')
->description(fn ($record): string => $record->plan->payment),