promotion wip

This commit is contained in:
salam committed 2025-09-28 13:34:36 +02:00
1 parent 61594777d7
commit 3c5698a550
17 files changed
+176 -303

No files matched your search

@@ -2,15 +2,15 @@
namespace App\Filament\Resources\Kontos\Schemas;
use Alkoumi\FilamentImageRadioButton\Forms\Components\ImageRadioGroup;
use App\Models\Konto;
use App\Models\Plan;
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
@@ -19,24 +19,13 @@ class KontoForm
{
return $schema
->components([
RadioCards::make('plan_id')
->label('Zahlungsplan')
->columns(3)
->options([
1 => 'Einsteiger ',
2 => 'Gelegentlich',
3 => 'Viel in Verwendung',
])
->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(),
ImageRadioGroup::make('plan_id')
->animation(true)
->disk('public')
->label('Plan')
->required()
->columnSpanFull()
->options(fn () => Plan::pluck('file', 'id')->toArray()),
Section::make('Firma')
->inlineLabel()
->schema([
@@ -41,8 +41,10 @@ class KontosTable
])
->recordActions([
EditAction::make(),
EditAction::make()->label('')->color('gray'),
Action::make('Laden')
->label('')
->color('gray')
->icon('heroicon-o-credit-card')
->schema([
TextInput::make('subject')->required(),
@@ -15,8 +15,10 @@ class PlanForm
TextInput::make('name')->required(),
TextInput::make('payment')->label('Zahlung')->required(),
Textarea::make('description')->label('Beschreibung')->required(),
TextInput::make('number_user')->required()->label('Anzahl Benutzer')->numeric(),
TextInput::make('number_gutachter')->required()->label('Anzahl Gutachter')->numeric(),
TextInput::make('limit_user')->required()->label('Anzahl Benutzer')->numeric(),
TextInput::make('limit_auftraggeber')->required()->label('Anzahl Auftraggeber')->numeric(),
TextInput::make('limit_gutachter')->required()->label('Anzahl Gutachter')->numeric(),
TextInput::make('limit_gutachten')->required()->label('Anzahl Projekte')->numeric(),
])->inlineLabel()->columns(1);
}
}
@@ -12,11 +12,14 @@ class PlansTable
{
return $table
->columns([
TextColumn::make('name'),
TextColumn::make('payment')->label('Zahlungsart'),
TextColumn::make('gutachten')->badge()->label('Anzahl'),
TextColumn::make('number_user')->label('Benutzer')->badge(),
TextColumn::make('number_gutachter')->label('Gutachter')->badge(),
TextColumn::make('name')
->description(fn ($record): string => $record->description)
->wrap(),
TextColumn::make('payment')->label('Plan'),
TextColumn::make('limit_user')->label('B')->tooltip('Benutzer')->badge(),
TextColumn::make('limit_auftraggeber')->label('A')->tooltip('Auftraggeber')->badge(),
TextColumn::make('limit_gutachter')->label('G')->tooltip('Gutachter')->badge(),
TextColumn::make('limit_gutachten')->label('P')->tooltip('Projekte')->badge(),
TextColumn::make('preis')->money('EUR'),
])
->recordActions([
@@ -24,3 +27,9 @@ class PlansTable
]);
}
}
// `file` varchar(255) DEFAULT NULL,
// `preis` int(11) NOT NULL DEFAULT 0,
// `limit_user` int(11) NOT NULL DEFAULT 1,
// `limit_auftraggeber` int(11) NOT NULL DEFAULT 1,
// `limit_gutachter` int(11) NOT NULL DEFAULT 1,
// `limit_gutachten` int(11) D