payment plans wip
This commit is contained in:
1 parent
3a74e45a3a
commit
61594777d7
15 files changed
+560
-158
No files matched your search
@@ -148,7 +148,7 @@ class Register extends BaseRegister
|
||||
size="sm"
|
||||
wire:submit="register"
|
||||
>
|
||||
Register
|
||||
Registrieren
|
||||
</x-filament::button>
|
||||
BLADE))),
|
||||
|
||||
|
||||
@@ -5,8 +5,12 @@ namespace App\Filament\Resources\Kontos\Schemas;
|
||||
use App\Models\Konto;
|
||||
use Danielebarbaro\LaravelVatEuValidator\Rules\VatNumber;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Schemas\Components\Section;
|
||||
use Filament\Schemas\Schema;
|
||||
use ToneGabes\BetterOptions\Forms\Components\RadioCards;
|
||||
use ToneGabes\Filament\Icons\Enums\Phosphor;
|
||||
use Ysfkaya\FilamentPhoneInput\Forms\PhoneInput;
|
||||
|
||||
class KontoForm
|
||||
@@ -15,47 +19,68 @@ class KontoForm
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
TextInput::make('company')
|
||||
->label('Firma')
|
||||
->required(),
|
||||
TextInput::make('email')
|
||||
->label('E-Mail')
|
||||
->unique(table: Konto::class)
|
||||
->required(),
|
||||
TextInput::make('address')
|
||||
->label('Adresse')
|
||||
->required(),
|
||||
TextInput::make('location')
|
||||
->label('Ort')
|
||||
->required(),
|
||||
TextInput::make('plz')
|
||||
->label('Postleitzahl')
|
||||
->required(),
|
||||
PhoneInput::make('phone')
|
||||
->label('Telefon')
|
||||
->defaultCountry('AT'),
|
||||
TextInput::make('country')
|
||||
->label('Land')
|
||||
->default('Österreich')
|
||||
->required(),
|
||||
TextInput::make('uid_number')
|
||||
->label('UID Nummer')
|
||||
->rules([new VatNumber])
|
||||
->required(),
|
||||
TextInput::make('title')
|
||||
->label('Title')
|
||||
->required(),
|
||||
Select::make('gender')
|
||||
->label('Geschlecht')
|
||||
RadioCards::make('plan_id')
|
||||
->label('Zahlungsplan')
|
||||
->columns(3)
|
||||
->options([
|
||||
'Herr' => 'Herr',
|
||||
'Frau' => 'Frau',
|
||||
'Non-binary' => 'Non-binary',
|
||||
1 => 'Einsteiger ',
|
||||
2 => 'Gelegentlich',
|
||||
3 => 'Viel in Verwendung',
|
||||
])
|
||||
->required(),
|
||||
TextInput::make('name')
|
||||
->label('Name')
|
||||
->required(),
|
||||
->descriptions([
|
||||
1 => 'Bezahlung bei der Erstellung eines Gutachtens.',
|
||||
2 => 'Zahlung Monatlich ohne Begrenzung der Gutachten.',
|
||||
3 => 'Zahlung Jährlich, ohne Begrenzung der Mitarbeiter, Gutachter und Auftraggeber.',
|
||||
])
|
||||
->icons([
|
||||
1 => Phosphor::Airplane->thin(),
|
||||
2 => Phosphor::AirplaneTakeoff->thin(),
|
||||
3 => Phosphor::AirplaneInFlight->thin(),
|
||||
])->columnSpanFull(),
|
||||
Section::make('Firma')
|
||||
->inlineLabel()
|
||||
->schema([
|
||||
TextInput::make('company')
|
||||
->label('Firma')
|
||||
->required(),
|
||||
TextInput::make('uid_number')
|
||||
->label('UID Nummer')
|
||||
->rules([new VatNumber])
|
||||
->required(),
|
||||
Textarea::make('address')
|
||||
->label('Adresse')
|
||||
->required(),
|
||||
TextInput::make('country')
|
||||
->label('Land')
|
||||
->default('Österreich')
|
||||
->required(),
|
||||
])->columnSpanFull(),
|
||||
Section::make('Kontaktperson')
|
||||
->inlineLabel()
|
||||
->schema([
|
||||
TextInput::make('title')
|
||||
->label('Title')
|
||||
->required(),
|
||||
Select::make('gender')
|
||||
->label('Geschlecht')
|
||||
->options([
|
||||
'Herr' => 'Herr',
|
||||
'Frau' => 'Frau',
|
||||
'Non-binary' => 'Non-binary',
|
||||
])
|
||||
->required(),
|
||||
TextInput::make('name')
|
||||
->label('Name')
|
||||
->required(),
|
||||
TextInput::make('email')
|
||||
->label('E-Mail')
|
||||
->unique(table: Konto::class)
|
||||
->required(),
|
||||
PhoneInput::make('phone')
|
||||
->label('Telefon')
|
||||
->defaultCountry('AT'),
|
||||
])->columnSpanFull(),
|
||||
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -8,12 +8,8 @@ use Filament\Forms\Components\RichEditor;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Support\Enums\FontWeight;
|
||||
use Filament\Support\Enums\TextSize;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Ysfkaya\FilamentPhoneInput\PhoneInputNumberType;
|
||||
use Ysfkaya\FilamentPhoneInput\Tables\PhoneColumn;
|
||||
|
||||
class KontosTable
|
||||
{
|
||||
@@ -21,30 +17,12 @@ class KontosTable
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
// TextColumn::make('id'),
|
||||
// TextColumn::make('gender')->label('Geschlecht'),
|
||||
// TextColumn::make('title')->label('Title'),
|
||||
// TextColumn::make('first_name')->label('Vorname'),
|
||||
|
||||
// PhoneColumn::make('phone')
|
||||
// ->label('Telefon')
|
||||
// ->displayFormat(PhoneInputNumberType::INTERNATIONAL),
|
||||
// TextColumn::make('email')
|
||||
// ->copyable()
|
||||
// ->copyMessage('E-Mail wurde kopiert')
|
||||
// ->copyMessageDuration(1500)
|
||||
// ->label('E-mail'),
|
||||
|
||||
TextColumn::make('company')->label('Firma')
|
||||
->description(fn ($record): string => $record->address),
|
||||
|
||||
TextColumn::make('plan.name')
|
||||
->icon(Heroicon::CurrencyEuro)
|
||||
// ->iconColor('success')
|
||||
// ->badge()
|
||||
->label('Plan')
|
||||
->description(fn ($record): string => $record->plan->payment)
|
||||
->wrap(),
|
||||
->label('Zahlungs Plan')
|
||||
->description(fn ($record): string => $record->plan->payment),
|
||||
|
||||
TextColumn::make('guthaben')
|
||||
->size(TextSize::Large)
|
||||
@@ -63,11 +41,9 @@ class KontosTable
|
||||
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make()->label(''),
|
||||
EditAction::make(),
|
||||
Action::make('Laden')
|
||||
->label('')
|
||||
->icon('heroicon-o-credit-card')
|
||||
->color('danger')
|
||||
->schema([
|
||||
TextInput::make('subject')->required(),
|
||||
RichEditor::make('body')->required(),
|
||||
|
||||
Reference in new issue
Block a user