This commit is contained in:
salam committed 2025-09-26 05:34:32 +02:00
1 parent 60249dffd9
commit 1d16946f20
18 files changed
+56 -86

No files matched your search

@@ -44,34 +44,36 @@ class KontosTable
TextColumn::make('company')->label('Firma')
->description(fn ($record): string => $record->address.', '.$record->location),
TextColumn::make('option.name')
TextColumn::make('plan.name')
->icon(Heroicon::CurrencyEuro)
// ->iconColor('success')
// ->badge()
->label('Plan')
->description(fn ($record): string => $record->option->payment_plan->name),
->description(fn ($record): string => $record->plan->description)
->wrap(),
TextColumn::make('gutachten_abgeschlossen')
TextColumn::make('guthaben')
->size(TextSize::Large)
->weight(FontWeight::Bold)
->label('Abgeschlossen')
->label('Fertig')
->color('primary')
->description('Gutachten')
->alignCenter(),
TextColumn::make('gutachten_zahl')
TextColumn::make('abgeschlossen')
->size(TextSize::Large)
->weight(FontWeight::Bold)
->label('Freigeschalted')
->label('Kredit')
->color('success')
->description('Gutachten')
->alignCenter(),
])
->recordActions([
EditAction::make(),
EditAction::make()->label(''),
Action::make('Laden')
->label('')
->icon('heroicon-o-credit-card')
->color('warning')
->color('danger')
->schema([
TextInput::make('subject')->required(),
RichEditor::make('body')->required(),
@@ -3,8 +3,6 @@
namespace App\Filament\Resources\Methodes;
use App\Filament\Clusters\Administration\AdministrationCluster;
use App\Filament\Resources\Methodes\Pages\CreateMethode;
use App\Filament\Resources\Methodes\Pages\EditMethode;
use App\Filament\Resources\Methodes\Pages\ListMethodes;
use App\Filament\Resources\Methodes\Schemas\MethodeForm;
use App\Filament\Resources\Methodes\Tables\MethodesTable;
@@ -43,19 +41,10 @@ class MethodeResource extends Resource
return MethodesTable::configure($table);
}
public static function getRelations(): array
{
return [
//
];
}
public static function getPages(): array
{
return [
'index' => ListMethodes::route('/'),
'create' => CreateMethode::route('/create'),
'edit' => EditMethode::route('/{record}/edit'),
];
}
@@ -13,7 +13,7 @@ class EditMethode extends EditRecord
protected function getHeaderActions(): array
{
return [
DeleteAction::make(),
// DeleteAction::make(),
];
}
}
@@ -13,7 +13,7 @@ class ListMethodes extends ListRecords
protected function getHeaderActions(): array
{
return [
CreateAction::make(),
// CreateAction::make(),
];
}
}
@@ -13,7 +13,7 @@ class EditPermission extends EditRecord
protected function getHeaderActions(): array
{
return [
DeleteAction::make(),
// DeleteAction::make(),
];
}
}
@@ -13,7 +13,7 @@ class ListPermissions extends ListRecords
protected function getHeaderActions(): array
{
return [
CreateAction::make(),
// CreateAction::make(),
];
}
}
@@ -3,8 +3,6 @@
namespace App\Filament\Resources\Permissions;
use App\Filament\Clusters\Administration\AdministrationCluster;
use App\Filament\Resources\Permissions\Pages\CreatePermission;
use App\Filament\Resources\Permissions\Pages\EditPermission;
use App\Filament\Resources\Permissions\Pages\ListPermissions;
use App\Filament\Resources\Permissions\Schemas\PermissionForm;
use App\Filament\Resources\Permissions\Tables\PermissionsTable;
@@ -23,7 +21,7 @@ class PermissionResource extends Resource
protected static string|UnitEnum|null $navigationGroup = 'Kunden';
protected static string|BackedEnum|null $navigationIcon = 'lucide-toggle-right';
protected static string|BackedEnum|null $navigationIcon = 'lucide-key-square';
protected static ?string $recordTitleAttribute = 'name';
@@ -43,19 +41,10 @@ class PermissionResource extends Resource
return PermissionsTable::configure($table);
}
public static function getRelations(): array
{
return [
//
];
}
public static function getPages(): array
{
return [
'index' => ListPermissions::route('/'),
'create' => CreatePermission::route('/create'),
'edit' => EditPermission::route('/{record}/edit'),
];
}
@@ -2,9 +2,6 @@
namespace App\Filament\Resources\Permissions\Tables;
use Filament\Actions\BulkActionGroup;
use Filament\Actions\DeleteBulkAction;
use Filament\Actions\EditAction;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Table;
@@ -14,18 +11,7 @@ class PermissionsTable
{
return $table
->columns([
TextColumn::make('name'),
])
->filters([
//
])
->recordActions([
EditAction::make(),
])
->toolbarActions([
BulkActionGroup::make([
DeleteBulkAction::make(),
]),
TextColumn::make('name')->searchable(),
]);
}
}
@@ -13,7 +13,7 @@ class ListPlans extends ListRecords
protected function getHeaderActions(): array
{
return [
CreateAction::make(),
// CreateAction::make(),
];
}
}
+1 -12
View File
@@ -3,8 +3,6 @@
namespace App\Filament\Resources\Plans;
use App\Filament\Clusters\Administration\AdministrationCluster;
use App\Filament\Resources\Plans\Pages\CreatePlan;
use App\Filament\Resources\Plans\Pages\EditPlan;
use App\Filament\Resources\Plans\Pages\ListPlans;
use App\Filament\Resources\Plans\Schemas\PlanForm;
use App\Filament\Resources\Plans\Tables\PlansTable;
@@ -19,7 +17,7 @@ class PlanResource extends Resource
{
protected static ?string $model = Plan::class;
protected static string|BackedEnum|null $navigationIcon = 'lucide-key-square';
protected static string|BackedEnum|null $navigationIcon = 'heroicon-o-banknotes';
protected static ?string $cluster = AdministrationCluster::class;
@@ -41,19 +39,10 @@ class PlanResource extends Resource
return PlansTable::configure($table);
}
public static function getRelations(): array
{
return [
//
];
}
public static function getPages(): array
{
return [
'index' => ListPlans::route('/'),
'create' => CreatePlan::route('/create'),
'edit' => EditPlan::route('/{record}/edit'),
];
}
@@ -2,6 +2,8 @@
namespace App\Filament\Resources\Plans\Schemas;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Schemas\Schema;
class PlanForm
@@ -10,7 +12,11 @@ class PlanForm
{
return $schema
->components([
//
]);
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(),
])->inlineLabel()->columns(1);
}
}
@@ -2,9 +2,8 @@
namespace App\Filament\Resources\Plans\Tables;
use Filament\Actions\BulkActionGroup;
use Filament\Actions\DeleteBulkAction;
use Filament\Actions\EditAction;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Table;
class PlansTable
@@ -13,18 +12,15 @@ class PlansTable
{
return $table
->columns([
//
])
->filters([
//
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('preis')->money('EUR'),
])
->recordActions([
EditAction::make(),
])
->toolbarActions([
BulkActionGroup::make([
DeleteBulkAction::make(),
]),
]);
}
}
@@ -17,6 +17,7 @@ class UsersTable
{
return $table
->columns([
TextColumn::make('gender')->label('Geschlecht'),
TextColumn::make('name'),
TextColumn::make('konto.company')->badge(),
TextColumn::make('email')->copyable()->label('E-Mail'),
+1 -1
View File
@@ -42,6 +42,6 @@ class Konto extends Model
public function plan(): HasOne
{
return $this->hasOne(Plan::class);
return $this->hasOne(Plan::class, 'id', 'plan_id');
}
}
+13 -1
View File
@@ -6,5 +6,17 @@ use Illuminate\Database\Eloquent\Model;
class Plan extends Model
{
//
/**
* The attributes that are mass assignable.
*
* @var list<string>
*/
protected $fillable = [
'name',
'payment',
'description',
'preis',
'number_user',
'number_gutachter',
];
}
@@ -15,10 +15,10 @@ return new class extends Migration
$table->id();
$table->string('name')->nullable();
$table->string('payment')->nullable();
$table->string('description')->nullable();
$table->string('gutachten')->nullable();
$table->integer('preis')->default(0);
$table->integer('number_user')->default(1);
$table->integer('number_gutachter')->default(1);
$table->integer('payment_id')->default(1);
$table->timestamps();
});
}
+4 -4
View File
@@ -12,11 +12,11 @@ class PlansSeeder extends Seeder
*/
public function run(): void
{
$sql = "INSERT INTO `plans` (`id`, `name`, `payment`, `description`, `number_user`, `number_gutachter`, `payment_id`, `created_at`, `updated_at`)
$sql = "INSERT INTO `plans` (`id`, `name`, `payment`, `gutachten`, `preis`, `number_user`, `number_gutachter`, `created_at`, `updated_at`)
VALUES
('1', 'Basic', 'Pro Gutachten', 'Basis Version für einen Benutzer und einem Gutacher.', '1', '1', '1', NULL, NULL),
('2', 'Erweitert', 'Monatlich', 'Premium Version für 3 Benutzer und 3 Gutacher.', '3', '3', '2', NULL, NULL),
('3', 'Premium', 'Jährlich', 'Premium Version für fünf Benutzer und fünf Gutacher. \nUnbegrenzte Anzahl der Gutachten.', '5', '5', '3', NULL, NULL);
('1', 'Einfach', 'Per Gutachten', 'Per Stück', '75', '1', '1', NULL, NULL),
('2', 'Erweitert', 'Monatlich', 'Unbegrenzt', '150', '3', '1', NULL, NULL),
('3', 'Vollversion', 'Jährlich', 'Unbegrenzt', '1750', '5', '10', NULL, NULL);
";
DB::unprepared($sql);
}
+2 -2
View File
@@ -1,7 +1,7 @@
<footer class="fixed bottom-0 right-0 left-0 z-20 p-4">
<a href="https://webwerkstatt.tirol" target="_blank"
class="w-60 mx-auto cursor-pointer text-xs bg-white dark:bg-black px-2 rounded-sm opacity-70 flex">
<span>&copy 2007-{{ date('Y') }} &middot; </span>
class="w-72 mx-auto cursor-pointer text-xs bg-white dark:bg-black justify-center rounded-sm opacity-70 flex border border-gray-300 dark:border-gray-600">
<span>v3.0 - &copy 2007-{{ date('Y') }} &middot; </span>
<span class=" tracking-tight text-xs ml-1 font-bold">
Web<span class="text-primary-800 dark:text-primary-600 font-black">Werkstatt</span><span
class="text-black dark:text-slate-400 font-light">.tirol</span>