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;
|
||||
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Table;
|
||||
@@ -21,12 +19,7 @@ class AuftraggebersTable
|
||||
//
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
])
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
EditAction::make()->iconButton()->color('gray'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -3,8 +3,6 @@
|
||||
namespace App\Filament\Resources\Gutachters;
|
||||
|
||||
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\Schemas\GutachterForm;
|
||||
use App\Filament\Resources\Gutachters\Tables\GutachtersTable;
|
||||
@@ -14,7 +12,6 @@ use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Tables\Table;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||
|
||||
class GutachterResource extends Resource
|
||||
{
|
||||
@@ -55,19 +52,9 @@ class GutachterResource extends Resource
|
||||
{
|
||||
return [
|
||||
'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
|
||||
{
|
||||
return parent::getEloquentQuery()->where('konto_id', auth()->user()->konto_id);
|
||||
|
||||
@@ -2,13 +2,8 @@
|
||||
|
||||
namespace App\Filament\Resources\Gutachters\Tables;
|
||||
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\ForceDeleteBulkAction;
|
||||
use Filament\Actions\RestoreBulkAction;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Filters\TrashedFilter;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class GutachtersTable
|
||||
@@ -20,18 +15,8 @@ class GutachtersTable
|
||||
TextColumn::make('name'),
|
||||
TextColumn::make('email')->copyable()->label('E-Mail'),
|
||||
])
|
||||
->filters([
|
||||
TrashedFilter::make(),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
])
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
ForceDeleteBulkAction::make(),
|
||||
RestoreBulkAction::make(),
|
||||
]),
|
||||
EditAction::make()->iconButton()->color('gray'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -21,11 +21,11 @@ class KontoForm
|
||||
->components([
|
||||
ImageRadioGroup::make('plan_id')
|
||||
->animation(true)
|
||||
->disk('public')
|
||||
->disk('promotion')
|
||||
->label('Plan')
|
||||
->required()
|
||||
->columnSpanFull()
|
||||
->options(fn () => Plan::pluck('file', 'id')->toArray()),
|
||||
->options(fn () => Plan::pluck('promotion', 'id')->toArray()),
|
||||
Section::make('Firma')
|
||||
->inlineLabel()
|
||||
->schema([
|
||||
|
||||
@@ -41,9 +41,9 @@ class KontosTable
|
||||
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make()->label('')->color('gray'),
|
||||
EditAction::make()->iconButton()->color('gray'),
|
||||
Action::make('Laden')
|
||||
->label('')
|
||||
->iconButton()
|
||||
->color('gray')
|
||||
->icon('heroicon-o-credit-card')
|
||||
->schema([
|
||||
|
||||
@@ -19,6 +19,8 @@ class PermissionResource extends Resource
|
||||
|
||||
protected static ?string $cluster = AdministrationCluster::class;
|
||||
|
||||
protected static ?int $navigationSort = 2;
|
||||
|
||||
protected static string|UnitEnum|null $navigationGroup = 'Kunden';
|
||||
|
||||
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 ?int $navigationSort = 1;
|
||||
|
||||
protected static ?string $navigationLabel = 'Zahlungsplan';
|
||||
|
||||
protected static ?string $modelLabel = 'Zahlungsplan';
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\Plans\Schemas;
|
||||
|
||||
use Filament\Forms\Components\FileUpload;
|
||||
use Filament\Forms\Components\Textarea;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Schemas\Schema;
|
||||
@@ -15,10 +16,12 @@ class PlanForm
|
||||
TextInput::make('name')->required(),
|
||||
TextInput::make('payment')->label('Zahlung')->required(),
|
||||
Textarea::make('description')->label('Beschreibung')->required(),
|
||||
TextInput::make('preis')->required()->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(),
|
||||
FileUpload::make('promotion')->disk('promotion'),
|
||||
])->inlineLabel()->columns(1);
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace App\Filament\Resources\Plans\Tables;
|
||||
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Tables\Columns\ImageColumn;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
@@ -12,6 +13,7 @@ class PlansTable
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
ImageColumn::make('promotion')->imageHeight(100)->disk('promotion'),
|
||||
TextColumn::make('name')
|
||||
->description(fn ($record): string => $record->description)
|
||||
->wrap(),
|
||||
@@ -23,7 +25,7 @@ class PlansTable
|
||||
TextColumn::make('preis')->money('EUR'),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
EditAction::make()->iconButton()->color('gray'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,11 +2,7 @@
|
||||
|
||||
namespace App\Filament\Resources\Users\Tables;
|
||||
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\ForceDeleteBulkAction;
|
||||
use Filament\Actions\RestoreBulkAction;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Filament\Tables\Columns\IconColumn;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
@@ -33,14 +29,7 @@ class UsersTable
|
||||
TrashedFilter::make()->visible(fn () => auth()->user()->hasRole('super_admin')),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
])
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
ForceDeleteBulkAction::make(),
|
||||
RestoreBulkAction::make(),
|
||||
])->visible(fn () => auth()->user()->hasRole('super_admin')),
|
||||
EditAction::make()->iconButton()->color('gray'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
+5
-2
@@ -16,7 +16,10 @@ class Plan extends Model
|
||||
'payment',
|
||||
'description',
|
||||
'preis',
|
||||
'number_user',
|
||||
'number_gutachter',
|
||||
'limit_user',
|
||||
'limit_auftraggeber',
|
||||
'limit_gutachter',
|
||||
'limit_gutachten',
|
||||
'promotion',
|
||||
];
|
||||
}
|
||||
@@ -91,7 +91,9 @@ class AdminPanelProvider extends PanelProvider
|
||||
AppUserVerifiedMiddleware::class,
|
||||
Authenticate::class,
|
||||
])->plugins([
|
||||
FilamentShieldPlugin::make(),
|
||||
FilamentShieldPlugin::make()
|
||||
->navigationSort(10)
|
||||
->navigationBadge('3'),
|
||||
FilamentBackgroundsPlugin::make()
|
||||
->imageProvider(
|
||||
MyImages::make()
|
||||
|
||||
@@ -47,6 +47,14 @@ return [
|
||||
'report' => false,
|
||||
],
|
||||
|
||||
'promotion' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app/public/promotion'),
|
||||
'url' => env('APP_URL').'/storage/promotion',
|
||||
'visibility' => 'public',
|
||||
'throw' => false,
|
||||
],
|
||||
|
||||
's3' => [
|
||||
'driver' => 's3',
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
|
||||
@@ -16,7 +16,7 @@ return new class extends Migration
|
||||
$table->string('name')->nullable();
|
||||
$table->string('payment')->nullable();
|
||||
$table->string('description')->nullable();
|
||||
$table->string('file')->nullable();
|
||||
$table->string('promotion')->nullable();
|
||||
$table->integer('preis')->default(0);
|
||||
$table->integer('limit_user')->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