wip add storage to git
This commit is contained in:
1 parent
5fe81c3870
commit
21faf46f76
149 files changed
+1586
-43
No files matched your search
@@ -26,8 +26,8 @@ class Fixtures
|
||||
/**
|
||||
* Delete
|
||||
*/
|
||||
$info = 0;
|
||||
// $info = Event::where('starttime', '<', $now->toDateTimeString())->delete();
|
||||
// $info = 0;
|
||||
$info = Event::where('starttime', '<', $now->toDateTimeString())->delete();
|
||||
|
||||
if ($debug) {
|
||||
Notice::note("Deleted: $info");
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Clusters\Settings;
|
||||
|
||||
use BackedEnum;
|
||||
use Filament\Clusters\Cluster;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
|
||||
class SettingsCluster extends Cluster
|
||||
{
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedSquares2x2;
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Bettypes;
|
||||
|
||||
use App\Filament\Clusters\Administrator\AdministratorCluster;
|
||||
use App\Filament\Resources\Bettypes\Pages\ListBettypes;
|
||||
use App\Filament\Resources\Bettypes\Schemas\BettypeForm;
|
||||
use App\Filament\Resources\Bettypes\Tables\BettypesTable;
|
||||
use App\Models\Bettype;
|
||||
use BackedEnum;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class BettypeResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Bettype::class;
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::AdjustmentsHorizontal;
|
||||
|
||||
protected static ?string $cluster = AdministratorCluster::class;
|
||||
|
||||
protected static string|\UnitEnum|null $navigationGroup = 'Static Data';
|
||||
|
||||
protected static ?string $navigationLabel = 'Bettype';
|
||||
|
||||
protected static ?string $modelLabel = 'Bettype';
|
||||
|
||||
protected static ?string $title = 'Bettype';
|
||||
|
||||
protected static ?string $pluralModelLabel = 'Bettypes';
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return BettypeForm::configure($schema);
|
||||
}
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return BettypesTable::configure($table);
|
||||
}
|
||||
|
||||
public static function getRelations(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => ListBettypes::route('/'),
|
||||
];
|
||||
}
|
||||
|
||||
public static function getNavigationBadge(): ?string
|
||||
{
|
||||
return parent::getEloquentQuery()->count();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Bettypes\Pages;
|
||||
|
||||
use App\Filament\Resources\Bettypes\BettypeResource;
|
||||
use Filament\Resources\Pages\CreateRecord;
|
||||
|
||||
class CreateBettype extends CreateRecord
|
||||
{
|
||||
protected static string $resource = BettypeResource::class;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Bettypes\Pages;
|
||||
|
||||
use App\Filament\Resources\Bettypes\BettypeResource;
|
||||
use Filament\Actions\DeleteAction;
|
||||
use Filament\Resources\Pages\EditRecord;
|
||||
|
||||
class EditBettype extends EditRecord
|
||||
{
|
||||
protected static string $resource = BettypeResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
DeleteAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Bettypes\Pages;
|
||||
|
||||
use App\Filament\Resources\Bettypes\BettypeResource;
|
||||
use Filament\Actions\CreateAction;
|
||||
use Filament\Resources\Pages\ListRecords;
|
||||
|
||||
class ListBettypes extends ListRecords
|
||||
{
|
||||
protected static string $resource = BettypeResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
CreateAction::make(),
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Bettypes\Schemas;
|
||||
|
||||
use Filament\Schemas\Schema;
|
||||
|
||||
class BettypeForm
|
||||
{
|
||||
public static function configure(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
//
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\Bettypes\Tables;
|
||||
|
||||
use App\Models\Sport;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Tables\Columns\IconColumn;
|
||||
use Filament\Tables\Columns\TextColumn;
|
||||
use Filament\Tables\Filters\SelectFilter;
|
||||
use Filament\Tables\Table;
|
||||
|
||||
class BettypesTable
|
||||
{
|
||||
public static function configure(Table $table): Table
|
||||
{
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('bettype_id')
|
||||
->width('1rem')
|
||||
->searchable()->label('Id'),
|
||||
IconColumn::make('sport.icon')
|
||||
->label('')
|
||||
->width('1rem')
|
||||
->icon(function ($record): string {
|
||||
return $record->sport->icon;
|
||||
}),
|
||||
TextColumn::make('sport.name'),
|
||||
TextColumn::make('name')->searchable(),
|
||||
IconColumn::make('ft')->boolean()->trueIcon('phosphor-check-circle-fill')->falseIcon('phosphor-circle')->falseColor('gray'),
|
||||
IconColumn::make('ht')->boolean()->trueIcon('phosphor-check-circle-fill')->falseIcon('phosphor-circle')->falseColor('gray'),
|
||||
IconColumn::make('h2')->boolean()->trueIcon('phosphor-check-circle-fill')->falseIcon('phosphor-circle')->falseColor('gray'),
|
||||
IconColumn::make('co')->boolean()->trueIcon('phosphor-check-circle-fill')->falseIcon('phosphor-circle')->falseColor('gray'),
|
||||
IconColumn::make('q1')->boolean()->trueIcon('phosphor-check-circle-fill')->falseIcon('phosphor-circle')->falseColor('gray'),
|
||||
IconColumn::make('p1')->boolean()->trueIcon('phosphor-check-circle-fill')->falseIcon('phosphor-circle')->falseColor('gray'),
|
||||
IconColumn::make('q1')->boolean()->trueIcon('phosphor-check-circle-fill')->falseIcon('phosphor-circle')->falseColor('gray'),
|
||||
])
|
||||
->filters([
|
||||
SelectFilter::make('sport_id')
|
||||
->label('Sport')
|
||||
->options(fn () => Sport::where('is_active', 1)->pluck('name', 'id')
|
||||
->toArray()),
|
||||
])
|
||||
->recordActions([
|
||||
EditAction::make(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -6,5 +6,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Bettype extends Model
|
||||
{
|
||||
//
|
||||
public function sport()
|
||||
{
|
||||
return $this->belongsTo(Sport::class);
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Providers\Filament;
|
||||
|
||||
use App\Filament\Resources\Events\Pages\ListEvents;
|
||||
use Awcodes\LightSwitch\Enums\Alignment;
|
||||
use Awcodes\LightSwitch\LightSwitchPlugin;
|
||||
use Filament\Actions\Action;
|
||||
@@ -16,8 +17,10 @@ use Filament\Pages\Dashboard;
|
||||
use Filament\Panel;
|
||||
use Filament\PanelProvider;
|
||||
use Filament\Support\Enums\Width;
|
||||
use Filament\Tables\View\TablesRenderHook;
|
||||
use Filament\Widgets\AccountWidget;
|
||||
use Filament\Widgets\FilamentInfoWidget;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
|
||||
use Illuminate\Cookie\Middleware\EncryptCookies;
|
||||
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;
|
||||
@@ -44,6 +47,11 @@ class AdminPanelProvider extends PanelProvider
|
||||
->databaseNotifications()
|
||||
->profile(isSimple: false)
|
||||
->default()
|
||||
->renderHook(
|
||||
TablesRenderHook::TOOLBAR_START,
|
||||
fn (): View => view('filament.mapper.sport-menu'),
|
||||
ListEvents::class
|
||||
)
|
||||
// ->brandLogo(asset('images/nuh-combined.svg'))
|
||||
// ->darkModeBrandLogo(asset('images/nuh-combined-d.svg'))
|
||||
->brandLogo(asset('images/nuh-odds.svg'))
|
||||
|
||||
@@ -77,6 +77,6 @@ class BookmakerIcon
|
||||
break;
|
||||
}
|
||||
|
||||
return asset("storage/book-icons/$image");
|
||||
return asset("storage/bookmaker-icons/$image");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user