promotion image, rolles nav
This commit is contained in:
1 parent
604700cd96
commit
638da30ef2
18 files changed
+34
-58
No files matched your search
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
namespace App\Filament\Resources\Auftraggebers\Tables;
|
namespace App\Filament\Resources\Auftraggebers\Tables;
|
||||||
|
|
||||||
use Filament\Actions\BulkActionGroup;
|
|
||||||
use Filament\Actions\DeleteBulkAction;
|
|
||||||
use Filament\Actions\EditAction;
|
use Filament\Actions\EditAction;
|
||||||
use Filament\Tables\Columns\TextColumn;
|
use Filament\Tables\Columns\TextColumn;
|
||||||
use Filament\Tables\Table;
|
use Filament\Tables\Table;
|
||||||
@@ -21,12 +19,7 @@ class AuftraggebersTable
|
|||||||
//
|
//
|
||||||
])
|
])
|
||||||
->recordActions([
|
->recordActions([
|
||||||
EditAction::make(),
|
EditAction::make()->iconButton()->color('gray'),
|
||||||
])
|
|
||||||
->toolbarActions([
|
|
||||||
BulkActionGroup::make([
|
|
||||||
DeleteBulkAction::make(),
|
|
||||||
]),
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,8 +3,6 @@
|
|||||||
namespace App\Filament\Resources\Gutachters;
|
namespace App\Filament\Resources\Gutachters;
|
||||||
|
|
||||||
use App\Filament\Clusters\Verwaltung\VerwaltungCluster;
|
use App\Filament\Clusters\Verwaltung\VerwaltungCluster;
|
||||||
use App\Filament\Resources\Gutachters\Pages\CreateGutachter;
|
|
||||||
use App\Filament\Resources\Gutachters\Pages\EditGutachter;
|
|
||||||
use App\Filament\Resources\Gutachters\Pages\ListGutachters;
|
use App\Filament\Resources\Gutachters\Pages\ListGutachters;
|
||||||
use App\Filament\Resources\Gutachters\Schemas\GutachterForm;
|
use App\Filament\Resources\Gutachters\Schemas\GutachterForm;
|
||||||
use App\Filament\Resources\Gutachters\Tables\GutachtersTable;
|
use App\Filament\Resources\Gutachters\Tables\GutachtersTable;
|
||||||
@@ -14,7 +12,6 @@ use Filament\Resources\Resource;
|
|||||||
use Filament\Schemas\Schema;
|
use Filament\Schemas\Schema;
|
||||||
use Filament\Tables\Table;
|
use Filament\Tables\Table;
|
||||||
use Illuminate\Database\Eloquent\Builder;
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
|
||||||
|
|
||||||
class GutachterResource extends Resource
|
class GutachterResource extends Resource
|
||||||
{
|
{
|
||||||
@@ -55,19 +52,9 @@ class GutachterResource extends Resource
|
|||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'index' => ListGutachters::route('/'),
|
'index' => ListGutachters::route('/'),
|
||||||
'create' => CreateGutachter::route('/create'),
|
|
||||||
'edit' => EditGutachter::route('/{record}/edit'),
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getRecordRouteBindingEloquentQuery(): Builder
|
|
||||||
{
|
|
||||||
return parent::getRecordRouteBindingEloquentQuery()
|
|
||||||
->withoutGlobalScopes([
|
|
||||||
SoftDeletingScope::class,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static function getEloquentQuery(): Builder
|
public static function getEloquentQuery(): Builder
|
||||||
{
|
{
|
||||||
return parent::getEloquentQuery()->where('konto_id', auth()->user()->konto_id);
|
return parent::getEloquentQuery()->where('konto_id', auth()->user()->konto_id);
|
||||||
|
|||||||
@@ -2,13 +2,8 @@
|
|||||||
|
|
||||||
namespace App\Filament\Resources\Gutachters\Tables;
|
namespace App\Filament\Resources\Gutachters\Tables;
|
||||||
|
|
||||||
use Filament\Actions\BulkActionGroup;
|
|
||||||
use Filament\Actions\DeleteBulkAction;
|
|
||||||
use Filament\Actions\EditAction;
|
use Filament\Actions\EditAction;
|
||||||
use Filament\Actions\ForceDeleteBulkAction;
|
|
||||||
use Filament\Actions\RestoreBulkAction;
|
|
||||||
use Filament\Tables\Columns\TextColumn;
|
use Filament\Tables\Columns\TextColumn;
|
||||||
use Filament\Tables\Filters\TrashedFilter;
|
|
||||||
use Filament\Tables\Table;
|
use Filament\Tables\Table;
|
||||||
|
|
||||||
class GutachtersTable
|
class GutachtersTable
|
||||||
@@ -20,18 +15,8 @@ class GutachtersTable
|
|||||||
TextColumn::make('name'),
|
TextColumn::make('name'),
|
||||||
TextColumn::make('email')->copyable()->label('E-Mail'),
|
TextColumn::make('email')->copyable()->label('E-Mail'),
|
||||||
])
|
])
|
||||||
->filters([
|
|
||||||
TrashedFilter::make(),
|
|
||||||
])
|
|
||||||
->recordActions([
|
->recordActions([
|
||||||
EditAction::make(),
|
EditAction::make()->iconButton()->color('gray'),
|
||||||
])
|
|
||||||
->toolbarActions([
|
|
||||||
BulkActionGroup::make([
|
|
||||||
DeleteBulkAction::make(),
|
|
||||||
ForceDeleteBulkAction::make(),
|
|
||||||
RestoreBulkAction::make(),
|
|
||||||
]),
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -21,11 +21,11 @@ class KontoForm
|
|||||||
->components([
|
->components([
|
||||||
ImageRadioGroup::make('plan_id')
|
ImageRadioGroup::make('plan_id')
|
||||||
->animation(true)
|
->animation(true)
|
||||||
->disk('public')
|
->disk('promotion')
|
||||||
->label('Plan')
|
->label('Plan')
|
||||||
->required()
|
->required()
|
||||||
->columnSpanFull()
|
->columnSpanFull()
|
||||||
->options(fn () => Plan::pluck('file', 'id')->toArray()),
|
->options(fn () => Plan::pluck('promotion', 'id')->toArray()),
|
||||||
Section::make('Firma')
|
Section::make('Firma')
|
||||||
->inlineLabel()
|
->inlineLabel()
|
||||||
->schema([
|
->schema([
|
||||||
|
|||||||
@@ -41,9 +41,9 @@ class KontosTable
|
|||||||
|
|
||||||
])
|
])
|
||||||
->recordActions([
|
->recordActions([
|
||||||
EditAction::make()->label('')->color('gray'),
|
EditAction::make()->iconButton()->color('gray'),
|
||||||
Action::make('Laden')
|
Action::make('Laden')
|
||||||
->label('')
|
->iconButton()
|
||||||
->color('gray')
|
->color('gray')
|
||||||
->icon('heroicon-o-credit-card')
|
->icon('heroicon-o-credit-card')
|
||||||
->schema([
|
->schema([
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ class PermissionResource extends Resource
|
|||||||
|
|
||||||
protected static ?string $cluster = AdministrationCluster::class;
|
protected static ?string $cluster = AdministrationCluster::class;
|
||||||
|
|
||||||
|
protected static ?int $navigationSort = 2;
|
||||||
|
|
||||||
protected static string|UnitEnum|null $navigationGroup = 'Kunden';
|
protected static string|UnitEnum|null $navigationGroup = 'Kunden';
|
||||||
|
|
||||||
protected static string|BackedEnum|null $navigationIcon = 'lucide-key-square';
|
protected static string|BackedEnum|null $navigationIcon = 'lucide-key-square';
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ class PlanResource extends Resource
|
|||||||
|
|
||||||
protected static string|UnitEnum|null $navigationGroup = 'Kunden';
|
protected static string|UnitEnum|null $navigationGroup = 'Kunden';
|
||||||
|
|
||||||
|
protected static ?int $navigationSort = 1;
|
||||||
|
|
||||||
protected static ?string $navigationLabel = 'Zahlungsplan';
|
protected static ?string $navigationLabel = 'Zahlungsplan';
|
||||||
|
|
||||||
protected static ?string $modelLabel = 'Zahlungsplan';
|
protected static ?string $modelLabel = 'Zahlungsplan';
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Filament\Resources\Plans\Schemas;
|
namespace App\Filament\Resources\Plans\Schemas;
|
||||||
|
|
||||||
|
use Filament\Forms\Components\FileUpload;
|
||||||
use Filament\Forms\Components\Textarea;
|
use Filament\Forms\Components\Textarea;
|
||||||
use Filament\Forms\Components\TextInput;
|
use Filament\Forms\Components\TextInput;
|
||||||
use Filament\Schemas\Schema;
|
use Filament\Schemas\Schema;
|
||||||
@@ -15,10 +16,12 @@ class PlanForm
|
|||||||
TextInput::make('name')->required(),
|
TextInput::make('name')->required(),
|
||||||
TextInput::make('payment')->label('Zahlung')->required(),
|
TextInput::make('payment')->label('Zahlung')->required(),
|
||||||
Textarea::make('description')->label('Beschreibung')->required(),
|
Textarea::make('description')->label('Beschreibung')->required(),
|
||||||
|
TextInput::make('preis')->required()->numeric(),
|
||||||
TextInput::make('limit_user')->required()->label('Anzahl Benutzer')->numeric(),
|
TextInput::make('limit_user')->required()->label('Anzahl Benutzer')->numeric(),
|
||||||
TextInput::make('limit_auftraggeber')->required()->label('Anzahl Auftraggeber')->numeric(),
|
TextInput::make('limit_auftraggeber')->required()->label('Anzahl Auftraggeber')->numeric(),
|
||||||
TextInput::make('limit_gutachter')->required()->label('Anzahl Gutachter')->numeric(),
|
TextInput::make('limit_gutachter')->required()->label('Anzahl Gutachter')->numeric(),
|
||||||
TextInput::make('limit_gutachten')->required()->label('Anzahl Projekte')->numeric(),
|
TextInput::make('limit_gutachten')->required()->label('Anzahl Projekte')->numeric(),
|
||||||
|
FileUpload::make('promotion')->disk('promotion'),
|
||||||
])->inlineLabel()->columns(1);
|
])->inlineLabel()->columns(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
namespace App\Filament\Resources\Plans\Tables;
|
namespace App\Filament\Resources\Plans\Tables;
|
||||||
|
|
||||||
use Filament\Actions\EditAction;
|
use Filament\Actions\EditAction;
|
||||||
|
use Filament\Tables\Columns\ImageColumn;
|
||||||
use Filament\Tables\Columns\TextColumn;
|
use Filament\Tables\Columns\TextColumn;
|
||||||
use Filament\Tables\Table;
|
use Filament\Tables\Table;
|
||||||
|
|
||||||
@@ -12,6 +13,7 @@ class PlansTable
|
|||||||
{
|
{
|
||||||
return $table
|
return $table
|
||||||
->columns([
|
->columns([
|
||||||
|
ImageColumn::make('promotion')->imageHeight(100)->disk('promotion'),
|
||||||
TextColumn::make('name')
|
TextColumn::make('name')
|
||||||
->description(fn ($record): string => $record->description)
|
->description(fn ($record): string => $record->description)
|
||||||
->wrap(),
|
->wrap(),
|
||||||
@@ -23,7 +25,7 @@ class PlansTable
|
|||||||
TextColumn::make('preis')->money('EUR'),
|
TextColumn::make('preis')->money('EUR'),
|
||||||
])
|
])
|
||||||
->recordActions([
|
->recordActions([
|
||||||
EditAction::make(),
|
EditAction::make()->iconButton()->color('gray'),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Filament\Resources\Users\Tables;
|
namespace App\Filament\Resources\Users\Tables;
|
||||||
|
|
||||||
use Filament\Actions\BulkActionGroup;
|
|
||||||
use Filament\Actions\DeleteBulkAction;
|
|
||||||
use Filament\Actions\EditAction;
|
use Filament\Actions\EditAction;
|
||||||
use Filament\Actions\ForceDeleteBulkAction;
|
|
||||||
use Filament\Actions\RestoreBulkAction;
|
|
||||||
use Filament\Support\Icons\Heroicon;
|
use Filament\Support\Icons\Heroicon;
|
||||||
use Filament\Tables\Columns\IconColumn;
|
use Filament\Tables\Columns\IconColumn;
|
||||||
use Filament\Tables\Columns\TextColumn;
|
use Filament\Tables\Columns\TextColumn;
|
||||||
@@ -33,14 +29,7 @@ class UsersTable
|
|||||||
TrashedFilter::make()->visible(fn () => auth()->user()->hasRole('super_admin')),
|
TrashedFilter::make()->visible(fn () => auth()->user()->hasRole('super_admin')),
|
||||||
])
|
])
|
||||||
->recordActions([
|
->recordActions([
|
||||||
EditAction::make(),
|
EditAction::make()->iconButton()->color('gray'),
|
||||||
])
|
|
||||||
->toolbarActions([
|
|
||||||
BulkActionGroup::make([
|
|
||||||
DeleteBulkAction::make(),
|
|
||||||
ForceDeleteBulkAction::make(),
|
|
||||||
RestoreBulkAction::make(),
|
|
||||||
])->visible(fn () => auth()->user()->hasRole('super_admin')),
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+5
-2
@@ -16,7 +16,10 @@ class Plan extends Model
|
|||||||
'payment',
|
'payment',
|
||||||
'description',
|
'description',
|
||||||
'preis',
|
'preis',
|
||||||
'number_user',
|
'limit_user',
|
||||||
'number_gutachter',
|
'limit_auftraggeber',
|
||||||
|
'limit_gutachter',
|
||||||
|
'limit_gutachten',
|
||||||
|
'promotion',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -91,7 +91,9 @@ class AdminPanelProvider extends PanelProvider
|
|||||||
AppUserVerifiedMiddleware::class,
|
AppUserVerifiedMiddleware::class,
|
||||||
Authenticate::class,
|
Authenticate::class,
|
||||||
])->plugins([
|
])->plugins([
|
||||||
FilamentShieldPlugin::make(),
|
FilamentShieldPlugin::make()
|
||||||
|
->navigationSort(10)
|
||||||
|
->navigationBadge('3'),
|
||||||
FilamentBackgroundsPlugin::make()
|
FilamentBackgroundsPlugin::make()
|
||||||
->imageProvider(
|
->imageProvider(
|
||||||
MyImages::make()
|
MyImages::make()
|
||||||
|
|||||||
@@ -47,6 +47,14 @@ return [
|
|||||||
'report' => false,
|
'report' => false,
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'promotion' => [
|
||||||
|
'driver' => 'local',
|
||||||
|
'root' => storage_path('app/public/promotion'),
|
||||||
|
'url' => env('APP_URL').'/storage/promotion',
|
||||||
|
'visibility' => 'public',
|
||||||
|
'throw' => false,
|
||||||
|
],
|
||||||
|
|
||||||
's3' => [
|
's3' => [
|
||||||
'driver' => 's3',
|
'driver' => 's3',
|
||||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ return new class extends Migration
|
|||||||
$table->string('name')->nullable();
|
$table->string('name')->nullable();
|
||||||
$table->string('payment')->nullable();
|
$table->string('payment')->nullable();
|
||||||
$table->string('description')->nullable();
|
$table->string('description')->nullable();
|
||||||
$table->string('file')->nullable();
|
$table->string('promotion')->nullable();
|
||||||
$table->integer('preis')->default(0);
|
$table->integer('preis')->default(0);
|
||||||
$table->integer('limit_user')->default(1);
|
$table->integer('limit_user')->default(1);
|
||||||
$table->integer('limit_auftraggeber')->default(1);
|
$table->integer('limit_auftraggeber')->default(1);
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 230 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 210 KiB |
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 164 KiB |
Reference in new issue
Block a user