From 6e2bdee1c6c9b958acd8003af63ee88c8bfa942c Mon Sep 17 00:00:00 2001 From: Russ Long Date: Sun, 7 Aug 2022 12:48:05 -0400 Subject: [PATCH] resources and relations --- app/Filament/Resources/BiddersResource.php | 22 ++++++++- .../CheckoutRelationManager.php | 49 +++++++++++++++++++ .../VehiclesRelationManager.php | 49 +++++++++++++++++++ .../WinningBidsRelationManager.php | 49 +++++++++++++++++++ .../Resources/CarShowCategoryResource.php | 1 - .../Resources/CarShowWinnerResource.php | 21 ++++++-- .../AwardCategoryRelationManager.php | 49 +++++++++++++++++++ .../AwardVehicleRelationManager.php | 49 +++++++++++++++++++ app/Filament/Resources/CheckoutResource.php | 4 ++ .../BiddersRelationManager.php | 49 +++++++++++++++++++ .../PaymentMethodRelationManager.php | 49 +++++++++++++++++++ app/Filament/Resources/ItemsResource.php | 4 ++ .../WinningBidsRelationManager.php | 49 +++++++++++++++++++ .../VehicleScoresRelationManager.php | 49 +++++++++++++++++++ .../Resources/PaymentMethodsResource.php | 2 + .../CheckoutRelationManager.php | 49 +++++++++++++++++++ .../Resources/PeoplesChoiceResource.php | 4 ++ .../VehiclesRelationManager.php | 49 +++++++++++++++++++ .../Resources/VehicleScoresResource.php | 4 ++ .../RelationManagers/JudgeRelationManager.php | 49 +++++++++++++++++++ .../ScoredVehicleRelationManager.php | 49 +++++++++++++++++++ app/Filament/Resources/VehiclesResource.php | 4 ++ .../CarShowWinnerRelationManager.php | 49 +++++++++++++++++++ .../VehicleOwnerRelationManager.php | 49 +++++++++++++++++++ .../VehicleScoresRelationManager.php | 49 +++++++++++++++++++ .../VehicleTypeRelationManager.php | 49 +++++++++++++++++++ .../Resources/WinningBidsResource.php | 4 ++ 27 files changed, 897 insertions(+), 6 deletions(-) create mode 100644 app/Filament/Resources/BiddersResource/RelationManagers/CheckoutRelationManager.php create mode 100644 app/Filament/Resources/BiddersResource/RelationManagers/VehiclesRelationManager.php create mode 100644 app/Filament/Resources/BiddersResource/RelationManagers/WinningBidsRelationManager.php create mode 100644 app/Filament/Resources/CarShowWinnerResource/RelationManagers/AwardCategoryRelationManager.php create mode 100644 app/Filament/Resources/CarShowWinnerResource/RelationManagers/AwardVehicleRelationManager.php create mode 100644 app/Filament/Resources/CheckoutResource/RelationManagers/BiddersRelationManager.php create mode 100644 app/Filament/Resources/CheckoutResource/RelationManagers/PaymentMethodRelationManager.php create mode 100644 app/Filament/Resources/ItemsResource/RelationManagers/WinningBidsRelationManager.php create mode 100644 app/Filament/Resources/JudgesResource/RelationManagers/VehicleScoresRelationManager.php create mode 100644 app/Filament/Resources/PaymentMethodsResource/RelationManagers/CheckoutRelationManager.php create mode 100644 app/Filament/Resources/PeoplesChoiceResource/RelationManagers/VehiclesRelationManager.php create mode 100644 app/Filament/Resources/VehicleScoresResource/RelationManagers/JudgeRelationManager.php create mode 100644 app/Filament/Resources/VehicleScoresResource/RelationManagers/ScoredVehicleRelationManager.php create mode 100644 app/Filament/Resources/VehiclesResource/RelationManagers/CarShowWinnerRelationManager.php create mode 100644 app/Filament/Resources/VehiclesResource/RelationManagers/VehicleOwnerRelationManager.php create mode 100644 app/Filament/Resources/VehiclesResource/RelationManagers/VehicleScoresRelationManager.php create mode 100644 app/Filament/Resources/VehiclesResource/RelationManagers/VehicleTypeRelationManager.php diff --git a/app/Filament/Resources/BiddersResource.php b/app/Filament/Resources/BiddersResource.php index e9b6c67..f569466 100644 --- a/app/Filament/Resources/BiddersResource.php +++ b/app/Filament/Resources/BiddersResource.php @@ -12,6 +12,8 @@ use Filament\Resources\Table; use Filament\Tables; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\SoftDeletingScope; +use Filament\Tables\Columns\TextColumn; +use Filament\Forms\Components\TextInput; class BiddersResource extends Resource { @@ -23,7 +25,15 @@ class BiddersResource extends Resource { return $form ->schema([ - // + TextInput::make('bidder_fname')->label('First Name'), + TextInput::make('bidder_lname')->label('Last Name'), + TextInput::make('bidder_addr')->label('Address'), + TextInput::make('bidder_city')->label('City'), + TextInput::make('bidder_state')->label('State'), + TextInput::make('bidder_zip')->label('Zip'), + TextInput::make('bidder_phone')->label('Phone Number'), + TextInput::make('bidder_email')->label('Email'), + TextInput::make('bidder_assigned_number')->label('Assigned Number'), ]); } @@ -31,7 +41,15 @@ class BiddersResource extends Resource { return $table ->columns([ - // + TextColumn::make('bidder_assigned_number')->sortable()->label('Assigned Number'), + TextColumn::make('bidder_fname')->sortable()->label('First Name'), + TextColumn::make('bidder_lname')->sortable()->label('Last Name'), + TextColumn::make('bidder_addr')->label('Address'), + TextColumn::make('bidder_city')->label('City'), + TextColumn::make('bidder_state')->label('State'), + TextColumn::make('bidder_zip')->label('Zip'), + TextColumn::make('bidder_phone')->label('Phone Number'), + TextColumn::make('bidder_email')->label('Email'), ]) ->filters([ // diff --git a/app/Filament/Resources/BiddersResource/RelationManagers/CheckoutRelationManager.php b/app/Filament/Resources/BiddersResource/RelationManagers/CheckoutRelationManager.php new file mode 100644 index 0000000..6ab2b2d --- /dev/null +++ b/app/Filament/Resources/BiddersResource/RelationManagers/CheckoutRelationManager.php @@ -0,0 +1,49 @@ +schema([ + Forms\Components\TextInput::make('bidder_num') + ->required() + ->maxLength(255), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('bidder_num'), + ]) + ->filters([ + // + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/BiddersResource/RelationManagers/VehiclesRelationManager.php b/app/Filament/Resources/BiddersResource/RelationManagers/VehiclesRelationManager.php new file mode 100644 index 0000000..7902722 --- /dev/null +++ b/app/Filament/Resources/BiddersResource/RelationManagers/VehiclesRelationManager.php @@ -0,0 +1,49 @@ +schema([ + Forms\Components\TextInput::make('owner') + ->required() + ->maxLength(255), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('owner'), + ]) + ->filters([ + // + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/BiddersResource/RelationManagers/WinningBidsRelationManager.php b/app/Filament/Resources/BiddersResource/RelationManagers/WinningBidsRelationManager.php new file mode 100644 index 0000000..aa0def0 --- /dev/null +++ b/app/Filament/Resources/BiddersResource/RelationManagers/WinningBidsRelationManager.php @@ -0,0 +1,49 @@ +schema([ + Forms\Components\TextInput::make('winning_bidder_num') + ->required() + ->maxLength(255), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('winning_bidder_num'), + ]) + ->filters([ + // + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/CarShowCategoryResource.php b/app/Filament/Resources/CarShowCategoryResource.php index ac77eda..ca84b6c 100644 --- a/app/Filament/Resources/CarShowCategoryResource.php +++ b/app/Filament/Resources/CarShowCategoryResource.php @@ -39,7 +39,6 @@ class CarShowCategoryResource extends Resource ->columns([ TextColumn::make('category_name')->sortable(), BooleanColumn::make('vehicle_type')->sortable(), - ]) ->filters([ // diff --git a/app/Filament/Resources/CarShowWinnerResource.php b/app/Filament/Resources/CarShowWinnerResource.php index 7f12907..60b48b2 100644 --- a/app/Filament/Resources/CarShowWinnerResource.php +++ b/app/Filament/Resources/CarShowWinnerResource.php @@ -12,6 +12,13 @@ use Filament\Resources\Table; use Filament\Tables; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\SoftDeletingScope; +use Filament\Tables\Columns\BooleanColumn; +use Filament\Tables\Columns\TextColumn; +use Filament\Forms\Components\TextInput; +use Filament\Forms\Components\Toggle; +use Filament\Forms\Components\Select; +use App\Models\Vehicles; +use App\Models\CarShowCategory; class CarShowWinnerResource extends Resource { @@ -23,7 +30,14 @@ class CarShowWinnerResource extends Resource { return $form ->schema([ - // + Select::make('vehicle') + ->label('Vehicle') + ->options(Vehicles::all()->pluck('owner', 'year', 'make', 'model', 'id')) + ->searchable(), + Select::make('category') + ->label('Category') + ->options(CarShowCategory::all()->pluck('category_name', 'vehicle_type', 'id')) + ->searchable(), ]); } @@ -31,8 +45,9 @@ class CarShowWinnerResource extends Resource { return $table ->columns([ - // - ]) + TextColumn::make('awardVehicle.owner')->label('Vehicle'), + TextColumn::make('awardCategory.category_name')->label('Category'), + ]) ->filters([ // ]) diff --git a/app/Filament/Resources/CarShowWinnerResource/RelationManagers/AwardCategoryRelationManager.php b/app/Filament/Resources/CarShowWinnerResource/RelationManagers/AwardCategoryRelationManager.php new file mode 100644 index 0000000..b2aead0 --- /dev/null +++ b/app/Filament/Resources/CarShowWinnerResource/RelationManagers/AwardCategoryRelationManager.php @@ -0,0 +1,49 @@ +schema([ + Forms\Components\TextInput::make('id') + ->required() + ->maxLength(255), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('id'), + ]) + ->filters([ + // + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/CarShowWinnerResource/RelationManagers/AwardVehicleRelationManager.php b/app/Filament/Resources/CarShowWinnerResource/RelationManagers/AwardVehicleRelationManager.php new file mode 100644 index 0000000..7233b5c --- /dev/null +++ b/app/Filament/Resources/CarShowWinnerResource/RelationManagers/AwardVehicleRelationManager.php @@ -0,0 +1,49 @@ +schema([ + Forms\Components\TextInput::make('id') + ->required() + ->maxLength(255), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('id'), + ]) + ->filters([ + // + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/CheckoutResource.php b/app/Filament/Resources/CheckoutResource.php index d93051d..3d8a497 100644 --- a/app/Filament/Resources/CheckoutResource.php +++ b/app/Filament/Resources/CheckoutResource.php @@ -12,6 +12,10 @@ use Filament\Resources\Table; use Filament\Tables; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\SoftDeletingScope; +use Filament\Tables\Columns\BooleanColumn; +use Filament\Tables\Columns\TextColumn; +use Filament\Forms\Components\TextInput; +use Filament\Forms\Components\Toggle; class CheckoutResource extends Resource { diff --git a/app/Filament/Resources/CheckoutResource/RelationManagers/BiddersRelationManager.php b/app/Filament/Resources/CheckoutResource/RelationManagers/BiddersRelationManager.php new file mode 100644 index 0000000..1f8ee3b --- /dev/null +++ b/app/Filament/Resources/CheckoutResource/RelationManagers/BiddersRelationManager.php @@ -0,0 +1,49 @@ +schema([ + Forms\Components\TextInput::make('bidder_num') + ->required() + ->maxLength(255), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('bidder_num'), + ]) + ->filters([ + // + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/CheckoutResource/RelationManagers/PaymentMethodRelationManager.php b/app/Filament/Resources/CheckoutResource/RelationManagers/PaymentMethodRelationManager.php new file mode 100644 index 0000000..7b07ac2 --- /dev/null +++ b/app/Filament/Resources/CheckoutResource/RelationManagers/PaymentMethodRelationManager.php @@ -0,0 +1,49 @@ +schema([ + Forms\Components\TextInput::make('payment_method') + ->required() + ->maxLength(255), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('payment_method'), + ]) + ->filters([ + // + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/ItemsResource.php b/app/Filament/Resources/ItemsResource.php index 85efc61..f193407 100644 --- a/app/Filament/Resources/ItemsResource.php +++ b/app/Filament/Resources/ItemsResource.php @@ -12,6 +12,10 @@ use Filament\Resources\Table; use Filament\Tables; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\SoftDeletingScope; +use Filament\Tables\Columns\BooleanColumn; +use Filament\Tables\Columns\TextColumn; +use Filament\Forms\Components\TextInput; +use Filament\Forms\Components\Toggle; class ItemsResource extends Resource { diff --git a/app/Filament/Resources/ItemsResource/RelationManagers/WinningBidsRelationManager.php b/app/Filament/Resources/ItemsResource/RelationManagers/WinningBidsRelationManager.php new file mode 100644 index 0000000..adc4afb --- /dev/null +++ b/app/Filament/Resources/ItemsResource/RelationManagers/WinningBidsRelationManager.php @@ -0,0 +1,49 @@ +schema([ + Forms\Components\TextInput::make('iditems') + ->required() + ->maxLength(255), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('iditems'), + ]) + ->filters([ + // + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/JudgesResource/RelationManagers/VehicleScoresRelationManager.php b/app/Filament/Resources/JudgesResource/RelationManagers/VehicleScoresRelationManager.php new file mode 100644 index 0000000..34054b3 --- /dev/null +++ b/app/Filament/Resources/JudgesResource/RelationManagers/VehicleScoresRelationManager.php @@ -0,0 +1,49 @@ +schema([ + Forms\Components\TextInput::make('judge') + ->required() + ->maxLength(255), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('judge'), + ]) + ->filters([ + // + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/PaymentMethodsResource.php b/app/Filament/Resources/PaymentMethodsResource.php index 33afed7..f8fc6ee 100644 --- a/app/Filament/Resources/PaymentMethodsResource.php +++ b/app/Filament/Resources/PaymentMethodsResource.php @@ -12,6 +12,8 @@ use Filament\Resources\Table; use Filament\Tables; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\SoftDeletingScope; +use Filament\Tables\Columns\TextColumn; +use Filament\Forms\Components\TextInput; class PaymentMethodsResource extends Resource { diff --git a/app/Filament/Resources/PaymentMethodsResource/RelationManagers/CheckoutRelationManager.php b/app/Filament/Resources/PaymentMethodsResource/RelationManagers/CheckoutRelationManager.php new file mode 100644 index 0000000..cca56c8 --- /dev/null +++ b/app/Filament/Resources/PaymentMethodsResource/RelationManagers/CheckoutRelationManager.php @@ -0,0 +1,49 @@ +schema([ + Forms\Components\TextInput::make('payment_method') + ->required() + ->maxLength(255), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('payment_method'), + ]) + ->filters([ + // + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/PeoplesChoiceResource.php b/app/Filament/Resources/PeoplesChoiceResource.php index b323519..e579bdc 100644 --- a/app/Filament/Resources/PeoplesChoiceResource.php +++ b/app/Filament/Resources/PeoplesChoiceResource.php @@ -12,6 +12,10 @@ use Filament\Resources\Table; use Filament\Tables; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\SoftDeletingScope; +use Filament\Tables\Columns\BooleanColumn; +use Filament\Tables\Columns\TextColumn; +use Filament\Forms\Components\TextInput; +use Filament\Forms\Components\Toggle; class PeoplesChoiceResource extends Resource { diff --git a/app/Filament/Resources/PeoplesChoiceResource/RelationManagers/VehiclesRelationManager.php b/app/Filament/Resources/PeoplesChoiceResource/RelationManagers/VehiclesRelationManager.php new file mode 100644 index 0000000..0e79ca8 --- /dev/null +++ b/app/Filament/Resources/PeoplesChoiceResource/RelationManagers/VehiclesRelationManager.php @@ -0,0 +1,49 @@ +schema([ + Forms\Components\TextInput::make('vehicle') + ->required() + ->maxLength(255), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('vehicle'), + ]) + ->filters([ + // + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/VehicleScoresResource.php b/app/Filament/Resources/VehicleScoresResource.php index 61f9ae5..6c94f05 100644 --- a/app/Filament/Resources/VehicleScoresResource.php +++ b/app/Filament/Resources/VehicleScoresResource.php @@ -12,6 +12,10 @@ use Filament\Resources\Table; use Filament\Tables; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\SoftDeletingScope; +use Filament\Tables\Columns\BooleanColumn; +use Filament\Tables\Columns\TextColumn; +use Filament\Forms\Components\TextInput; +use Filament\Forms\Components\Toggle; class VehicleScoresResource extends Resource { diff --git a/app/Filament/Resources/VehicleScoresResource/RelationManagers/JudgeRelationManager.php b/app/Filament/Resources/VehicleScoresResource/RelationManagers/JudgeRelationManager.php new file mode 100644 index 0000000..5994c79 --- /dev/null +++ b/app/Filament/Resources/VehicleScoresResource/RelationManagers/JudgeRelationManager.php @@ -0,0 +1,49 @@ +schema([ + Forms\Components\TextInput::make('judge') + ->required() + ->maxLength(255), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('judge'), + ]) + ->filters([ + // + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/VehicleScoresResource/RelationManagers/ScoredVehicleRelationManager.php b/app/Filament/Resources/VehicleScoresResource/RelationManagers/ScoredVehicleRelationManager.php new file mode 100644 index 0000000..60f58f6 --- /dev/null +++ b/app/Filament/Resources/VehicleScoresResource/RelationManagers/ScoredVehicleRelationManager.php @@ -0,0 +1,49 @@ +schema([ + Forms\Components\TextInput::make('id') + ->required() + ->maxLength(255), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('id'), + ]) + ->filters([ + // + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/VehiclesResource.php b/app/Filament/Resources/VehiclesResource.php index d9ef81f..fe4993d 100644 --- a/app/Filament/Resources/VehiclesResource.php +++ b/app/Filament/Resources/VehiclesResource.php @@ -12,6 +12,10 @@ use Filament\Resources\Table; use Filament\Tables; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\SoftDeletingScope; +use Filament\Tables\Columns\BooleanColumn; +use Filament\Tables\Columns\TextColumn; +use Filament\Forms\Components\TextInput; +use Filament\Forms\Components\Toggle; class VehiclesResource extends Resource { diff --git a/app/Filament/Resources/VehiclesResource/RelationManagers/CarShowWinnerRelationManager.php b/app/Filament/Resources/VehiclesResource/RelationManagers/CarShowWinnerRelationManager.php new file mode 100644 index 0000000..10779ad --- /dev/null +++ b/app/Filament/Resources/VehiclesResource/RelationManagers/CarShowWinnerRelationManager.php @@ -0,0 +1,49 @@ +schema([ + Forms\Components\TextInput::make('id') + ->required() + ->maxLength(255), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('id'), + ]) + ->filters([ + // + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/VehiclesResource/RelationManagers/VehicleOwnerRelationManager.php b/app/Filament/Resources/VehiclesResource/RelationManagers/VehicleOwnerRelationManager.php new file mode 100644 index 0000000..abca257 --- /dev/null +++ b/app/Filament/Resources/VehiclesResource/RelationManagers/VehicleOwnerRelationManager.php @@ -0,0 +1,49 @@ +schema([ + Forms\Components\TextInput::make('owner') + ->required() + ->maxLength(255), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('owner'), + ]) + ->filters([ + // + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/VehiclesResource/RelationManagers/VehicleScoresRelationManager.php b/app/Filament/Resources/VehiclesResource/RelationManagers/VehicleScoresRelationManager.php new file mode 100644 index 0000000..2e1711f --- /dev/null +++ b/app/Filament/Resources/VehiclesResource/RelationManagers/VehicleScoresRelationManager.php @@ -0,0 +1,49 @@ +schema([ + Forms\Components\TextInput::make('id') + ->required() + ->maxLength(255), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('id'), + ]) + ->filters([ + // + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/VehiclesResource/RelationManagers/VehicleTypeRelationManager.php b/app/Filament/Resources/VehiclesResource/RelationManagers/VehicleTypeRelationManager.php new file mode 100644 index 0000000..716f98d --- /dev/null +++ b/app/Filament/Resources/VehiclesResource/RelationManagers/VehicleTypeRelationManager.php @@ -0,0 +1,49 @@ +schema([ + Forms\Components\TextInput::make('type') + ->required() + ->maxLength(255), + ]); + } + + public static function table(Table $table): Table + { + return $table + ->columns([ + Tables\Columns\TextColumn::make('type'), + ]) + ->filters([ + // + ]) + ->headerActions([ + Tables\Actions\CreateAction::make(), + ]) + ->actions([ + Tables\Actions\EditAction::make(), + Tables\Actions\DeleteAction::make(), + ]) + ->bulkActions([ + Tables\Actions\DeleteBulkAction::make(), + ]); + } +} diff --git a/app/Filament/Resources/WinningBidsResource.php b/app/Filament/Resources/WinningBidsResource.php index 04c1945..dc8ad57 100644 --- a/app/Filament/Resources/WinningBidsResource.php +++ b/app/Filament/Resources/WinningBidsResource.php @@ -12,6 +12,10 @@ use Filament\Resources\Table; use Filament\Tables; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\SoftDeletingScope; +use Filament\Tables\Columns\BooleanColumn; +use Filament\Tables\Columns\TextColumn; +use Filament\Forms\Components\TextInput; +use Filament\Forms\Components\Toggle; class WinningBidsResource extends Resource {