Compare commits
89 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 05ab1c6014 | |||
| 9065dcd911 | |||
| dcd08ae530 | |||
| d468991bd1 | |||
| 7d1ec59dea | |||
| 24d1eda717 | |||
| 9d981f3a34 | |||
| b9c018a4a6 | |||
| 23b0b30434 | |||
| 4b9220c89e | |||
| 298f3fa22b | |||
| 98be7131f4 | |||
| 999c1dfc58 | |||
| a3fd278536 | |||
| 290498c728 | |||
| aca21ae115 | |||
| 982efbf2bd | |||
| 3953a6f4c8 | |||
| fbb10a01d4 | |||
| 6ccb754e0c | |||
| 50826c8c20 | |||
| 68f75ac2fc | |||
| 9587c44657 | |||
| 06de3c0145 | |||
| d2d53e961b | |||
| b0816231d6 | |||
| e4cccba942 | |||
| e023f68a84 | |||
| 4edb7fac10 | |||
| 19f93f95bb | |||
| 885161cc2b | |||
| a8fd03f256 | |||
| 00ff08e3a6 | |||
| 7e8b35bf20 | |||
| 681d8b73d6 | |||
| f294ded6e8 | |||
| eca564eac7 | |||
| e8df889f7e | |||
| ad02f65b54 | |||
| c2c9464133 | |||
| c0176f9924 | |||
| ffa8d30be4 | |||
| d64e1d5578 | |||
| ad66fef19b | |||
| 5a7684bc8c | |||
| aed29fbf56 | |||
| 816fba5121 | |||
| ddbfc642f2 | |||
| b6db2f200b | |||
| ef4ef144a6 | |||
| 7a338c6a31 | |||
| 44521ab677 | |||
| 4b6839aafa | |||
| 186865890d | |||
| cfc8f58a1e | |||
| 59f6c733ac | |||
| a4fff7aea3 | |||
| 47ae95f060 | |||
| 377cc4ab77 | |||
| 947fb290f6 | |||
| 0c794c89a4 | |||
| 55925c8abf | |||
| 20349e57c4 | |||
| 10aa32e19c | |||
| 8bd68a42bd | |||
| fc96cb96ed | |||
| d25890d3ac | |||
| f6df7aa08e | |||
| db1d4ba165 | |||
| a30b70bf27 | |||
| 193d7ecb1f | |||
| a01afdc321 | |||
| ee526dce89 | |||
| 5eea2de51e | |||
| 48fd3d2b35 | |||
| 237fe9f07b | |||
| bab18b6d26 | |||
| 6d8f2b8ead | |||
| 849794ff90 | |||
| 24beacae7e | |||
| 4283399ffa | |||
| de1443b300 | |||
| 02f0fed769 | |||
| 87f9befa72 | |||
| d32c2d6a99 | |||
| e3a64c6ba3 | |||
| 9326fb5026 | |||
| bdd06abcd1 | |||
| 72dfb16018 |
@@ -33,3 +33,13 @@ MAIL_FROM_NAME=null
|
||||
PUSHER_APP_ID=
|
||||
PUSHER_APP_KEY=
|
||||
PUSHER_APP_SECRET=
|
||||
|
||||
OIDC_BASE_URL=
|
||||
OIDC_CLIENT_ID=
|
||||
OIDC_CLIENT_SECRET=
|
||||
OIDC_REDIRECT_URI="${APP_URL}/auth/social/oidc/callback"
|
||||
|
||||
NORTH_CHECKOUT_ID=
|
||||
NORTH_PROFILE_ID=
|
||||
NORTH_PRIVATE_API_KEY=
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{"version":2,"defects":{"Tests\\Feature\\MyWinningsTest::test_mywinnings_form_is_accessible":8,"Tests\\Feature\\MyWinningsTest::test_mywinnings_results_show_correct_data":8,"Tests\\Feature\\MyWinningsTest::test_mywinnings_invalid_bidder_shows_error":8},"times":{"Tests\\Unit\\PhoneFormattingTest::it_formats_a_10_digit_phone_number":0.018,"Tests\\Unit\\PhoneFormattingTest::it_strips_non_numeric_characters_before_formatting":0,"Tests\\Unit\\PhoneFormattingTest::it_returns_original_value_if_not_10_digits":0,"Tests\\Unit\\PhoneFormattingTest::bidder_model_accessor_formats_phone_number":0.003}}
|
||||
@@ -5,8 +5,6 @@ namespace App\Filament\Resources;
|
||||
use App\Filament\Resources\BiddersResource\Pages;
|
||||
use App\Filament\Resources\BiddersResource\RelationManagers;
|
||||
use App\Models\Bidders;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
@@ -14,6 +12,12 @@ use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use UnitEnum;
|
||||
use BackedEnum;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
|
||||
class BiddersResource extends Resource
|
||||
{
|
||||
@@ -21,14 +25,14 @@ class BiddersResource extends Resource
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'idbidders';
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
protected static string | BackedEnum | null $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
|
||||
protected static ?string $navigationGroup = 'Silent Auction';
|
||||
protected static string | UnitEnum | null $navigationGroup = 'Silent Auction';
|
||||
|
||||
public static function form(Form $form): Form
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
TextInput::make('bidder_fname')->label('First Name'),
|
||||
TextInput::make('bidder_lname')->label('Last Name'),
|
||||
TextInput::make('bidder_addr')->label('Address'),
|
||||
@@ -46,25 +50,26 @@ 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'),
|
||||
TextColumn::make('bidder_assigned_number')->sortable()->label('Assigned Number')->sortable(),
|
||||
TextColumn::make('bidder_fname')->sortable()->label('First Name')->sortable(),
|
||||
TextColumn::make('bidder_lname')->sortable()->label('Last Name')->sortable(),
|
||||
TextColumn::make('bidder_addr')->label('Address')->sortable(),
|
||||
TextColumn::make('bidder_city')->label('City')->sortable(),
|
||||
TextColumn::make('bidder_state')->label('State')->sortable(),
|
||||
TextColumn::make('bidder_zip')->label('Zip')->sortable(),
|
||||
TextColumn::make('bidder_phone')->label('Phone Number')->sortable()
|
||||
->formatStateUsing(fn ($state) => \App\Helpers\PhoneHelper::format($state)),
|
||||
TextColumn::make('bidder_email')->label('Email')->sortable(),
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
])
|
||||
->defaultSort('bidder_assigned_number');
|
||||
|
||||
+21
-17
@@ -3,12 +3,18 @@
|
||||
namespace App\Filament\Resources\BiddersResource\RelationManagers;
|
||||
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
|
||||
class CheckoutRelationManager extends RelationManager
|
||||
{
|
||||
@@ -16,10 +22,10 @@ class CheckoutRelationManager extends RelationManager
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'bidder_num';
|
||||
|
||||
public function form(Form $form): Form
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
Forms\Components\TextInput::make('bidder_num')
|
||||
->required()
|
||||
->maxLength(255),
|
||||
@@ -30,30 +36,28 @@ class CheckoutRelationManager extends RelationManager
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
Tables\Columns\TextColumn::make('bidders.bidder_assigned_number')
|
||||
TextColumn::make('bidders.bidder_assigned_number')
|
||||
->label('Bidder Number')
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('winnertotal')
|
||||
TextColumn::make('winnertotal')
|
||||
->label('Total Amount')
|
||||
->money('usd', 'true')
|
||||
->money('USD')
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('paymentMethod.pm_name')
|
||||
TextColumn::make('paymentMethod.pm_name')
|
||||
->label('Payment Method')
|
||||
->sortable(),
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->headerActions([
|
||||
Tables\Actions\CreateAction::make(),
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
DeleteAction::make(),
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
Tables\Actions\DeleteAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
->toolbarActions([
|
||||
CreateAction::make(),
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
+20
-16
@@ -3,24 +3,29 @@
|
||||
namespace App\Filament\Resources\BiddersResource\RelationManagers;
|
||||
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||
use App\Models\CarShowCategory;
|
||||
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
use Filament\Tables\Columns\IconColumn;
|
||||
class VehiclesRelationManager extends RelationManager
|
||||
{
|
||||
protected static string $relationship = 'vehicles';
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'owner';
|
||||
|
||||
public function form(Form $form): Form
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
Forms\Components\TextInput::make('year')
|
||||
->label('Year'),
|
||||
Forms\Components\TextInput::make('make')
|
||||
@@ -53,10 +58,11 @@ class VehiclesRelationManager extends RelationManager
|
||||
Tables\Columns\TextColumn::make('vehicleType.category_name')
|
||||
->label('Type')
|
||||
->sortable(),
|
||||
Tables\Columns\BooleanColumn::make('doNotJudge')
|
||||
IconColumn::make('doNotJudge')
|
||||
->boolean()
|
||||
->label('Judged?')
|
||||
->sortable()
|
||||
->falseIcon('heroicon-o-badge-check')
|
||||
->falseIcon('heroicon-o-check-badge')
|
||||
->trueIcon('heroicon-o-x-circle')
|
||||
->trueColor('danger')
|
||||
->falseColor('success'),
|
||||
@@ -64,16 +70,14 @@ class VehiclesRelationManager extends RelationManager
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->headerActions([
|
||||
Tables\Actions\CreateAction::make(),
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
DeleteAction::make(),
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
Tables\Actions\DeleteAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
->toolbarActions([
|
||||
CreateAction::make(),
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
+17
-14
@@ -3,13 +3,18 @@
|
||||
namespace App\Filament\Resources\BiddersResource\RelationManagers;
|
||||
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||
use App\Models\Bidders;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
|
||||
class WinningBidsRelationManager extends RelationManager
|
||||
{
|
||||
@@ -17,10 +22,10 @@ class WinningBidsRelationManager extends RelationManager
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'winning_bidder_num';
|
||||
|
||||
public function form(Form $form): Form
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
Forms\Components\Select::make('winning_bidder_num')
|
||||
->label('Winning Bidder Number')
|
||||
->options(Bidders::pluck('bidder_assigned_number', 'idbidders'))
|
||||
@@ -40,23 +45,21 @@ class WinningBidsRelationManager extends RelationManager
|
||||
->sortable(),
|
||||
Tables\Columns\TextColumn::make('winning_cost')
|
||||
->label('Winning Bid Amt')
|
||||
->money('usd', 'true')
|
||||
->money('USD')
|
||||
->sortable(),
|
||||
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->headerActions([
|
||||
Tables\Actions\CreateAction::make(),
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
DeleteAction::make(),
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
Tables\Actions\DeleteAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
->toolbarActions([
|
||||
CreateAction::make(),
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -6,30 +6,35 @@ use App\Filament\Resources\CarShowCategoryResource\Pages;
|
||||
use App\Filament\Resources\CarShowCategoryResource\RelationManagers;
|
||||
use App\Filament\Resources\CarShowCategoryResource\RelationManagers\VehicleRelationManager;
|
||||
use App\Models\CarShowCategory;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||
use Filament\Tables\Columns\BooleanColumn;
|
||||
use Filament\Tables\Columns\IconColumn;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Components\Toggle;
|
||||
use UnitEnum;
|
||||
use BackedEnum;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
|
||||
class CarShowCategoryResource extends Resource
|
||||
{
|
||||
protected static ?string $model = CarShowCategory::class;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
protected static string | BackedEnum | null $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
|
||||
protected static ?string $navigationGroup = 'Car Show';
|
||||
protected static string | UnitEnum | null $navigationGroup = 'Car Show';
|
||||
|
||||
public static function form(Form $form): Form
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
TextInput::make('category_name'),
|
||||
Toggle::make('vehicle_type')->inline(false)
|
||||
]);
|
||||
@@ -40,17 +45,17 @@ class CarShowCategoryResource extends Resource
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('category_name')->sortable(),
|
||||
BooleanColumn::make('vehicle_type')->sortable(),
|
||||
IconColumn::make('vehicle_type')->boolean()->sortable(),
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
])
|
||||
->defaultSort('category_name');
|
||||
|
||||
+20
-17
@@ -3,13 +3,19 @@
|
||||
namespace App\Filament\Resources\CarShowCategoryResource\RelationManagers;
|
||||
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
use Filament\Actions\DissociateAction;
|
||||
use Filament\Actions\AssociateAction;
|
||||
class VehicleRelationManager extends RelationManager
|
||||
{
|
||||
protected static string $relationship = 'vehicle';
|
||||
@@ -18,10 +24,10 @@ class VehicleRelationManager extends RelationManager
|
||||
|
||||
protected static ?string $inverseRelationship = 'vehicleType';
|
||||
|
||||
public function form(Form $form): Form
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
Forms\Components\TextInput::make('id')
|
||||
->required()
|
||||
->maxLength(255),
|
||||
@@ -41,19 +47,16 @@ class VehicleRelationManager extends RelationManager
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->headerActions([
|
||||
Tables\Actions\CreateAction::make(),
|
||||
Tables\Actions\AssociateAction::make(),
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
DeleteAction::make(),
|
||||
DissociateAction::make(),
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
Tables\Actions\DeleteAction::make(),
|
||||
Tables\Actions\DissociateAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
Tables\Actions\DissociateBulkAction::make(),
|
||||
->toolbarActions([
|
||||
CreateAction::make(),
|
||||
AssociateAction::make(),
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -5,8 +5,6 @@ namespace App\Filament\Resources;
|
||||
use App\Filament\Resources\CarShowWinnerResource\Pages;
|
||||
use App\Filament\Resources\CarShowWinnerResource\RelationManagers;
|
||||
use App\Models\CarShowWinner;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
@@ -16,19 +14,25 @@ use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Forms\Components\Select;
|
||||
use App\Models\Vehicles;
|
||||
use App\Models\CarShowCategory;
|
||||
use UnitEnum;
|
||||
use BackedEnum;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
|
||||
class CarShowWinnerResource extends Resource
|
||||
{
|
||||
protected static ?string $model = CarShowWinner::class;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
protected static string | BackedEnum | null $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
|
||||
protected static ?string $navigationGroup = 'Car Show';
|
||||
protected static string | UnitEnum | null $navigationGroup = 'Car Show';
|
||||
|
||||
public static function form(Form $form): Form
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
Select::make('vehicle')
|
||||
->label('Vehicle')
|
||||
->options(Vehicles::all()->pluck('owner', 'id'))
|
||||
@@ -44,21 +48,22 @@ class CarShowWinnerResource extends Resource
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('awardCategory.category_name')->label('Category'),
|
||||
TextColumn::make('awardVehicle.owner')->label('Vehicle Number'),
|
||||
TextColumn::make('awardVehicle.year')->label('Year'),
|
||||
TextColumn::make('awardVehicle.make')->label('Make'),
|
||||
TextColumn::make('awardVehicle.model')->label('Model'),
|
||||
TextColumn::make('awardCategory.category_name')->label('Category')->sortable(),
|
||||
TextColumn::make('awardVehicle.owner')->label('Vehicle Number')->sortable(),
|
||||
TextColumn::make('total_score')->label('Total Score')->sortable(),
|
||||
TextColumn::make('awardVehicle.year')->label('Year')->sortable(),
|
||||
TextColumn::make('awardVehicle.make')->label('Make')->sortable(),
|
||||
TextColumn::make('awardVehicle.model')->label('Model')->sortable(),
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
+16
-14
@@ -3,23 +3,27 @@
|
||||
namespace App\Filament\Resources\CarShowWinnerResource\RelationManagers;
|
||||
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
class AwardCategoryRelationManager extends RelationManager
|
||||
{
|
||||
protected static string $relationship = 'awardCategory';
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'id';
|
||||
|
||||
public function form(Form $form): Form
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
Forms\Components\TextInput::make('id')
|
||||
->required()
|
||||
->maxLength(255),
|
||||
@@ -36,16 +40,14 @@ class AwardCategoryRelationManager extends RelationManager
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->headerActions([
|
||||
Tables\Actions\CreateAction::make(),
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
DeleteAction::make(),
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
Tables\Actions\DeleteAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
->toolbarActions([
|
||||
CreateAction::make(),
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
+16
-14
@@ -3,23 +3,27 @@
|
||||
namespace App\Filament\Resources\CarShowWinnerResource\RelationManagers;
|
||||
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
class AwardVehicleRelationManager extends RelationManager
|
||||
{
|
||||
protected static string $relationship = 'awardVehicle';
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'id';
|
||||
|
||||
public function form(Form $form): Form
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
Forms\Components\TextInput::make('id')
|
||||
->required()
|
||||
->maxLength(255),
|
||||
@@ -38,16 +42,14 @@ class AwardVehicleRelationManager extends RelationManager
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->headerActions([
|
||||
Tables\Actions\CreateAction::make(),
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
DeleteAction::make(),
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
Tables\Actions\DeleteAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
->toolbarActions([
|
||||
CreateAction::make(),
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -5,33 +5,36 @@ namespace App\Filament\Resources;
|
||||
use App\Filament\Resources\CheckoutResource\Pages;
|
||||
use App\Filament\Resources\CheckoutResource\RelationManagers;
|
||||
use App\Models\Checkout;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use UnitEnum;
|
||||
use BackedEnum;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables\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\Select;
|
||||
use Filament\Forms\Components\Toggle;
|
||||
use App\Models\Bidders;
|
||||
use App\Models\PaymentMethods;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
|
||||
class CheckoutResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Checkout::class;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
protected static string | BackedEnum | null $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
|
||||
protected static ?string $navigationGroup = 'Silent Auction';
|
||||
protected static string | UnitEnum | null $navigationGroup = 'Silent Auction';
|
||||
|
||||
public static function form(Form $form): Form
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
Select::make('bidder_num')
|
||||
->label('Bidder')
|
||||
->options(
|
||||
@@ -57,7 +60,7 @@ class CheckoutResource extends Resource
|
||||
->sortable(),
|
||||
TextColumn::make('winnertotal')
|
||||
->label('Total Amount')
|
||||
->money('usd', 'true')
|
||||
->money('USD')
|
||||
->sortable(),
|
||||
TextColumn::make('paymentMethod.pm_name')
|
||||
->label('Payment Method')
|
||||
@@ -66,12 +69,12 @@ class CheckoutResource extends Resource
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
])
|
||||
->defaultSort('bidders.bidder_assigned_number');
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace App\Filament\Resources\CheckoutResource\RelationManagers;
|
||||
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
@@ -16,10 +16,10 @@ class BiddersRelationManager extends RelationManager
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'bidder_num';
|
||||
|
||||
public function form(Form $form): Form
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
Forms\Components\Select::make('bidder_num')
|
||||
->label('Number')
|
||||
->required()
|
||||
|
||||
+4
-4
@@ -3,7 +3,7 @@
|
||||
namespace App\Filament\Resources\CheckoutResource\RelationManagers;
|
||||
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
@@ -16,10 +16,10 @@ class PaymentMethodRelationManager extends RelationManager
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'payment_method';
|
||||
|
||||
public function form(Form $form): Form
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
Forms\Components\TextInput::make('payment_method')
|
||||
->required()
|
||||
->maxLength(255),
|
||||
|
||||
@@ -5,30 +5,33 @@ namespace App\Filament\Resources;
|
||||
use App\Filament\Resources\ItemsResource\Pages;
|
||||
use App\Filament\Resources\ItemsResource\RelationManagers;
|
||||
use App\Models\Items;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use UnitEnum;
|
||||
use BackedEnum;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables\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\Actions\EditAction;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
|
||||
class ItemsResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Items::class;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
protected static string | BackedEnum | null $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
|
||||
protected static ?string $navigationGroup = 'Silent Auction';
|
||||
protected static string | UnitEnum | null $navigationGroup = 'Silent Auction';
|
||||
|
||||
public static function form(Form $form): Form
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
TextInput::make('item_assigned_num')
|
||||
->label('Item Number'),
|
||||
TextInput::make('item_desc')
|
||||
@@ -51,22 +54,22 @@ class ItemsResource extends Resource
|
||||
->label('Description'),
|
||||
TextColumn::make('item_min_bid')
|
||||
->label('Minimum Bid')
|
||||
->money('usd', 'true')
|
||||
->money('USD')
|
||||
->sortable(),
|
||||
TextColumn::make('item_est_value')
|
||||
->label('Estimated Value')
|
||||
->money('usd', 'true')
|
||||
->money('USD')
|
||||
->sortable(),
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
])
|
||||
->defaultSort('item_assigned_num');
|
||||
|
||||
+4
-4
@@ -3,7 +3,7 @@
|
||||
namespace App\Filament\Resources\ItemsResource\RelationManagers;
|
||||
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
@@ -16,10 +16,10 @@ class WinningBidsRelationManager extends RelationManager
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'iditems';
|
||||
|
||||
public function form(Form $form): Form
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
Forms\Components\TextInput::make('iditems')
|
||||
->required()
|
||||
->maxLength(255),
|
||||
|
||||
@@ -5,8 +5,9 @@ namespace App\Filament\Resources;
|
||||
use App\Filament\Resources\JudgesResource\Pages;
|
||||
use App\Filament\Resources\JudgesResource\RelationManagers;
|
||||
use App\Models\Judges;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use UnitEnum;
|
||||
use BackedEnum;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
@@ -14,19 +15,22 @@ use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
|
||||
class JudgesResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Judges::class;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
protected static string | BackedEnum | null $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
|
||||
protected static ?string $navigationGroup = 'Car Show';
|
||||
protected static string | UnitEnum | null $navigationGroup = 'Car Show';
|
||||
|
||||
public static function form(Form $form): Form
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
TextInput::make('judge_number'),
|
||||
]);
|
||||
}
|
||||
@@ -40,12 +44,12 @@ class JudgesResource extends Resource
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
+4
-4
@@ -3,7 +3,7 @@
|
||||
namespace App\Filament\Resources\JudgesResource\RelationManagers;
|
||||
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
@@ -16,10 +16,10 @@ class VehicleScoresRelationManager extends RelationManager
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'judge';
|
||||
|
||||
public function form(Form $form): Form
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
Forms\Components\TextInput::make('judge')
|
||||
->required()
|
||||
->maxLength(255),
|
||||
|
||||
@@ -5,8 +5,9 @@ namespace App\Filament\Resources;
|
||||
use App\Filament\Resources\PaymentMethodsResource\Pages;
|
||||
use App\Filament\Resources\PaymentMethodsResource\RelationManagers;
|
||||
use App\Models\PaymentMethods;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use UnitEnum;
|
||||
use BackedEnum;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
@@ -14,19 +15,22 @@ use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
|
||||
class PaymentMethodsResource extends Resource
|
||||
{
|
||||
protected static ?string $model = PaymentMethods::class;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
protected static string | BackedEnum | null $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
|
||||
protected static ?string $navigationGroup = 'Silent Auction';
|
||||
protected static string | UnitEnum | null $navigationGroup = 'Silent Auction';
|
||||
|
||||
public static function form(Form $form): Form
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
TextInput::make('pm_name')
|
||||
->label('Method Name'),
|
||||
]);
|
||||
@@ -43,12 +47,12 @@ class PaymentMethodsResource extends Resource
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
+4
-4
@@ -3,7 +3,7 @@
|
||||
namespace App\Filament\Resources\PaymentMethodsResource\RelationManagers;
|
||||
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
@@ -16,10 +16,10 @@ class CheckoutRelationManager extends RelationManager
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'payment_method';
|
||||
|
||||
public function form(Form $form): Form
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
Forms\Components\TextInput::make('payment_method')
|
||||
->required()
|
||||
->maxLength(255),
|
||||
|
||||
@@ -5,8 +5,9 @@ namespace App\Filament\Resources;
|
||||
use App\Filament\Resources\PeoplesChoiceResource\Pages;
|
||||
use App\Filament\Resources\PeoplesChoiceResource\RelationManagers;
|
||||
use App\Models\PeoplesChoice;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use UnitEnum;
|
||||
use BackedEnum;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
@@ -16,21 +17,24 @@ use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use App\Models\Vehicles;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
|
||||
class PeoplesChoiceResource extends Resource
|
||||
{
|
||||
protected static ?string $model = PeoplesChoice::class;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
|
||||
protected static ?string $navigationGroup = 'Car Show';
|
||||
|
||||
protected static ?string $pluralModelLabel = 'Peoples Choice';
|
||||
|
||||
public static function form(Form $form): Form
|
||||
protected static string | BackedEnum | null $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
|
||||
protected static string | UnitEnum | null $navigationGroup = 'Car Show';
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
Select::make('vehicle')
|
||||
->label('Vehicle')
|
||||
->options(Vehicles::all()->pluck('owner', 'id'))
|
||||
@@ -43,21 +47,21 @@ class PeoplesChoiceResource extends Resource
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('pc_count')->label('PC Vote Count'),
|
||||
TextColumn::make('vehicles.owner')->label('Vehicle Number'),
|
||||
TextColumn::make('vehicles.year')->label('Year'),
|
||||
TextColumn::make('vehicles.make')->label('Make'),
|
||||
TextColumn::make('vehicles.model')->label('Model'),
|
||||
TextColumn::make('pc_count')->label('PC Vote Count')->sortable(),
|
||||
TextColumn::make('vehicles.owner')->label('Vehicle Number')->sortable(),
|
||||
TextColumn::make('vehicles.year')->label('Year')->sortable(),
|
||||
TextColumn::make('vehicles.make')->label('Make')->sortable(),
|
||||
TextColumn::make('vehicles.model')->label('Model')->sortable(),
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
+4
-4
@@ -3,7 +3,7 @@
|
||||
namespace App\Filament\Resources\PeoplesChoiceResource\RelationManagers;
|
||||
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
@@ -16,10 +16,10 @@ class VehiclesRelationManager extends RelationManager
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'vehicle';
|
||||
|
||||
public function form(Form $form): Form
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
Forms\Components\TextInput::make('vehicle')
|
||||
->required()
|
||||
->maxLength(255),
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources;
|
||||
|
||||
use App\User;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Forms\Components\TextInput;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use BackedEnum;
|
||||
|
||||
class UserResource extends Resource
|
||||
{
|
||||
protected static ?string $model = User::class;
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'name';
|
||||
|
||||
protected static string | BackedEnum | null $navigationIcon = 'heroicon-o-users';
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
TextInput::make('name')
|
||||
->required()
|
||||
->maxLength(255),
|
||||
TextInput::make('email')
|
||||
->email()
|
||||
->required()
|
||||
->maxLength(255),
|
||||
TextInput::make('provider_name')
|
||||
->label('OIDC Provider')
|
||||
->disabled(),
|
||||
TextInput::make('provider_id')
|
||||
->label('OIDC ID')
|
||||
->disabled(),
|
||||
]);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('name')->sortable()->searchable(),
|
||||
TextColumn::make('email')->sortable()->searchable(),
|
||||
TextColumn::make('provider_name')->label('OIDC Provider'),
|
||||
TextColumn::make('provider_id')->label('OIDC ID'),
|
||||
TextColumn::make('created_at')->dateTime()->sortable(),
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
])
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => UserResource\Pages\ListUsers::route('/'),
|
||||
'create' => UserResource\Pages\CreateUsers::route('/create'),
|
||||
'edit' => UserResource\Pages\EditUsers::route('/{record}/edit'),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\UserResource\Pages;
|
||||
|
||||
use App\Filament\Resources\UserResource;
|
||||
use Filament\Resources\Pages\CreateRecord;
|
||||
|
||||
class CreateUsers extends CreateRecord
|
||||
{
|
||||
protected static string $resource = UserResource::class;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\UserResource\Pages;
|
||||
|
||||
use App\Filament\Resources\UserResource;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
|
||||
class EditUsers extends EditRecord
|
||||
{
|
||||
protected static string $resource = UserResource::class;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\UserResource\Pages;
|
||||
|
||||
use App\Filament\Resources\UserResource;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
|
||||
class ListUsers extends ListRecords
|
||||
{
|
||||
protected static string $resource = UserResource::class;
|
||||
}
|
||||
@@ -5,8 +5,9 @@ namespace App\Filament\Resources;
|
||||
use App\Filament\Resources\VehicleScoresResource\Pages;
|
||||
use App\Filament\Resources\VehicleScoresResource\RelationManagers;
|
||||
use App\Models\VehicleScores;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use UnitEnum;
|
||||
use BackedEnum;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
@@ -17,19 +18,22 @@ use Filament\Forms\Components\TextInput;
|
||||
use Filament\Forms\Components\Select;
|
||||
use App\Models\Vehicles;
|
||||
use App\Models\Judges;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
|
||||
class VehicleScoresResource extends Resource
|
||||
{
|
||||
protected static ?string $model = VehicleScores::class;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
protected static string | BackedEnum | null $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
|
||||
protected static ?string $navigationGroup = 'Car Show';
|
||||
protected static string | UnitEnum | null $navigationGroup = 'Car Show';
|
||||
|
||||
public static function form(Form $form): Form
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
Select::make('judge')
|
||||
->label('Judge')
|
||||
->options(Judges::all()->pluck('judge_number', 'id'))
|
||||
@@ -55,12 +59,12 @@ class VehicleScoresResource extends Resource
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
+16
-12
@@ -3,23 +3,27 @@
|
||||
namespace App\Filament\Resources\VehicleScoresResource\RelationManagers;
|
||||
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
class JudgeRelationManager extends RelationManager
|
||||
{
|
||||
protected static string $relationship = 'judges';
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'judge_number';
|
||||
|
||||
public function form(Form $form): Form
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
Forms\Components\TextInput::make('judge_number')
|
||||
->required()
|
||||
->maxLength(255),
|
||||
@@ -36,15 +40,15 @@ class JudgeRelationManager extends RelationManager
|
||||
//
|
||||
])
|
||||
->headerActions([
|
||||
Tables\Actions\CreateAction::make(),
|
||||
CreateAction::make(),
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
Tables\Actions\DeleteAction::make(),
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
DeleteAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
+16
-14
@@ -3,23 +3,27 @@
|
||||
namespace App\Filament\Resources\VehicleScoresResource\RelationManagers;
|
||||
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
class ScoredVehicleRelationManager extends RelationManager
|
||||
{
|
||||
protected static string $relationship = 'scoredVehicle';
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'id';
|
||||
|
||||
public function form(Form $form): Form
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
Forms\Components\TextInput::make('owner')
|
||||
->required()
|
||||
->maxLength(255),
|
||||
@@ -38,16 +42,14 @@ class ScoredVehicleRelationManager extends RelationManager
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->headerActions([
|
||||
Tables\Actions\CreateAction::make(),
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
DeleteAction::make(),
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
Tables\Actions\DeleteAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
->toolbarActions([
|
||||
CreateAction::make(),
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -5,8 +5,9 @@ namespace App\Filament\Resources;
|
||||
use App\Filament\Resources\VehiclesResource\Pages;
|
||||
use App\Filament\Resources\VehiclesResource\RelationManagers;
|
||||
use App\Models\Vehicles;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use UnitEnum;
|
||||
use BackedEnum;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
@@ -19,19 +20,22 @@ use Filament\Forms\Components\Select;
|
||||
use Filament\Forms\Components\Toggle;
|
||||
use App\Models\Bidders;
|
||||
use App\Models\CarShowCategory;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
|
||||
class VehiclesResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Vehicles::class;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
protected static string | BackedEnum | null $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
|
||||
protected static ?string $navigationGroup = 'Car Show';
|
||||
protected static string | UnitEnum | null $navigationGroup = 'Car Show';
|
||||
|
||||
public static function form(Form $form): Form
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
Select::make('owner')
|
||||
->label('Owner')
|
||||
->options(Bidders::orderBy('bidder_assigned_number')->pluck('bidder_assigned_number', 'idbidders'))
|
||||
@@ -86,12 +90,12 @@ class VehiclesResource extends Resource
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
])
|
||||
->defaultSort('vehicleOwner.bidder_assigned_number');
|
||||
|
||||
+16
-14
@@ -3,23 +3,27 @@
|
||||
namespace App\Filament\Resources\VehiclesResource\RelationManagers;
|
||||
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
class CarShowWinnerRelationManager extends RelationManager
|
||||
{
|
||||
protected static string $relationship = 'CarShowWinner';
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'id';
|
||||
|
||||
public function form(Form $form): Form
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
Forms\Components\TextInput::make('id')
|
||||
->required()
|
||||
->maxLength(255),
|
||||
@@ -35,16 +39,14 @@ class CarShowWinnerRelationManager extends RelationManager
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->headerActions([
|
||||
Tables\Actions\CreateAction::make(),
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
DeleteAction::make(),
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
Tables\Actions\DeleteAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
->toolbarActions([
|
||||
CreateAction::make(),
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
+16
-14
@@ -3,24 +3,28 @@
|
||||
namespace App\Filament\Resources\VehiclesResource\RelationManagers;
|
||||
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||
use App\Models\Bidders;
|
||||
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
class VehicleOwnerRelationManager extends RelationManager
|
||||
{
|
||||
protected static string $relationship = 'vehicleOwner';
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'owner';
|
||||
|
||||
public function form(Form $form): Form
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
Forms\Components\Select::make('owner')
|
||||
->label('Owner Assigned Number')
|
||||
->required()
|
||||
@@ -54,16 +58,14 @@ class VehicleOwnerRelationManager extends RelationManager
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->headerActions([
|
||||
Tables\Actions\CreateAction::make(),
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
DeleteAction::make(),
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
Tables\Actions\DeleteAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
->toolbarActions([
|
||||
CreateAction::make(),
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
+16
-14
@@ -3,7 +3,7 @@
|
||||
namespace App\Filament\Resources\VehiclesResource\RelationManagers;
|
||||
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
@@ -11,17 +11,21 @@ use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||
use App\Models\Vehicles;
|
||||
use App\Models\Judges;
|
||||
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
class VehicleScoresRelationManager extends RelationManager
|
||||
{
|
||||
protected static string $relationship = 'vehicleScores';
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'id';
|
||||
|
||||
public function form(Form $form): Form
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
Forms\Components\Select::make('judge')
|
||||
->label('Judge')
|
||||
->options(Judges::all()->pluck('judge_number', 'id'))
|
||||
@@ -45,16 +49,14 @@ class VehicleScoresRelationManager extends RelationManager
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->headerActions([
|
||||
Tables\Actions\CreateAction::make(),
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
DeleteAction::make(),
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
Tables\Actions\DeleteAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
->toolbarActions([
|
||||
CreateAction::make(),
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
+16
-14
@@ -3,24 +3,28 @@
|
||||
namespace App\Filament\Resources\VehiclesResource\RelationManagers;
|
||||
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\RelationManagers\RelationManager;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Eloquent\SoftDeletingScope;
|
||||
use App\Models\CarShowCategory;
|
||||
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
class VehicleTypeRelationManager extends RelationManager
|
||||
{
|
||||
protected static string $relationship = 'vehicleType';
|
||||
|
||||
protected static ?string $recordTitleAttribute = 'id';
|
||||
|
||||
public function form(Form $form): Form
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
Forms\Components\Select::make('category_name')
|
||||
->required()
|
||||
->searchable()
|
||||
@@ -41,16 +45,14 @@ class VehicleTypeRelationManager extends RelationManager
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->headerActions([
|
||||
Tables\Actions\CreateAction::make(),
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
DeleteAction::make(),
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
Tables\Actions\DeleteAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
->toolbarActions([
|
||||
CreateAction::make(),
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -5,8 +5,9 @@ namespace App\Filament\Resources;
|
||||
use App\Filament\Resources\WinningBidsResource\Pages;
|
||||
use App\Filament\Resources\WinningBidsResource\RelationManagers;
|
||||
use App\Models\WinningBids;
|
||||
use Filament\Forms;
|
||||
use Filament\Forms\Form;
|
||||
use UnitEnum;
|
||||
use BackedEnum;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Tables\Table;
|
||||
use Filament\Tables;
|
||||
@@ -19,19 +20,22 @@ use Filament\Forms\Components\Toggle;
|
||||
use App\Models\Bidders;
|
||||
use App\Models\Items;
|
||||
use Filament\Forms\Components\Select;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Actions\BulkActionGroup;
|
||||
use Filament\Actions\DeleteBulkAction;
|
||||
|
||||
class WinningBidsResource extends Resource
|
||||
{
|
||||
protected static ?string $model = WinningBids::class;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
protected static string | BackedEnum | null $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
|
||||
protected static ?string $navigationGroup = 'Silent Auction';
|
||||
protected static string | UnitEnum | null $navigationGroup = 'Silent Auction';
|
||||
|
||||
public static function form(Form $form): Form
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return $form
|
||||
->schema([
|
||||
return $schema
|
||||
->components([
|
||||
Select::make('winning_item_num')
|
||||
->label('Item')
|
||||
->options(Items::orderBy('item_assigned_num')->pluck('item_assigned_num', 'iditems'))
|
||||
@@ -65,18 +69,18 @@ class WinningBidsResource extends Resource
|
||||
->sortable(),
|
||||
TextColumn::make('winning_cost')
|
||||
->label('Winning Bid Amt')
|
||||
->money('usd')
|
||||
->money('USD')
|
||||
->sortable(),
|
||||
])
|
||||
->filters([
|
||||
//
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make(),
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
->toolbarActions([
|
||||
BulkActionGroup::make([
|
||||
DeleteBulkAction::make(),
|
||||
]),
|
||||
])
|
||||
->defaultSort('items.item_assigned_num');
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
namespace App\Helpers;
|
||||
|
||||
class PhoneHelper
|
||||
{
|
||||
public static function format($phone)
|
||||
{
|
||||
$phone = preg_replace('/[^0-9]/', '', $phone);
|
||||
if (strlen($phone) == 10) {
|
||||
return preg_replace('/([0-9]{3})([0-9]{3})([0-9]{4})/', '$1-$2-$3', $phone);
|
||||
}
|
||||
return $phone;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Auth;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\User;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Laravel\Socialite\Facades\Socialite;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class SocialiteController extends Controller
|
||||
{
|
||||
public function redirectToProvider($provider)
|
||||
{
|
||||
return Socialite::driver($provider)->redirect();
|
||||
}
|
||||
|
||||
public function handleProviderCallback($provider)
|
||||
{
|
||||
try {
|
||||
$socialUser = Socialite::driver($provider)->user();
|
||||
} catch (\Exception $e) {
|
||||
return redirect('/login')->with('error', 'Authentication failed.');
|
||||
}
|
||||
|
||||
if (Auth::check()) {
|
||||
$user = Auth::user();
|
||||
$user->update([
|
||||
'provider_name' => $provider,
|
||||
'provider_id' => $socialUser->getId(),
|
||||
]);
|
||||
|
||||
return redirect()->intended('/admin')->with('status', 'Account linked successfully!');
|
||||
}
|
||||
|
||||
// Find user by provider_id
|
||||
$user = User::where('provider_name', $provider)
|
||||
->where('provider_id', $socialUser->getId())
|
||||
->first();
|
||||
|
||||
if (!$user) {
|
||||
// Find user by email to link
|
||||
$user = User::where('email', $socialUser->getEmail())->first();
|
||||
|
||||
if ($user) {
|
||||
// Link the account
|
||||
$user->update([
|
||||
'provider_name' => $provider,
|
||||
'provider_id' => $socialUser->getId(),
|
||||
]);
|
||||
} else {
|
||||
// Optionally create a new user
|
||||
$user = User::create([
|
||||
'name' => $socialUser->getName() ?? $socialUser->getNickname() ?? $socialUser->getEmail(),
|
||||
'email' => $socialUser->getEmail(),
|
||||
'provider_name' => $provider,
|
||||
'provider_id' => $socialUser->getId(),
|
||||
'password' => bcrypt(Str::random(24)),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Auth::login($user);
|
||||
|
||||
return redirect()->intended('/admin'); // Redirect to filament admin or home
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Bidders;
|
||||
use App\Models\Checkout;
|
||||
use App\Models\WinningBids;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class NorthCheckoutController extends Controller
|
||||
{
|
||||
public function checkout(Request $request, $bidder_id)
|
||||
{
|
||||
$bidder = Bidders::where('idbidders', $bidder_id)->firstOrFail();
|
||||
|
||||
// Check if already checked out
|
||||
if (Checkout::where('bidder_num', $bidder->idbidders)->exists()) {
|
||||
return redirect('/mywinnings?bidder_number=' . $bidder->bidder_assigned_number)->with('error', 'Bidder has already checked out.');
|
||||
}
|
||||
|
||||
$winnings = WinningBids::where('winning_bidder_num', $bidder->idbidders)->get();
|
||||
$total_cost = $winnings->sum('winning_cost');
|
||||
|
||||
if ($total_cost <= 0) {
|
||||
return redirect('/mywinnings?bidder_number=' . $bidder->bidder_assigned_number)->with('error', 'No winnings found for this bidder.');
|
||||
}
|
||||
|
||||
return view('north_checkout', [
|
||||
'bidder' => $bidder,
|
||||
'total_cost' => $total_cost,
|
||||
]);
|
||||
}
|
||||
|
||||
public function createSession(Request $request, $bidder_id)
|
||||
{
|
||||
$bidder = Bidders::findOrFail($bidder_id);
|
||||
$winnings = WinningBids::with('items')->where('winning_bidder_num', $bidder->idbidders)->get();
|
||||
$total_cost = $winnings->sum('winning_cost');
|
||||
|
||||
$products = $winnings->map(function($winning) {
|
||||
return [
|
||||
'name' => $winning->items->item_desc ?? 'Auction Item',
|
||||
'price' => (float)$winning->winning_cost,
|
||||
'quantity' => 1
|
||||
];
|
||||
})->toArray();
|
||||
|
||||
$apiKey = config('services.north.private_api_key');
|
||||
$checkoutId = config('services.north.checkout_id');
|
||||
$profileId = config('services.north.profile_id');
|
||||
|
||||
if (!$apiKey || !$checkoutId || !$profileId) {
|
||||
return response()->json(['error' => 'North configuration missing.'], 500);
|
||||
}
|
||||
|
||||
$response = Http::withHeaders([
|
||||
'Authorization' => 'Bearer ' . $apiKey,
|
||||
'Accept' => 'application/json',
|
||||
'Content-Type' => 'application/json',
|
||||
])->post('https://checkout.north.com/api/sessions', [
|
||||
'checkoutId' => $checkoutId,
|
||||
'profileId' => $profileId,
|
||||
'amount' => (float)$total_cost,
|
||||
'products' => $products,
|
||||
]);
|
||||
|
||||
if ($response->failed()) {
|
||||
Log::error('North Session Creation Failed: ' . $response->status() . ' ' . $response->body());
|
||||
return response()->json([
|
||||
'error' => 'Failed to create checkout session: ' . ($response->json('message') ?? 'Unknown error'),
|
||||
'status' => $response->status(),
|
||||
'body' => $response->body()
|
||||
], 500);
|
||||
}
|
||||
|
||||
$data = $response->json();
|
||||
|
||||
// If json() is null but body is not empty, it might be a parsing error
|
||||
if (is_null($data) && !empty($response->body())) {
|
||||
Log::error('North Session Response is not JSON: ' . $response->body());
|
||||
return response()->json([
|
||||
'error' => 'Response from North is not valid JSON.',
|
||||
'raw_body' => $response->body()
|
||||
], 500);
|
||||
}
|
||||
|
||||
$token = $data['token'] ??
|
||||
$data['sessionToken'] ??
|
||||
$data['id'] ??
|
||||
$data['session_id'] ??
|
||||
($data['session']['id'] ?? null);
|
||||
|
||||
if (!$token) {
|
||||
Log::error('North Session Token Missing in Response: ' . json_encode($data));
|
||||
return response()->json([
|
||||
'error' => 'Session token not found in API response.',
|
||||
'debug_response' => $data,
|
||||
'raw_body' => $response->body()
|
||||
], 500);
|
||||
}
|
||||
|
||||
return response()->json(['sessionToken' => $token]);
|
||||
}
|
||||
|
||||
public function verify(Request $request, $bidder_id)
|
||||
{
|
||||
$bidder = Bidders::findOrFail($bidder_id);
|
||||
$sessionToken = $request->query('sessionToken');
|
||||
if (!$sessionToken) {
|
||||
return redirect('/mywinnings?bidder_number=' . $bidder->bidder_assigned_number)->with('error', 'Missing session token.');
|
||||
}
|
||||
|
||||
$apiKey = config('services.north.private_api_key');
|
||||
$checkoutId = config('services.north.checkout_id');
|
||||
$profileId = config('services.north.profile_id');
|
||||
|
||||
$response = Http::withHeaders([
|
||||
'Authorization' => 'Bearer ' . $apiKey,
|
||||
'SessionToken' => $sessionToken,
|
||||
'CheckoutId' => $checkoutId,
|
||||
'ProfileId' => $profileId,
|
||||
'Accept' => 'application/json',
|
||||
])->get('https://checkout.north.com/api/sessions/status');
|
||||
|
||||
if ($response->failed()) {
|
||||
Log::error('North Session Verification Failed: ' . $response->status() . ' ' . $response->body());
|
||||
return redirect('/mywinnings?bidder_number=' . $bidder->bidder_assigned_number)->with('error', 'Failed to verify payment status. Status: ' . $response->status());
|
||||
}
|
||||
|
||||
$status = $response->json();
|
||||
$currentStatus = $status['status'] ?? '';
|
||||
|
||||
// The North API status check might return Approved, completed, success, authorized, or captured.
|
||||
$successStatuses = ['approved', 'completed', 'success', 'authorized', 'captured'];
|
||||
|
||||
if (in_array(strtolower($currentStatus), $successStatuses)) {
|
||||
// Check if already checked out to avoid duplicates
|
||||
$existingCheckout = Checkout::where('bidder_num', $bidder->idbidders)->first();
|
||||
|
||||
if (!$existingCheckout) {
|
||||
// According to docs, when status is Approved, transaction details are in 'body'
|
||||
// Digital wallets might have these at the top level
|
||||
$body = $status['body'] ?? [];
|
||||
$winnertotal = $status['amount'] ??
|
||||
($body['amount'] ??
|
||||
($status['amount_total'] ??
|
||||
WinningBids::where('winning_bidder_num', $bidder->idbidders)->sum('winning_cost')));
|
||||
|
||||
$payment_method = 3; // Credit Card
|
||||
$cc_transaction = $body['auth_guid'] ??
|
||||
($status['transaction_id'] ??
|
||||
($status['transactionId'] ??
|
||||
($status['id'] ?? 'NORTH_EC')));
|
||||
|
||||
$cc_amount = $winnertotal;
|
||||
$check_number = null;
|
||||
|
||||
$checkout_id = DB::table('checkout')->insertGetID(
|
||||
[
|
||||
'bidder_num' => $bidder->idbidders,
|
||||
'winnertotal' => $winnertotal,
|
||||
'payment_method' => $payment_method,
|
||||
'check_number' => $check_number,
|
||||
'cc_transaction' => $cc_transaction,
|
||||
'cc_amount' => $cc_amount,
|
||||
'created_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]
|
||||
);
|
||||
} else {
|
||||
$checkout_id = $existingCheckout->checkout_id;
|
||||
$payment_method = $existingCheckout->payment_method;
|
||||
$cc_transaction = $existingCheckout->cc_transaction;
|
||||
$check_number = $existingCheckout->check_number;
|
||||
}
|
||||
|
||||
// Replicate the data for checkout_complete view
|
||||
$checkout_list_results = DB::select("SELECT
|
||||
*, items.item_assigned_num, items.item_desc
|
||||
FROM winning_bids
|
||||
INNER JOIN items AS items
|
||||
ON winning_bids.winning_item_num=items.iditems
|
||||
WHERE winning_bidder_num = $bidder->idbidders
|
||||
");
|
||||
|
||||
$checkout_info_results = DB::select("SELECT
|
||||
winning_bids.*,
|
||||
bidders.*,
|
||||
sum(winning_cost) AS total_cost
|
||||
FROM winning_bids
|
||||
INNER JOIN bidders AS bidders
|
||||
ON winning_bids.winning_bidder_num=bidders.idbidders
|
||||
WHERE winning_bidder_num = $bidder->idbidders
|
||||
GROUP BY winning_bids.winning_bidder_num
|
||||
");
|
||||
|
||||
return view('checkout_complete', [
|
||||
'checkout_result' => $checkout_id,
|
||||
'checkout_list_results' => $checkout_list_results,
|
||||
'checkout_info_results' => $checkout_info_results,
|
||||
'payment_method' => $payment_method,
|
||||
'check_number' => $check_number,
|
||||
'cc_transaction' => $cc_transaction
|
||||
]);
|
||||
}
|
||||
|
||||
return redirect('/mywinnings?bidder_number=' . $bidder->bidder_assigned_number)->with('error', 'Payment not completed. Status: ' . ($status['status'] ?? 'unknown'));
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use View;
|
||||
use App\helpers;
|
||||
use PDF;
|
||||
use Spatie\LaravelPdf\Facades\Pdf;
|
||||
use App\Models\Bidders;
|
||||
use App\Models\Items;
|
||||
use App\Models\Checkout;
|
||||
@@ -19,7 +19,7 @@ use App\Models\CarShowCategory;
|
||||
use App\Models\Types;
|
||||
use App\Models\Vehicles;
|
||||
use App\Models\VehicleScores;
|
||||
|
||||
use Dompdf\Dompdf;
|
||||
class PagesController extends Controller
|
||||
{
|
||||
public function home()
|
||||
@@ -250,6 +250,49 @@ class PagesController extends Controller
|
||||
return view('receiptpdf', $checkout_data);
|
||||
}
|
||||
|
||||
public function downloadReceiptPdf(Request $request)
|
||||
{
|
||||
$checkoutid = $request->checkout_id;
|
||||
$checkout_final_results = Checkout::where('checkout_id', '=', $checkoutid)->first();
|
||||
if (!$checkout_final_results) {
|
||||
return redirect('/mywinnings')->with('error', 'Checkout record not found.');
|
||||
}
|
||||
|
||||
$bidder_num = $checkout_final_results->bidder_num;
|
||||
$checkout_list_results = DB::select("SELECT
|
||||
*, items.item_assigned_num, items.item_desc
|
||||
FROM winning_bids
|
||||
INNER JOIN items AS items ON winning_bids.winning_item_num=items.iditems
|
||||
WHERE winning_bidder_num = $bidder_num
|
||||
");
|
||||
$checkout_info_results = DB::select("SELECT
|
||||
winning_bids.*,
|
||||
bidders.*,
|
||||
sum(winning_cost) AS total_cost
|
||||
FROM winning_bids
|
||||
INNER JOIN bidders AS bidders ON winning_bids.winning_bidder_num=bidders.idbidders
|
||||
WHERE winning_bidder_num = $bidder_num
|
||||
GROUP BY winning_bids.winning_bidder_num
|
||||
");
|
||||
|
||||
$options = new \Dompdf\Options();
|
||||
$options->set('isHtml5ParserEnabled', true);
|
||||
$options->set('isRemoteEnabled', true);
|
||||
$dompdf = new Dompdf($options);
|
||||
|
||||
$html = view('receiptpdf', [
|
||||
'checkout_final_results' => $checkout_final_results,
|
||||
'checkout_list_results' => $checkout_list_results,
|
||||
'checkout_info_results' => $checkout_info_results
|
||||
])->render();
|
||||
|
||||
$dompdf->loadHtml($html);
|
||||
$dompdf->setPaper('letter', 'portrait');
|
||||
$dompdf->render();
|
||||
|
||||
return $dompdf->stream('receipt-'.$checkoutid.'.pdf');
|
||||
}
|
||||
|
||||
public function reprintReceipt(Request $reprint_receipt_req)
|
||||
{
|
||||
if (!$reprint_receipt_req->reprintbiddernum) {
|
||||
@@ -515,4 +558,33 @@ class PagesController extends Controller
|
||||
//dd($showcarlist_results);
|
||||
return view('showcarlist', ['showcarlist_results' => $showcarlist_results]);
|
||||
}
|
||||
|
||||
public function myWinnings(Request $request)
|
||||
{
|
||||
if (!$request->bidder_number) {
|
||||
return view('mywinnings_form');
|
||||
}
|
||||
|
||||
$bidder_number = $request->bidder_number;
|
||||
$bidder = Bidders::where('bidder_assigned_number', $bidder_number)->first();
|
||||
|
||||
if (!$bidder) {
|
||||
return view('mywinnings_form', ['error' => 'Bidder number not found.']);
|
||||
}
|
||||
|
||||
$winnings = WinningBids::with('items')
|
||||
->where('winning_bidder_num', $bidder->idbidders)
|
||||
->get();
|
||||
|
||||
$total_cost = $winnings->sum('winning_cost');
|
||||
|
||||
$is_checked_out = \App\Models\Checkout::where('bidder_num', $bidder->idbidders)->exists();
|
||||
|
||||
return view('mywinnings_results', [
|
||||
'bidder' => $bidder,
|
||||
'winnings' => $winnings,
|
||||
'total_cost' => $total_cost,
|
||||
'is_checked_out' => $is_checked_out
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ class Checkout extends Model
|
||||
return [
|
||||
'created_at' => 'datetime',
|
||||
'updated_at' => 'datetime',
|
||||
'winnertotal' => 'integer',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ class WinningBids extends Model
|
||||
|
||||
public function items()
|
||||
{
|
||||
return $this->hasMany(Items::class, 'iditems', 'winning_item_num');
|
||||
return $this->belongsTo(Items::class, 'winning_item_num', 'iditems');
|
||||
}
|
||||
|
||||
public function bidders()
|
||||
|
||||
@@ -16,6 +16,9 @@ class EventServiceProvider extends ServiceProvider
|
||||
'App\Events\Event' => [
|
||||
'App\Listeners\EventListener',
|
||||
],
|
||||
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
|
||||
\SocialiteProviders\OIDC\OIDCExtendSocialite::class.'@handle',
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
@@ -18,8 +18,41 @@ use Illuminate\Routing\Middleware\SubstituteBindings;
|
||||
use Illuminate\Session\Middleware\StartSession;
|
||||
use Illuminate\View\Middleware\ShareErrorsFromSession;
|
||||
|
||||
use Filament\Support\Facades\FilamentView;
|
||||
use Illuminate\Support\Facades\Blade;
|
||||
|
||||
use Filament\Navigation\MenuItem;
|
||||
|
||||
use Filament\Facades\Filament;
|
||||
|
||||
class AdminPanelProvider extends PanelProvider
|
||||
{
|
||||
public function boot()
|
||||
{
|
||||
FilamentView::registerRenderHook(
|
||||
'panels::auth.login.form.after',
|
||||
fn (): string => Blade::render('
|
||||
<div class="mt-4">
|
||||
<x-filament::button
|
||||
:href="url(\'auth/social/oidc\')"
|
||||
tag="a"
|
||||
color="info"
|
||||
class="w-full"
|
||||
>
|
||||
Login with OIDC
|
||||
</x-filament::button>
|
||||
</div>
|
||||
'),
|
||||
);
|
||||
|
||||
Filament::registerUserMenuItems([
|
||||
MenuItem::make()
|
||||
->label('Link OIDC Account')
|
||||
->icon('heroicon-o-link')
|
||||
->url(fn (): string => url('auth/social/oidc')),
|
||||
]);
|
||||
}
|
||||
|
||||
public function panel(Panel $panel): Panel
|
||||
{
|
||||
return $panel
|
||||
@@ -27,6 +60,13 @@ class AdminPanelProvider extends PanelProvider
|
||||
->id('admin')
|
||||
->path('admin')
|
||||
->login()
|
||||
->profile()
|
||||
->userMenuItems([
|
||||
'oidc' => MenuItem::make()
|
||||
->label('Link OIDC Account')
|
||||
->icon('heroicon-o-link')
|
||||
->url(fn (): string => url('auth/social/oidc')),
|
||||
])
|
||||
->brandName(env('APP_NAME'))
|
||||
->homeUrl('/')
|
||||
->colors([
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ class User extends Authenticatable implements FilamentUser, HasName
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name', 'email', 'password',
|
||||
'name', 'email', 'password', 'provider_name', 'provider_id',
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
+8
-2
@@ -8,13 +8,19 @@
|
||||
"php": "^8.2",
|
||||
"barryvdh/laravel-snappy": "^1.0",
|
||||
"carlos-meneses/laravel-mpdf": "^2.1",
|
||||
"filament/filament": "^3.2",
|
||||
"dompdf/dompdf": "^3.1",
|
||||
"filament/filament": "^5.0",
|
||||
"kovah/laravel-socialite-oidc": "^0.7.0",
|
||||
"laravel/framework": "^11.0",
|
||||
"laravel/socialite": "^5.26",
|
||||
"laravel/tinker": "^2.9",
|
||||
"laravel/ui": "^4.2"
|
||||
"laravel/ui": "^4.2",
|
||||
"socialiteproviders/manager": "^4.9",
|
||||
"spatie/laravel-pdf": "^2.8"
|
||||
},
|
||||
"require-dev": {
|
||||
"barryvdh/laravel-debugbar": "^3.8",
|
||||
"filament/upgrade": "^5.0",
|
||||
"filp/whoops": "^2.14",
|
||||
"mockery/mockery": "^1.6",
|
||||
"nunomaduro/collision": "^8.1",
|
||||
|
||||
Generated
+1987
-393
File diff suppressed because it is too large
Load Diff
@@ -35,4 +35,17 @@ return [
|
||||
'secret' => env('STRIPE_SECRET'),
|
||||
],
|
||||
|
||||
'oidc' => [
|
||||
'base_url' => env('OIDC_BASE_URL'),
|
||||
'client_id' => env('OIDC_CLIENT_ID'),
|
||||
'client_secret' => env('OIDC_CLIENT_SECRET'),
|
||||
'redirect' => env('OIDC_REDIRECT_URI'),
|
||||
],
|
||||
|
||||
'north' => [
|
||||
'checkout_id' => env('NORTH_CHECKOUT_ID'),
|
||||
'profile_id' => env('NORTH_PROFILE_ID'),
|
||||
'private_api_key' => env('NORTH_PRIVATE_API_KEY'),
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
@@ -23,14 +23,131 @@ $factory->define(App\User::class, function (Faker\Generator $faker) {
|
||||
];
|
||||
});
|
||||
|
||||
//Bidder
|
||||
$factory->define(App\Models\Bidder::class, function (Faker\Generator $faker) {
|
||||
static $password;
|
||||
|
||||
// Bidders
|
||||
$factory->define(App\Models\Bidders::class, function (Faker\Generator $faker) {
|
||||
return [
|
||||
'name' => $faker->name,
|
||||
'email' => $faker->unique()->safeEmail,
|
||||
'password' => $password ?: $password = bcrypt('secret'),
|
||||
'remember_token' => str_random(10),
|
||||
'bidder_fname' => $faker->firstName,
|
||||
'bidder_lname' => $faker->lastName,
|
||||
'bidder_addr' => $faker->streetAddress,
|
||||
'bidder_city' => $faker->city,
|
||||
'bidder_state' => $faker->stateAbbr,
|
||||
'bidder_zip' => $faker->postcode,
|
||||
'bidder_phone' => $faker->phoneNumber,
|
||||
'bidder_email' => $faker->unique()->safeEmail,
|
||||
'bidder_assigned_number' => $faker->unique()->numberBetween(1, 1000),
|
||||
];
|
||||
});
|
||||
|
||||
// Items
|
||||
$factory->define(App\Models\Items::class, function (Faker\Generator $faker) {
|
||||
return [
|
||||
'item_desc' => $faker->sentence(3),
|
||||
'item_min_bid' => $faker->numberBetween(10, 100),
|
||||
'item_est_value' => $faker->numberBetween(50, 500),
|
||||
'item_assigned_num' => $faker->unique()->numberBetween(1, 500),
|
||||
];
|
||||
});
|
||||
|
||||
// CarShowCategory
|
||||
$factory->define(App\Models\CarShowCategory::class, function (Faker\Generator $faker) {
|
||||
return [
|
||||
'category_name' => $faker->words(2, true),
|
||||
'vehicle_type' => $faker->boolean,
|
||||
];
|
||||
});
|
||||
|
||||
// Vehicles
|
||||
$factory->define(App\Models\Vehicles::class, function (Faker\Generator $faker) {
|
||||
return [
|
||||
'year' => $faker->year,
|
||||
'make' => $faker->company,
|
||||
'model' => $faker->word,
|
||||
'type' => function () {
|
||||
return factory(App\Models\CarShowCategory::class)->create()->id;
|
||||
},
|
||||
'doNotJudge' => $faker->boolean,
|
||||
'owner' => function () {
|
||||
return factory(App\Models\Bidders::class)->create()->bidder_assigned_number;
|
||||
},
|
||||
];
|
||||
});
|
||||
|
||||
// PaymentMethods
|
||||
$factory->define(App\Models\PaymentMethods::class, function (Faker\Generator $faker) {
|
||||
return [
|
||||
'pm_name' => $faker->randomElement(['Cash', 'Check', 'Credit Card']),
|
||||
];
|
||||
});
|
||||
|
||||
// Judges
|
||||
$factory->define(App\Models\Judges::class, function (Faker\Generator $faker) {
|
||||
return [
|
||||
'judge_number' => $faker->unique()->numberBetween(1, 50),
|
||||
];
|
||||
});
|
||||
|
||||
// VehicleScores
|
||||
$factory->define(App\Models\VehicleScores::class, function (Faker\Generator $faker) {
|
||||
return [
|
||||
'judge' => function () {
|
||||
return factory(App\Models\Judges::class)->create()->id;
|
||||
},
|
||||
'overall_score' => $faker->numberBetween(1, 100),
|
||||
'vehicle' => function () {
|
||||
return factory(App\Models\Vehicles::class)->create()->id;
|
||||
},
|
||||
];
|
||||
});
|
||||
|
||||
// PeoplesChoice
|
||||
$factory->define(App\Models\PeoplesChoice::class, function (Faker\Generator $faker) {
|
||||
return [
|
||||
'vehicle' => function () {
|
||||
return factory(App\Models\Vehicles::class)->create()->id;
|
||||
},
|
||||
'pc_count' => $faker->numberBetween(0, 50),
|
||||
];
|
||||
});
|
||||
|
||||
// WinningBids
|
||||
$factory->define(App\Models\WinningBids::class, function (Faker\Generator $faker) {
|
||||
return [
|
||||
'winning_bidder_num' => function () {
|
||||
return factory(App\Models\Bidders::class)->create()->idbidders;
|
||||
},
|
||||
'winning_cost' => $faker->numberBetween(10, 1000),
|
||||
'winning_item_num' => function () {
|
||||
return factory(App\Models\Items::class)->create()->iditems;
|
||||
},
|
||||
];
|
||||
});
|
||||
|
||||
// Checkout
|
||||
$factory->define(App\Models\Checkout::class, function (Faker\Generator $faker) {
|
||||
return [
|
||||
'bidder_num' => function () {
|
||||
return factory(App\Models\Bidders::class)->create()->idbidders;
|
||||
},
|
||||
'winnertotal' => $faker->numberBetween(10, 2000),
|
||||
'payment_method' => function () {
|
||||
return factory(App\Models\PaymentMethods::class)->create()->pm_id;
|
||||
},
|
||||
'check_number' => $faker->optional()->numberBetween(100, 999),
|
||||
'cc_transaction' => $faker->optional()->uuid,
|
||||
'cc_amount' => $faker->optional()->numberBetween(10, 2000),
|
||||
];
|
||||
});
|
||||
|
||||
// CarShowWinner
|
||||
$factory->define(App\Models\CarShowWinner::class, function (Faker\Generator $faker) {
|
||||
return [
|
||||
'vehicle' => function () {
|
||||
return factory(App\Models\Vehicles::class)->create()->id;
|
||||
},
|
||||
'category' => function () {
|
||||
return factory(App\Models\CarShowCategory::class)->create()->id;
|
||||
},
|
||||
'place' => $faker->numberBetween(1, 3),
|
||||
'total_score' => $faker->numberBetween(50, 300),
|
||||
];
|
||||
});
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('sessions', function (Blueprint $table) {
|
||||
$table->string('id')->primary();
|
||||
$table->foreignId('user_id')->nullable()->index();
|
||||
$table->string('ip_address', 45)->nullable();
|
||||
$table->text('user_agent')->nullable();
|
||||
$table->longText('payload');
|
||||
$table->integer('last_activity')->index();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('sessions');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->string('provider_name')->nullable();
|
||||
$table->string('provider_id')->nullable();
|
||||
$table->unique(['provider_name', 'provider_id']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
$table->dropUnique(['provider_name', 'provider_id']);
|
||||
$table->dropColumn(['provider_name', 'provider_id']);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\Bidders;
|
||||
|
||||
class BiddersTableSeeder extends Seeder
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
factory(Bidders::class, 50)->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\CarShowCategory;
|
||||
|
||||
class CarShowCategoryTableSeeder extends Seeder
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
factory(CarShowCategory::class, 10)->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\CarShowWinner;
|
||||
use App\Models\Vehicles;
|
||||
use App\Models\CarShowCategory;
|
||||
|
||||
class CarShowWinnerTableSeeder extends Seeder
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
$categories = CarShowCategory::all();
|
||||
$vehicles = Vehicles::all();
|
||||
|
||||
foreach ($categories as $category) {
|
||||
for ($i = 1; $i <= 3; $i++) {
|
||||
factory(CarShowWinner::class)->create([
|
||||
'category' => $category->id,
|
||||
'vehicle' => $vehicles->random()->id,
|
||||
'place' => $i,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\Checkout;
|
||||
use App\Models\Bidders;
|
||||
use App\Models\PaymentMethods;
|
||||
|
||||
class CheckoutTableSeeder extends Seeder
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
$bidders = Bidders::all();
|
||||
$paymentMethods = PaymentMethods::all();
|
||||
|
||||
foreach ($bidders as $bidder) {
|
||||
if (rand(0, 1)) {
|
||||
factory(Checkout::class)->create([
|
||||
'bidder_num' => $bidder->idbidders,
|
||||
'payment_method' => $paymentMethods->random()->pm_id,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,17 @@ class DatabaseSeeder extends Seeder
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
// $this->call(UsersTableSeeder::class);
|
||||
$this->call(UsersTableSeeder::class);
|
||||
$this->call(PaymentMethodsTableSeeder::class);
|
||||
$this->call(CarShowCategoryTableSeeder::class);
|
||||
$this->call(BiddersTableSeeder::class);
|
||||
$this->call(ItemsTableSeeder::class);
|
||||
$this->call(JudgesTableSeeder::class);
|
||||
$this->call(VehiclesTableSeeder::class);
|
||||
$this->call(VehicleScoresTableSeeder::class);
|
||||
$this->call(PeoplesChoiceTableSeeder::class);
|
||||
$this->call(WinningBidsTableSeeder::class);
|
||||
$this->call(CheckoutTableSeeder::class);
|
||||
$this->call(CarShowWinnerTableSeeder::class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\Items;
|
||||
|
||||
class ItemsTableSeeder extends Seeder
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
factory(Items::class, 30)->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\Judges;
|
||||
|
||||
class JudgesTableSeeder extends Seeder
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
factory(Judges::class, 5)->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\PaymentMethods;
|
||||
|
||||
class PaymentMethodsTableSeeder extends Seeder
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
PaymentMethods::create(['pm_name' => 'Cash']);
|
||||
PaymentMethods::create(['pm_name' => 'Check']);
|
||||
PaymentMethods::create(['pm_name' => 'Credit Card']);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\PeoplesChoice;
|
||||
use App\Models\Vehicles;
|
||||
|
||||
class PeoplesChoiceTableSeeder extends Seeder
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
$vehicles = Vehicles::all();
|
||||
|
||||
foreach ($vehicles as $vehicle) {
|
||||
factory(PeoplesChoice::class)->create([
|
||||
'vehicle' => $vehicle->id,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\User;
|
||||
|
||||
class UsersTableSeeder extends Seeder
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
factory(User::class, 10)->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\VehicleScores;
|
||||
use App\Models\Judges;
|
||||
use App\Models\Vehicles;
|
||||
|
||||
class VehicleScoresTableSeeder extends Seeder
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
$judges = Judges::all();
|
||||
$vehicles = Vehicles::all();
|
||||
|
||||
foreach ($vehicles as $vehicle) {
|
||||
foreach ($judges as $judge) {
|
||||
factory(VehicleScores::class)->create([
|
||||
'judge' => $judge->id,
|
||||
'vehicle' => $vehicle->id,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\Vehicles;
|
||||
use App\Models\CarShowCategory;
|
||||
use App\Models\Bidders;
|
||||
|
||||
class VehiclesTableSeeder extends Seeder
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
$categories = CarShowCategory::all();
|
||||
$bidders = Bidders::all();
|
||||
|
||||
factory(Vehicles::class, 40)->create([
|
||||
'type' => function () use ($categories) {
|
||||
return $categories->random()->id;
|
||||
},
|
||||
'owner' => function () use ($bidders) {
|
||||
return $bidders->random()->bidder_assigned_number;
|
||||
},
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\WinningBids;
|
||||
use App\Models\Bidders;
|
||||
use App\Models\Items;
|
||||
|
||||
class WinningBidsTableSeeder extends Seeder
|
||||
{
|
||||
public function run()
|
||||
{
|
||||
$bidders = Bidders::all();
|
||||
$items = Items::all();
|
||||
|
||||
foreach ($items as $item) {
|
||||
if (rand(0, 1)) {
|
||||
factory(WinningBids::class)->create([
|
||||
'winning_bidder_num' => $bidders->random()->idbidders,
|
||||
'winning_item_num' => $item->iditems,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Vendored
+2
-1
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-cyrillic-ext-wght-normal-IYF56FF6.woff2") format("woff2-variations");unicode-range:U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-cyrillic-wght-normal-JEOLYBOO.woff2") format("woff2-variations");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-greek-ext-wght-normal-EOVOK2B5.woff2") format("woff2-variations");unicode-range:U+1F00-1FFF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-greek-wght-normal-IRE366VL.woff2") format("woff2-variations");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-vietnamese-wght-normal-CE5GGD3W.woff2") format("woff2-variations");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-latin-ext-wght-normal-HA22NDSG.woff2") format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Inter Variable;font-style:normal;font-display:swap;font-weight:100 900;src:url("./inter-latin-wght-normal-NRMW37G5.woff2") format("woff2-variations");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
@@ -0,0 +1 @@
|
||||
(()=>{var n=({livewireId:e})=>({actionNestingIndex:null,init(){window.addEventListener("sync-action-modals",t=>{t.detail.id===e&&this.syncActionModals(t.detail.newActionNestingIndex,t.detail.shouldOverlayParentActions??!1)})},syncActionModals(t,i=!1){if(this.actionNestingIndex===t){this.actionNestingIndex!==null&&this.$nextTick(()=>this.openModal());return}let s=this.actionNestingIndex!==null&&t!==null&&t>this.actionNestingIndex;if(this.actionNestingIndex!==null&&!(i&&s)&&this.closeModal(),this.actionNestingIndex=t,this.actionNestingIndex!==null){if(!this.$el.querySelector(`#${this.generateModalId(t)}`)){this.$nextTick(()=>this.openModal());return}this.openModal()}},generateModalId(t){return`fi-${e}-action-`+t},openModal(){let t=this.generateModalId(this.actionNestingIndex);document.dispatchEvent(new CustomEvent("open-modal",{bubbles:!0,composed:!0,detail:{id:t}}))},closeModal(){let t=this.generateModalId(this.actionNestingIndex);document.dispatchEvent(new CustomEvent("close-modal-quietly",{bubbles:!0,composed:!0,detail:{id:t}}))}});document.addEventListener("alpine:init",()=>{window.Alpine.data("filamentActionModals",n)});})();
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+2
-2
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
function c({livewireId:s}){return{areAllCheckboxesChecked:!1,checkboxListOptions:[],search:"",unsubscribeLivewireHook:null,visibleCheckboxListOptions:[],init(){this.checkboxListOptions=Array.from(this.$root.querySelectorAll(".fi-fo-checkbox-list-option")),this.updateVisibleCheckboxListOptions(),this.$nextTick(()=>{this.checkIfAllCheckboxesAreChecked()}),this.unsubscribeLivewireHook=Livewire.interceptMessage(({message:e,onSuccess:t})=>{t(()=>{this.$nextTick(()=>{e.component.id===s&&(this.checkboxListOptions=Array.from(this.$root.querySelectorAll(".fi-fo-checkbox-list-option")),this.updateVisibleCheckboxListOptions(),this.checkIfAllCheckboxesAreChecked())})})}),this.$watch("search",()=>{this.updateVisibleCheckboxListOptions(),this.checkIfAllCheckboxesAreChecked()})},checkIfAllCheckboxesAreChecked(){this.areAllCheckboxesChecked=this.visibleCheckboxListOptions.length===this.visibleCheckboxListOptions.filter(e=>e.querySelector("input[type=checkbox]:checked, input[type=checkbox]:disabled")).length},toggleAllCheckboxes(){this.checkIfAllCheckboxesAreChecked();let e=!this.areAllCheckboxesChecked;this.visibleCheckboxListOptions.forEach(t=>{let i=t.querySelector("input[type=checkbox]");i.disabled||i.checked!==e&&(i.checked=e,i.dispatchEvent(new Event("change")))}),this.areAllCheckboxesChecked=e},updateVisibleCheckboxListOptions(){this.visibleCheckboxListOptions=this.checkboxListOptions.filter(e=>["",null,void 0].includes(this.search)||e.querySelector(".fi-fo-checkbox-list-option-label")?.innerText.toLowerCase().includes(this.search.toLowerCase())?!0:e.querySelector(".fi-fo-checkbox-list-option-description")?.innerText.toLowerCase().includes(this.search.toLowerCase()))},destroy(){this.unsubscribeLivewireHook?.()}}}export{c as default};
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+11
-18
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
function r({state:o}){return{state:o,rows:[],shouldUpdateRows:!0,init:function(){this.updateRows(),this.rows.length<=0?this.rows.push({key:"",value:""}):this.updateState(),this.$watch("state",(t,e)=>{let s=i=>i===null?0:Array.isArray(i)?i.length:typeof i!="object"?0:Object.keys(i).length;s(t)===0&&s(e)===0||this.updateRows()})},addRow:function(){this.rows.push({key:"",value:""}),this.updateState()},deleteRow:function(t){this.rows.splice(t,1),this.rows.length<=0&&this.addRow(),this.updateState()},reorderRows:function(t){let e=Alpine.raw(this.rows);this.rows=[];let s=e.splice(t.oldIndex,1)[0];e.splice(t.newIndex,0,s),this.$nextTick(()=>{this.rows=e,this.updateState()})},updateRows:function(){if(!this.shouldUpdateRows){this.shouldUpdateRows=!0;return}let t=[];for(let[e,s]of Object.entries(this.state??{}))t.push({key:e,value:s});this.rows=t},updateState:function(){let t={};this.rows.forEach(e=>{e.key===""||e.key===null||(t[e.key]=e.value)}),this.shouldUpdateRows=!1,this.state=t}}}export{r as default};
|
||||
function a({state:r}){return{state:r,rows:[],init(){this.updateRows(),this.rows.length<=0?this.rows.push({key:"",value:""}):this.updateState(),this.$watch("state",(e,t)=>{if(!Array.isArray(e))return;let s=i=>i===null?0:Array.isArray(i)?i.length:typeof i!="object"?0:Object.keys(i).length;s(e)===0&&s(t)===0||this.updateRows()})},addRow(){this.rows.push({key:"",value:""}),this.updateState()},deleteRow(e){this.rows.splice(e,1),this.rows.length<=0&&this.addRow(),this.updateState()},reorderRows(e){let t=Alpine.raw(this.rows);this.rows=[];let s=t.splice(e.oldIndex,1)[0];t.splice(e.newIndex,0,s),this.$nextTick(()=>{this.rows=t,this.updateState()})},updateRows(){let t=Alpine.raw(this.state).map(({key:s,value:i})=>({key:s,value:i}));this.rows.forEach(s=>{(s.key===""||s.key===null)&&t.push({key:"",value:s.value})}),this.rows=t},updateState(){let e=[];this.rows.forEach(t=>{t.key===""||t.key===null||e.push({key:t.key,value:t.value})}),JSON.stringify(this.state)!==JSON.stringify(e)&&(this.state=e)}}}export{a as default};
|
||||
|
||||
+30
-30
File diff suppressed because one or more lines are too long
+118
-124
File diff suppressed because one or more lines are too long
+8
-3
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
function i({state:a,splitKeys:n}){return{newTag:"",state:a,createTag:function(){if(this.newTag=this.newTag.trim(),this.newTag!==""){if(this.state.includes(this.newTag)){this.newTag="";return}this.state.push(this.newTag),this.newTag=""}},deleteTag:function(t){this.state=this.state.filter(e=>e!==t)},reorderTags:function(t){let e=this.state.splice(t.oldIndex,1)[0];this.state.splice(t.newIndex,0,e),this.state=[...this.state]},input:{"x-on:blur":"createTag()","x-model":"newTag","x-on:keydown"(t){["Enter",...n].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.createTag())},"x-on:paste"(){this.$nextTick(()=>{if(n.length===0){this.createTag();return}let t=n.map(e=>e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")).join("|");this.newTag.split(new RegExp(t,"g")).forEach(e=>{this.newTag=e,this.createTag()})})}}}}export{i as default};
|
||||
function s({state:n,splitKeys:a}){return{newTag:"",state:n,createTag(){if(this.newTag=this.newTag.trim(),this.newTag!==""){if(this.state.includes(this.newTag)){this.newTag="";return}this.state.push(this.newTag),this.newTag=""}},deleteTag(t){this.state=this.state.filter(e=>e!==t)},reorderTags(t){let e=this.state.splice(t.oldIndex,1)[0];this.state.splice(t.newIndex,0,e),this.state=[...this.state]},input:{"x-on:blur":"createTag()","x-model":"newTag","x-on:keydown"(t){["Enter",...a].includes(t.key)&&(t.preventDefault(),t.stopPropagation(),this.createTag())},"x-on:paste"(){this.$nextTick(()=>{if(a.length===0){this.createTag();return}let t=a.map(e=>e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")).join("|");this.newTag.split(new RegExp(t,"g")).forEach(e=>{this.newTag=e,this.createTag()})})}}}}export{s as default};
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
function r({initialHeight:t,shouldAutosize:i,state:s}){return{state:s,wrapperEl:null,init:function(){this.wrapperEl=this.$el.parentNode,this.setInitialHeight(),i?this.$watch("state",()=>{this.resize()}):this.setUpResizeObserver()},setInitialHeight:function(){this.$el.scrollHeight<=0||(this.wrapperEl.style.height=t+"rem")},resize:function(){if(this.setInitialHeight(),this.$el.scrollHeight<=0)return;let e=this.$el.scrollHeight+"px";this.wrapperEl.style.height!==e&&(this.wrapperEl.style.height=e)},setUpResizeObserver:function(){new ResizeObserver(()=>{this.wrapperEl.style.height=this.$el.style.height}).observe(this.$el)}}}export{r as default};
|
||||
function n({initialHeight:e,shouldAutosize:i,state:h}){return{state:h,wrapperEl:null,init(){this.wrapperEl=this.$el.parentNode,this.setInitialHeight(),i?this.$watch("state",()=>{this.resize()}):this.setUpResizeObserver()},setInitialHeight(){this.$el.scrollHeight<=0||(this.wrapperEl.style.height=e+"rem")},resize(){if(this.$el.scrollHeight<=0)return;let t=this.$el.style.height;this.$el.style.height="0px";let r=this.$el.scrollHeight;this.$el.style.height=t;let l=parseFloat(e)*parseFloat(getComputedStyle(document.documentElement).fontSize),s=Math.max(r,l)+"px";this.wrapperEl.style.height!==s&&(this.wrapperEl.style.height=s)},setUpResizeObserver(){new ResizeObserver(()=>{this.wrapperEl.style.height=this.$el.style.height}).observe(this.$el)}}}export{n as default};
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
var i=()=>({isSticky:!1,width:0,resizeObserver:null,boundUpdateWidth:null,init(){let e=this.$el.parentElement;e&&(this.updateWidth(),this.resizeObserver=new ResizeObserver(()=>this.updateWidth()),this.resizeObserver.observe(e),this.boundUpdateWidth=this.updateWidth.bind(this),window.addEventListener("resize",this.boundUpdateWidth))},enableSticky(){this.isSticky=this.$el.getBoundingClientRect().top>0},disableSticky(){this.isSticky=!1},updateWidth(){let e=this.$el.parentElement;if(!e)return;let t=getComputedStyle(this.$root.querySelector(".fi-ac"));this.width=e.offsetWidth+parseInt(t.marginInlineStart,10)*-1+parseInt(t.marginInlineEnd,10)*-1},destroy(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.boundUpdateWidth&&(window.removeEventListener("resize",this.boundUpdateWidth),this.boundUpdateWidth=null)}});export{i as default};
|
||||
@@ -0,0 +1 @@
|
||||
function v({activeTab:w,isScrollable:f,isTabPersistedInQueryString:m,livewireId:g,tab:T,tabQueryStringKey:r}){return{boundResizeHandler:null,isScrollable:f,resizeDebounceTimer:null,tab:T,unsubscribeLivewireHook:null,withinDropdownIndex:null,withinDropdownMounted:!1,init(){let t=this.getTabs(),e=new URLSearchParams(window.location.search);m&&e.has(r)&&t.includes(e.get(r))&&(this.tab=e.get(r)),(!this.tab||!t.includes(this.tab))&&(this.tab=t[w-1]),this.$watch("tab",()=>{this.updateQueryString(),this.autofocusFields()}),this.autofocusFields(!0),this.unsubscribeLivewireHook=Livewire.interceptMessage(({message:i,onSuccess:a})=>{a(()=>{this.$nextTick(()=>{if(i.component.id!==g)return;let l=this.getTabs();l.includes(this.tab)||(this.tab=l[w-1]??this.tab)})})}),f||(this.boundResizeHandler=this.debouncedUpdateTabsWithinDropdown.bind(this),window.addEventListener("resize",this.boundResizeHandler),this.updateTabsWithinDropdown())},calculateAvailableWidth(t){let e=window.getComputedStyle(t);return Math.floor(t.clientWidth)-Math.ceil(parseFloat(e.paddingLeft))*2},calculateContainerGap(t){let e=window.getComputedStyle(t);return Math.ceil(parseFloat(e.columnGap))},calculateDropdownIconWidth(t){let e=t.querySelector(".fi-icon");return Math.ceil(e.clientWidth)},calculateTabItemGap(t){let e=window.getComputedStyle(t);return Math.ceil(parseFloat(e.columnGap)||8)},calculateTabItemPadding(t){let e=window.getComputedStyle(t);return Math.ceil(parseFloat(e.paddingLeft))+Math.ceil(parseFloat(e.paddingRight))},findOverflowIndex(t,e,i,a,l,h){let u=t.map(n=>Math.ceil(n.clientWidth)),b=t.map(n=>{let c=n.querySelector(".fi-tabs-item-label"),s=n.querySelector(".fi-badge"),o=Math.ceil(c.clientWidth),d=s?Math.ceil(s.clientWidth):0;return{label:o,badge:d,total:o+(d>0?a+d:0)}});for(let n=0;n<t.length;n++){let c=u.slice(0,n+1).reduce((p,y)=>p+y,0),s=n*i,o=b.slice(n+1),d=o.length>0,D=d?Math.max(...o.map(p=>p.total)):0,W=d?l+D+a+h+i:0;if(c+s+W>e)return n}return-1},get isDropdownButtonVisible(){return this.withinDropdownMounted?this.withinDropdownIndex===null?!1:this.getTabs().findIndex(e=>e===this.tab)<this.withinDropdownIndex:!0},getTabs(){return this.$refs.tabsData?JSON.parse(this.$refs.tabsData.value):[]},updateQueryString(){if(!m)return;let t=new URL(window.location.href);t.searchParams.set(r,this.tab),history.replaceState(null,document.title,t.toString())},autofocusFields(t=!1){this.$nextTick(()=>{if(t&&document.activeElement&&document.activeElement!==document.body&&this.$el.compareDocumentPosition(document.activeElement)&Node.DOCUMENT_POSITION_PRECEDING)return;let e=this.$el.querySelectorAll(".fi-sc-tabs-tab.fi-active [autofocus]");for(let i of e)if(i.focus(),document.activeElement===i)break})},debouncedUpdateTabsWithinDropdown(){clearTimeout(this.resizeDebounceTimer),this.resizeDebounceTimer=setTimeout(()=>this.updateTabsWithinDropdown(),150)},async updateTabsWithinDropdown(){this.withinDropdownIndex=null,this.withinDropdownMounted=!1,await this.$nextTick();let t=this.$el.querySelector(".fi-tabs"),e=t.querySelector(".fi-tabs-item:last-child"),i=Array.from(t.children).slice(0,-1),a=i.map(s=>s.style.display);i.forEach(s=>s.style.display=""),t.offsetHeight;let l=this.calculateAvailableWidth(t),h=this.calculateContainerGap(t),u=this.calculateDropdownIconWidth(e),b=this.calculateTabItemGap(i[0]),n=this.calculateTabItemPadding(i[0]),c=this.findOverflowIndex(i,l,h,b,n,u);i.forEach((s,o)=>s.style.display=a[o]),c!==-1&&(this.withinDropdownIndex=c),this.withinDropdownMounted=!0},destroy(){this.unsubscribeLivewireHook?.(),this.boundResizeHandler&&window.removeEventListener("resize",this.boundResizeHandler),clearTimeout(this.resizeDebounceTimer)}}}export{v as default};
|
||||
@@ -0,0 +1 @@
|
||||
function p({isSkippable:i,isStepPersistedInQueryString:n,key:r,startStep:o,stepQueryStringKey:h}){return{step:null,init(){this.step=this.getSteps().at(o-1),this.$watch("step",()=>{this.updateQueryString(),this.autofocusFields()}),this.autofocusFields(!0)},async requestNextStep(){await this.$wire.callSchemaComponentMethod(r,"nextStep",{currentStepIndex:this.getStepIndex(this.step)})},goToNextStep(){let t=this.getStepIndex(this.step)+1;t>=this.getSteps().length||(this.step=this.getSteps()[t],this.scroll())},goToPreviousStep(){let t=this.getStepIndex(this.step)-1;t<0||(this.step=this.getSteps()[t],this.scroll())},goToStep(t){let e=this.getStepIndex(t);e<=-1||!i&&e>this.getStepIndex(this.step)||(this.step=t,this.scroll())},scroll(){this.$nextTick(()=>{this.$refs.header?.children[this.getStepIndex(this.step)].scrollIntoView({behavior:"smooth",block:"start"})})},autofocusFields(t=!1){this.$nextTick(()=>{if(t&&document.activeElement&&document.activeElement!==document.body&&this.$el.compareDocumentPosition(document.activeElement)&Node.DOCUMENT_POSITION_PRECEDING)return;let e=this.$refs[`step-${this.step}`]?.querySelectorAll("[autofocus]")??[];for(let s of e)if(s.focus(),document.activeElement===s)break})},getStepIndex(t){let e=this.getSteps().findIndex(s=>s===t);return e===-1?0:e},getSteps(){return JSON.parse(this.$refs.stepsData.value)},isFirstStep(){return this.getStepIndex(this.step)<=0},isLastStep(){return this.getStepIndex(this.step)+1>=this.getSteps().length},isStepAccessible(t){return i||this.getStepIndex(this.step)>this.getStepIndex(t)},updateQueryString(){if(!n)return;let t=new URL(window.location.href);t.searchParams.set(h,this.step),history.replaceState(null,document.title,t.toString())}}}export{p as default};
|
||||
+1
@@ -0,0 +1 @@
|
||||
(()=>{var o=()=>({isSticky:!1,width:0,resizeObserver:null,boundUpdateWidth:null,init(){let i=this.$el.parentElement;i&&(this.updateWidth(),this.resizeObserver=new ResizeObserver(()=>this.updateWidth()),this.resizeObserver.observe(i),this.boundUpdateWidth=this.updateWidth.bind(this),window.addEventListener("resize",this.boundUpdateWidth))},enableSticky(){this.isSticky=this.$el.getBoundingClientRect().top>0},disableSticky(){this.isSticky=!1},updateWidth(){let i=this.$el.parentElement;if(!i)return;let e=getComputedStyle(this.$root.querySelector(".fi-ac"));this.width=i.offsetWidth+parseInt(e.marginInlineStart,10)*-1+parseInt(e.marginInlineEnd,10)*-1},destroy(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.boundUpdateWidth&&(window.removeEventListener("resize",this.boundUpdateWidth),this.boundUpdateWidth=null)}});var a=function(i,e,n){let t=i;if(e.startsWith("/")&&(n=!0,e=e.slice(1)),n)return e;for(;e.startsWith("../");)t=t.includes(".")?t.slice(0,t.lastIndexOf(".")):null,e=e.slice(3);return["",null,void 0].includes(t)?e:["",null,void 0].includes(e)?t:`${t}.${e}`},d=i=>{let e=Alpine.findClosest(i,n=>n.__livewire);if(!e)throw"Could not find Livewire component in DOM tree.";return e.__livewire};document.addEventListener("alpine:init",()=>{window.Alpine.data("filamentSchema",({livewireId:i})=>({handleFormValidationError(e){e.detail.livewireId===i&&this.$nextTick(()=>{let n=this.$el.querySelector("[data-validation-error]");if(!n)return;let t=n;for(;t;)t.dispatchEvent(new CustomEvent("expand")),t=t.parentNode;setTimeout(()=>n.closest("[data-field-wrapper]").scrollIntoView({behavior:"smooth",block:"start",inline:"start"}),200)})},isStateChanged(e,n){if(e===void 0)return!1;try{return JSON.stringify(e)!==JSON.stringify(n)}catch{return e!==n}}})),window.Alpine.data("filamentSchemaComponent",({path:i,containerPath:e,$wire:n})=>({$statePath:i,$get:(t,r)=>n.$get(a(e,t,r)),$set:(t,r,s,l=!1)=>n.$set(a(e,t,s),r,l),get $state(){return n.$get(i)}})),window.Alpine.data("filamentActionsSchemaComponent",o),Livewire.interceptMessage(({message:i,onSuccess:e})=>{e(({payload:n})=>{n.effects?.dispatches?.forEach(t=>{if(!t.params?.awaitSchemaComponent)return;let r=Array.from(i.component.el.querySelectorAll(`[wire\\:partial="schema-component::${t.params.awaitSchemaComponent}"]`)).filter(s=>d(s)===i.component);if(r.length!==1){if(r.length>1)throw`Multiple schema components found with key [${t.params.awaitSchemaComponent}].`;window.addEventListener(`schema-component-${component.id}-${t.params.awaitSchemaComponent}-loaded`,()=>{window.dispatchEvent(new CustomEvent(t.name,{detail:t.params}))},{once:!0})}})})})});})();
|
||||
+6
-6
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
function a({name:r,recordKey:s,state:n}){return{error:void 0,isLoading:!1,state:n,unsubscribeLivewireHook:null,init(){this.unsubscribeLivewireHook=Livewire.interceptMessage(({message:e,onSuccess:t})=>{t(()=>{this.$nextTick(()=>{if(this.isLoading||e.component.id!==this.$root.closest("[wire\\:id]")?.attributes["wire:id"].value)return;let i=this.getServerState();i===void 0||Alpine.raw(this.state)===i||(this.state=i)})})}),this.$watch("state",async()=>{let e=this.getServerState();if(e===void 0||Alpine.raw(this.state)===e)return;this.isLoading=!0;let t=await this.$wire.updateTableColumnState(r,s,this.state);this.error=t?.error??void 0,!this.error&&this.$refs.serverState&&(this.$refs.serverState.value=this.state?"1":"0"),this.isLoading=!1})},getServerState(){if(this.$refs.serverState)return[1,"1"].includes(this.$refs.serverState.value)},destroy(){this.unsubscribeLivewireHook?.()}}}export{a as default};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
function a({name:i,recordKey:s,state:n}){return{error:void 0,isLoading:!1,state:n,unsubscribeLivewireHook:null,init(){this.unsubscribeLivewireHook=Livewire.interceptMessage(({message:e,onSuccess:t})=>{t(()=>{this.$nextTick(()=>{if(this.isLoading||e.component.id!==this.$root.closest("[wire\\:id]")?.attributes["wire:id"].value)return;let r=this.getServerState();r===void 0||this.getNormalizedState()===r||(this.state=r)})})}),this.$watch("state",async()=>{let e=this.getServerState();if(e===void 0||this.getNormalizedState()===e)return;this.isLoading=!0;let t=await this.$wire.updateTableColumnState(i,s,this.state);this.error=t?.error??void 0,!this.error&&this.$refs.serverState&&(this.$refs.serverState.value=this.getNormalizedState()),this.isLoading=!1})},getServerState(){if(this.$refs.serverState)return[null,void 0].includes(this.$refs.serverState.value)?"":this.$refs.serverState.value.replaceAll('\\"','"')},getNormalizedState(){let e=Alpine.raw(this.state);return[null,void 0].includes(e)?"":e},destroy(){this.unsubscribeLivewireHook?.()}}}export{a as default};
|
||||
@@ -0,0 +1 @@
|
||||
function a({name:r,recordKey:s,state:n}){return{error:void 0,isLoading:!1,state:n,unsubscribeLivewireHook:null,init(){this.unsubscribeLivewireHook=Livewire.interceptMessage(({message:e,onSuccess:t})=>{t(()=>{this.$nextTick(()=>{if(this.isLoading||e.component.id!==this.$root.closest("[wire\\:id]")?.attributes["wire:id"].value)return;let i=this.getServerState();i===void 0||Alpine.raw(this.state)===i||(this.state=i)})})}),this.$watch("state",async()=>{let e=this.getServerState();if(e===void 0||Alpine.raw(this.state)===e)return;this.isLoading=!0;let t=await this.$wire.updateTableColumnState(r,s,this.state);this.error=t?.error??void 0,!this.error&&this.$refs.serverState&&(this.$refs.serverState.value=this.state?"1":"0"),this.isLoading=!1})},getServerState(){if(this.$refs.serverState)return[1,"1"].includes(this.$refs.serverState.value)},destroy(){this.unsubscribeLivewireHook?.()}}}export{a as default};
|
||||
Vendored
+1
File diff suppressed because one or more lines are too long
+12
-12
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user