Upgrade to filament v4

This commit is contained in:
Anna-Sara Sélea 2026-06-02 07:18:23 +02:00
parent 8c777ae294
commit 6a6093c437
55 changed files with 2901 additions and 1688 deletions

View file

@ -2,7 +2,7 @@
namespace App\Filament\Pages; namespace App\Filament\Pages;
use Filament\Pages\BasePage; use Filament\Pages\Page as BasePage;
use App\Filament\Resources\ItemResource\Pages; use App\Filament\Resources\ItemResource\Pages;
use App\Models\Item; use App\Models\Item;
use App\Models\User; use App\Models\User;
@ -19,15 +19,16 @@ use App\Models\Reserveditem;
use Filament\Forms\Components\TextInput; use Filament\Forms\Components\TextInput;
use Carbon\Carbon; use Carbon\Carbon;
use Filament\Infolists\Components\TextEntry; use Filament\Infolists\Components\TextEntry;
use Filament\Infolists\Components\Section; use Filament\Schemas\Components\Section;
use Filament\Tables\Contracts\HasTable; use Filament\Tables\Contracts\HasTable;
use Filament\Tables\Concerns\InteractsWithTable; use Filament\Tables\Concerns\InteractsWithTable;
use Filament\Infolists\Components\ImageEntry; use Filament\Infolists\Components\ImageEntry;
use Filament\Tables\Columns\TextColumn; use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Columns\ImageColumn; use Filament\Tables\Columns\ImageColumn;
use Filament\Tables\Actions\Action; use Filament\Actions\Action;
use Filament\Tables\Columns\Layout\Stack; use Filament\Tables\Columns\Layout\Stack;
use Filament\Support\Enums\FontWeight; use Filament\Support\Enums\FontWeight;
use Filament\Support\Enums\TextSize;
use Filament\Tables\Columns\Layout\Grid; use Filament\Tables\Columns\Layout\Grid;
use Filament\Notifications\Notification; use Filament\Notifications\Notification;
use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Builder;
@ -41,11 +42,16 @@ class Reserve extends BasePage implements HasTable
{ {
use InteractsWithTable; use InteractsWithTable;
protected static ?string $navigationIcon = 'heroicon-o-document-text'; protected static bool $shouldRegisterNavigation = false;
protected static string $view = 'filament.pages.reserve'; public static function getRoutePath(\Filament\Panel $panel): string
{
return '/';
}
protected static ?string $title = "Reservera spel | vBytes Inventory"; protected string $view = 'filament.pages.reserve';
protected static ?string $title = 'Reservera spel';
public static function table(Table $table): Table public static function table(Table $table): Table
@ -66,6 +72,7 @@ class Reserve extends BasePage implements HasTable
->badge(), ->badge(),
ImageColumn::make('image') ImageColumn::make('image')
->label('Bild') ->label('Bild')
->disk('public')
->size('100%') ->size('100%')
->extraImgAttributes([ ->extraImgAttributes([
'class' => 'rounded-md', 'class' => 'rounded-md',
@ -77,7 +84,7 @@ class Reserve extends BasePage implements HasTable
->sortable() ->sortable()
->searchable() ->searchable()
->weight(FontWeight::Bold) ->weight(FontWeight::Bold)
->size(TextColumn\TextColumnSize::Large), ->size(TextSize::Large),
Stack::make([ Stack::make([
TextColumn::make('players') TextColumn::make('players')
->label('Antal spelare') ->label('Antal spelare')
@ -210,12 +217,11 @@ class Reserve extends BasePage implements HasTable
->infolist([ ->infolist([
Section::make('') Section::make('')
->schema([ ->schema([
ImageEntry::make('image') ImageEntry::make('image')
->translateLabel() ->translateLabel()
->disk('public')
->width(300) ->width(300)
->height('auto'), ->height('auto'),
//->disk('local')
//->visibility('private'),
TextEntry::make('desc') TextEntry::make('desc')
->label('Description') ->label('Description')
->translateLabel(), ->translateLabel(),
@ -234,7 +240,8 @@ class Reserve extends BasePage implements HasTable
->translateLabel() ->translateLabel()
->schema([ ->schema([
ImageEntry::make('image') ImageEntry::make('image')
->translateLabel(), ->translateLabel()
->disk('public'),
TextEntry::make('desc') TextEntry::make('desc')
->label('Description') ->label('Description')
->translateLabel(), ->translateLabel(),

View file

@ -6,7 +6,7 @@ use App\Filament\Resources\CategoryResource\Pages;
use App\Filament\Resources\CategoryResource\RelationManagers; use App\Filament\Resources\CategoryResource\RelationManagers;
use App\Models\Category; use App\Models\Category;
use Filament\Forms; use Filament\Forms;
use Filament\Forms\Form; use Filament\Schemas\Schema;
use Filament\Resources\Resource; use Filament\Resources\Resource;
use Filament\Tables; use Filament\Tables;
use Filament\Tables\Table; use Filament\Tables\Table;
@ -15,13 +15,16 @@ use Illuminate\Database\Eloquent\SoftDeletingScope;
use Filament\Forms\Components\TextInput; use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Select; use Filament\Forms\Components\Select;
use Filament\Tables\Columns\TextColumn; use Filament\Tables\Columns\TextColumn;
use Filament\Actions\EditAction;
use Filament\Actions\BulkActionGroup;
use Filament\Actions\DeleteBulkAction;
class CategoryResource extends Resource class CategoryResource extends Resource
{ {
protected static ?string $model = Category::class; protected static ?string $model = Category::class;
protected static ?string $navigationIcon = 'heroicon-o-bookmark'; protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-bookmark';
public static function getNavigationLabel(): string public static function getNavigationLabel(): string
{ {
@ -38,9 +41,9 @@ class CategoryResource extends Resource
return __('Category'); return __('Category');
} }
public static function form(Form $form): Form public static function form(Schema $schema): Schema
{ {
return $form return $schema
->schema([ ->schema([
TextInput::make('name') TextInput::make('name')
->translateLabel() ->translateLabel()
@ -74,11 +77,11 @@ class CategoryResource extends Resource
// //
]) ])
->actions([ ->actions([
Tables\Actions\EditAction::make(), EditAction::make(),
]) ])
->bulkActions([ ->bulkActions([
Tables\Actions\BulkActionGroup::make([ BulkActionGroup::make([
Tables\Actions\DeleteBulkAction::make(), DeleteBulkAction::make(),
]), ]),
]); ]);
} }

View file

@ -8,7 +8,7 @@ use App\Models\Item;
use App\Models\User; use App\Models\User;
use App\Models\Category; use App\Models\Category;
use Filament\Forms; use Filament\Forms;
use Filament\Forms\Form; use Filament\Schemas\Schema;
use Filament\Resources\Resource; use Filament\Resources\Resource;
use Filament\Tables; use Filament\Tables;
use Filament\Tables\Table; use Filament\Tables\Table;
@ -26,7 +26,7 @@ use Carbon\Carbon;
use Filament\Support\Enums\IconPosition; use Filament\Support\Enums\IconPosition;
use Filament\Infolists\Components\TextEntry; use Filament\Infolists\Components\TextEntry;
use Filament\Infolists\Components\ImageEntry; use Filament\Infolists\Components\ImageEntry;
use Filament\Infolists\Components\Section; use Filament\Schemas\Components\Section;
use Illuminate\Support\Facades\Mail; use Illuminate\Support\Facades\Mail;
use App\Mail\ReservationCreatedUser; use App\Mail\ReservationCreatedUser;
use App\Mail\ReservationCreated; use App\Mail\ReservationCreated;
@ -36,7 +36,10 @@ use Filament\Forms\Components\Toggle;
use Filament\Tables\Columns\TextColumn; use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Columns\ImageColumn; use Filament\Tables\Columns\ImageColumn;
use Filament\Tables\Columns\IconColumn; use Filament\Tables\Columns\IconColumn;
use Filament\Tables\Actions\Action; use Filament\Actions\Action;
use Filament\Actions\EditAction;
use Filament\Actions\BulkActionGroup;
use Filament\Actions\DeleteBulkAction;
use Filament\Forms\Components\Checkbox; use Filament\Forms\Components\Checkbox;
@ -44,7 +47,7 @@ class ItemResource extends Resource
{ {
protected static ?string $model = Item::class; protected static ?string $model = Item::class;
protected static ?string $navigationIcon = 'heroicon-o-archive-box'; protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-archive-box';
public static function getNavigationLabel(): string public static function getNavigationLabel(): string
{ {
@ -61,9 +64,9 @@ class ItemResource extends Resource
return __('Inventory'); return __('Inventory');
} }
public static function form(Form $form): Form public static function form(Schema $schema): Schema
{ {
return $form return $schema
->schema([ ->schema([
Radio::make('type') Radio::make('type')
->translateLabel() ->translateLabel()
@ -160,6 +163,7 @@ class ItemResource extends Resource
ImageColumn::make('image') ImageColumn::make('image')
->label('Image') ->label('Image')
->translateLabel() ->translateLabel()
->disk('public')
->extraImgAttributes([ ->extraImgAttributes([
'class' => 'rounded-md', 'class' => 'rounded-md',
'loading' => 'lazy' 'loading' => 'lazy'
@ -249,12 +253,11 @@ class ItemResource extends Resource
->infolist([ ->infolist([
Section::make('') Section::make('')
->schema([ ->schema([
ImageEntry::make('image') ImageEntry::make('image')
->translateLabel() ->translateLabel()
->disk('public')
->width(300) ->width(300)
->height('auto'), ->height('auto'),
//->disk('local')
//->visibility('private'),
TextEntry::make('desc') TextEntry::make('desc')
->label('Description') ->label('Description')
->translateLabel(), ->translateLabel(),
@ -277,7 +280,8 @@ class ItemResource extends Resource
->translateLabel() ->translateLabel()
->schema([ ->schema([
ImageEntry::make('image') ImageEntry::make('image')
->translateLabel(), ->translateLabel()
->disk('public'),
TextEntry::make('desc') TextEntry::make('desc')
->label('Description') ->label('Description')
->translateLabel(), ->translateLabel(),
@ -296,7 +300,8 @@ class ItemResource extends Resource
->translateLabel() ->translateLabel()
->schema([ ->schema([
ImageEntry::make('image') ImageEntry::make('image')
->translateLabel(), ->translateLabel()
->disk('public'),
TextEntry::make('desc') TextEntry::make('desc')
->label('Description') ->label('Description')
->translateLabel(), ->translateLabel(),
@ -311,11 +316,11 @@ class ItemResource extends Resource
->hidden(fn ($record) => $record->type === "game" || $record->type === 'item'), ->hidden(fn ($record) => $record->type === "game" || $record->type === 'item'),
]), ]),
Tables\Actions\EditAction::make() EditAction::make()
->button() ->button()
->icon('heroicon-m-pencil-square') ->icon('heroicon-m-pencil-square')
->iconPosition(IconPosition::After), ->iconPosition(IconPosition::After),
Tables\Actions\Action::make('reserve') Action::make('reserve')
->label('Reserve') ->label('Reserve')
->translateLabel() ->translateLabel()
->button() ->button()
@ -356,8 +361,8 @@ class ItemResource extends Resource
->hidden(fn ($record) => $record->reserved) ->hidden(fn ($record) => $record->reserved)
]) ])
->bulkActions([ ->bulkActions([
Tables\Actions\BulkActionGroup::make([ BulkActionGroup::make([
Tables\Actions\DeleteBulkAction::make(), DeleteBulkAction::make(),
]), ]),
]); ]);
} }

View file

@ -7,7 +7,7 @@ use App\Filament\Resources\ReserveditemResource\RelationManagers;
use App\Models\Reserveditem; use App\Models\Reserveditem;
use App\Models\Item; use App\Models\Item;
use Filament\Forms; use Filament\Forms;
use Filament\Forms\Form; use Filament\Schemas\Schema;
use Filament\Resources\Resource; use Filament\Resources\Resource;
use Filament\Resources\Get; use Filament\Resources\Get;
use Filament\Tables; use Filament\Tables;
@ -22,9 +22,14 @@ use Filament\Support\Enums\IconPosition;
use Filament\Tables\Columns\TextColumn; use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Columns\ImageColumn; use Filament\Tables\Columns\ImageColumn;
use Filament\Tables\Columns\IconColumn; use Filament\Tables\Columns\IconColumn;
use Filament\Tables\Actions\Action; use Filament\Actions\Action;
use Filament\Actions\EditAction;
use Filament\Actions\DeleteAction;
use Filament\Actions\BulkActionGroup;
use Filament\Actions\DeleteBulkAction;
use Filament\Tables\Columns\Layout\Stack; use Filament\Tables\Columns\Layout\Stack;
use Filament\Support\Enums\FontWeight; use Filament\Support\Enums\FontWeight;
use Filament\Support\Enums\TextSize;
use Illuminate\Support\Facades\Mail; use Illuminate\Support\Facades\Mail;
use App\Mail\ReservationDeletedUser; use App\Mail\ReservationDeletedUser;
@ -33,7 +38,7 @@ class ReserveditemResource extends Resource
{ {
protected static ?string $model = Reserveditem::class; protected static ?string $model = Reserveditem::class;
protected static ?string $navigationIcon = 'heroicon-o-archive-box-x-mark'; protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-archive-box-x-mark';
public static function getNavigationLabel(): string public static function getNavigationLabel(): string
{ {
@ -50,9 +55,9 @@ class ReserveditemResource extends Resource
return __('Reservation'); return __('Reservation');
} }
public static function form(Form $form): Form public static function form(Schema $schema): Schema
{ {
return $form return $schema
->schema([ ->schema([
TextInput::make('username') TextInput::make('username')
->label('Name') ->label('Name')
@ -91,7 +96,7 @@ class ReserveditemResource extends Resource
->translateLabel() ->translateLabel()
->sortable() ->sortable()
->weight(FontWeight::Bold) ->weight(FontWeight::Bold)
->size(TextColumn\TextColumnSize::Large), ->size(TextSize::Large),
TextColumn::make('username') TextColumn::make('username')
->label('User') ->label('User')
->translateLabel() ->translateLabel()
@ -134,11 +139,11 @@ class ReserveditemResource extends Resource
// //
]) ])
->actions([ ->actions([
Tables\Actions\EditAction::make() EditAction::make()
->button() ->button()
->icon('heroicon-m-pencil-square') ->icon('heroicon-m-pencil-square')
->iconPosition(IconPosition::After), ->iconPosition(IconPosition::After),
Tables\Actions\DeleteAction::make() DeleteAction::make()
->action(function (array $data, Reserveditem $record): void { ->action(function (array $data, Reserveditem $record): void {
$record->delete(); $record->delete();
Item::where('id', $record->item_id)->update(['reserved' => false]); Item::where('id', $record->item_id)->update(['reserved' => false]);

View file

@ -7,7 +7,7 @@ use App\Filament\Resources\ReserveditemResourceUser\RelationManagers;
use App\Models\Reserveditem; use App\Models\Reserveditem;
use App\Models\Item; use App\Models\Item;
use Filament\Forms; use Filament\Forms;
use Filament\Forms\Form; use Filament\Schemas\Schema;
use Filament\Resources\Resource; use Filament\Resources\Resource;
use Filament\Tables; use Filament\Tables;
use Filament\Tables\Table; use Filament\Tables\Table;
@ -21,21 +21,23 @@ use Filament\Support\Enums\IconPosition;
use Filament\Tables\Columns\TextColumn; use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Columns\ImageColumn; use Filament\Tables\Columns\ImageColumn;
use Filament\Tables\Columns\IconColumn; use Filament\Tables\Columns\IconColumn;
use Filament\Tables\Actions\Action; use Filament\Actions\Action;
use Filament\Actions\BulkActionGroup;
use Filament\Actions\DeleteBulkAction;
class ReserveditemResourceUser extends Resource class ReserveditemResourceUser extends Resource
{ {
protected static ?string $model = Reserveditem::class; protected static ?string $model = Reserveditem::class;
protected static ?string $navigationIcon = 'heroicon-o-archive-box-x-mark'; protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-archive-box-x-mark';
protected static ?string $modelLabel = 'Reserve items'; protected static ?string $modelLabel = 'Reserve items';
protected static ?string $slug = 'user'; protected static ?string $slug = 'user';
public static function form(Form $form): Form public static function form(Schema $schema): Schema
{ {
return $form return $schema
->schema([ ->schema([
Select::make('item_id') Select::make('item_id')
->label('Choose an item to reserve') ->label('Choose an item to reserve')
@ -83,8 +85,8 @@ class ReserveditemResourceUser extends Resource
->actions([ ->actions([
]) ])
->bulkActions([ ->bulkActions([
Tables\Actions\BulkActionGroup::make([ BulkActionGroup::make([
Tables\Actions\DeleteBulkAction::make(), DeleteBulkAction::make(),
]), ]),
]); ]);
} }

View file

@ -6,7 +6,7 @@ use App\Filament\Resources\UserResource\Pages;
use App\Filament\Resources\UserResource\RelationManagers; use App\Filament\Resources\UserResource\RelationManagers;
use App\Models\User; use App\Models\User;
use Filament\Forms; use Filament\Forms;
use Filament\Forms\Form; use Filament\Schemas\Schema;
use Filament\Resources\Resource; use Filament\Resources\Resource;
use Filament\Tables; use Filament\Tables;
use Filament\Tables\Table; use Filament\Tables\Table;
@ -21,13 +21,16 @@ use Filament\Support\Enums\IconPosition;
use Filament\Tables\Columns\TextColumn; use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Columns\ImageColumn; use Filament\Tables\Columns\ImageColumn;
use Filament\Tables\Columns\IconColumn; use Filament\Tables\Columns\IconColumn;
use Filament\Tables\Actions\Action; use Filament\Actions\Action;
use Filament\Actions\EditAction;
use Filament\Actions\BulkActionGroup;
use Filament\Actions\DeleteBulkAction;
class UserResource extends Resource class UserResource extends Resource
{ {
protected static ?string $model = User::class; protected static ?string $model = User::class;
protected static ?string $navigationIcon = 'heroicon-o-users'; protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-users';
public static function getNavigationLabel(): string public static function getNavigationLabel(): string
{ {
@ -44,9 +47,9 @@ class UserResource extends Resource
return __('User'); return __('User');
} }
public static function form(Form $form): Form public static function form(Schema $schema): Schema
{ {
return $form return $schema
->schema([ ->schema([
TextInput::make('name') TextInput::make('name')
->translateLabel() ->translateLabel()
@ -85,11 +88,11 @@ class UserResource extends Resource
// //
]) ])
->actions([ ->actions([
Tables\Actions\EditAction::make(), EditAction::make(),
]) ])
->bulkActions([ ->bulkActions([
Tables\Actions\BulkActionGroup::make([ BulkActionGroup::make([
Tables\Actions\DeleteBulkAction::make(), DeleteBulkAction::make(),
]), ]),
]); ]);
} }

View file

@ -9,8 +9,8 @@ use App\Models\Reserveditem;
class ReservationsChart extends ChartWidget class ReservationsChart extends ChartWidget
{ {
protected static ?string $heading = "Reservations by month"; protected ?string $heading = "Reservations by month";
protected static ?string $maxHeight = '300px'; protected ?string $maxHeight = '300px';
protected function getData(): array protected function getData(): array

View file

@ -4,7 +4,7 @@ namespace App\Providers;
use Illuminate\Support\Facades\Vite; use Illuminate\Support\Facades\Vite;
use Illuminate\Support\ServiceProvider; use Illuminate\Support\ServiceProvider;
use BezhanSalleh\FilamentLanguageSwitch\LanguageSwitch; use BezhanSalleh\LanguageSwitch\LanguageSwitch;
use Filament\Support\Colors\Color; use Filament\Support\Colors\Color;
use Filament\Support\Facades\FilamentColor; use Filament\Support\Facades\FilamentColor;
use Illuminate\Support\Facades\Gate; use Illuminate\Support\Facades\Gate;

View file

@ -31,7 +31,6 @@ class AdminPanelProvider extends PanelProvider
'primary' => Color::hex('#0080bb'), 'primary' => Color::hex('#0080bb'),
]) ])
->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources') ->discoverResources(in: app_path('Filament/Resources'), for: 'App\\Filament\\Resources')
->discoverPages(in: app_path('Filament/Pages'), for: 'App\\Filament\\Pages')
->pages([ ->pages([
Pages\Dashboard::class, Pages\Dashboard::class,
]) ])

View file

@ -0,0 +1,52 @@
<?php
namespace App\Providers\Filament;
use App\Filament\Pages\Reserve;
use Filament\View\PanelsRenderHook;
use Filament\Http\Middleware\DisableBladeIconComponents;
use Filament\Http\Middleware\DispatchServingFilamentEvent;
use Filament\Panel;
use Filament\PanelProvider;
use Filament\Support\Colors\Color;
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
use Illuminate\Cookie\Middleware\EncryptCookies;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;
use Illuminate\Routing\Middleware\SubstituteBindings;
use Illuminate\Session\Middleware\StartSession;
use Illuminate\View\Middleware\ShareErrorsFromSession;
class PublicPanelProvider extends PanelProvider
{
public function panel(Panel $panel): Panel
{
return $panel
->id('public')
->path('boka')
->colors([
'primary' => Color::hex('#0080bb'),
])
->brandName('vBytes')
->brandLogo(asset('img/logo.png'))
->brandLogoHeight('2rem')
->topNavigation()
->darkMode(true)
->renderHook(
PanelsRenderHook::TOPBAR_END,
fn () => \Illuminate\Support\Facades\Blade::render('<x-filament-panels::theme-switcher />'),
)
->pages([
Reserve::class,
])
->middleware([
EncryptCookies::class,
AddQueuedCookiesToResponse::class,
StartSession::class,
ShareErrorsFromSession::class,
VerifyCsrfToken::class,
SubstituteBindings::class,
DisableBladeIconComponents::class,
DispatchServingFilamentEvent::class,
]);
}
}

View file

@ -3,4 +3,5 @@
return [ return [
App\Providers\AppServiceProvider::class, App\Providers\AppServiceProvider::class,
App\Providers\Filament\AdminPanelProvider::class, App\Providers\Filament\AdminPanelProvider::class,
App\Providers\Filament\PublicPanelProvider::class,
]; ];

View file

@ -7,8 +7,8 @@
"license": "MIT", "license": "MIT",
"require": { "require": {
"php": "^8.2", "php": "^8.2",
"bezhansalleh/filament-language-switch": "^3.1", "bezhansalleh/filament-language-switch": "^4.0",
"filament/filament": "^3.2", "filament/filament": "^4.0",
"flowframe/laravel-trend": "^0.4.0", "flowframe/laravel-trend": "^0.4.0",
"inertiajs/inertia-laravel": "^2.0", "inertiajs/inertia-laravel": "^2.0",
"laravel/framework": "^11.31", "laravel/framework": "^11.31",
@ -19,6 +19,7 @@
}, },
"require-dev": { "require-dev": {
"fakerphp/faker": "^1.23", "fakerphp/faker": "^1.23",
"filament/upgrade": "^4.0",
"laravel/breeze": "^2.3", "laravel/breeze": "^2.3",
"laravel/pail": "^1.1", "laravel/pail": "^1.1",
"laravel/pint": "^1.13", "laravel/pint": "^1.13",

3705
composer.lock generated

File diff suppressed because it is too large Load diff

137
config/filament.php Normal file
View file

@ -0,0 +1,137 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Broadcasting
|--------------------------------------------------------------------------
|
| By uncommenting the Laravel Echo configuration, you may connect Filament
| to any Pusher-compatible websockets server.
|
| This will allow your users to receive real-time notifications.
|
*/
'broadcasting' => [
// 'echo' => [
// 'broadcaster' => 'pusher',
// 'key' => env('VITE_PUSHER_APP_KEY'),
// 'cluster' => env('VITE_PUSHER_APP_CLUSTER'),
// 'wsHost' => env('VITE_PUSHER_HOST'),
// 'wsPort' => env('VITE_PUSHER_PORT'),
// 'wssPort' => env('VITE_PUSHER_PORT'),
// 'authEndpoint' => '/broadcasting/auth',
// 'disableStats' => true,
// 'encrypted' => true,
// 'forceTLS' => env('VITE_PUSHER_SCHEME', 'https') === 'https',
// ],
],
/*
|--------------------------------------------------------------------------
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| This is the storage disk Filament will use to store files. You may use
| any of the disks defined in the `config/filesystems.php`.
|
*/
'default_filesystem_disk' => env('FILESYSTEM_DISK', 'local'),
/*
|--------------------------------------------------------------------------
| Temporary File URL Expiry
|--------------------------------------------------------------------------
|
| When Filament generates temporary URLs for previewing private files
| (file uploads, image columns, image entries, rich editor attachments,
| etc.), this value controls how many minutes those URLs remain valid.
|
| The generated URL's expiry is rounded up to the end of the hour it
| falls in, so the effective lifetime will be between this value and
| this value plus up to 60 minutes.
|
*/
'temporary_file_url_expiry_minutes' => 30,
/*
|--------------------------------------------------------------------------
| Assets Path
|--------------------------------------------------------------------------
|
| This is the directory where Filament's assets will be published to. It
| is relative to the `public` directory of your Laravel application.
|
| After changing the path, you should run `php artisan filament:assets`.
|
*/
'assets_path' => null,
/*
|--------------------------------------------------------------------------
| Cache Path
|--------------------------------------------------------------------------
|
| This is the directory that Filament will use to store cache files that
| are used to optimize the registration of components.
|
| After changing the path, you should run `php artisan filament:cache-components`.
|
*/
'cache_path' => base_path('bootstrap/cache/filament'),
/*
|--------------------------------------------------------------------------
| Livewire Loading Delay
|--------------------------------------------------------------------------
|
| This sets the delay before loading indicators appear.
|
| Setting this to 'none' makes indicators appear immediately, which can be
| desirable for high-latency connections. Setting it to 'default' applies
| Livewire's standard 200ms delay.
|
*/
'livewire_loading_delay' => 'default',
/*
|--------------------------------------------------------------------------
| File Generation
|--------------------------------------------------------------------------
|
| Artisan commands that generate files can be configured here by setting
| configuration flags that will impact their location or content.
|
| Often, this is useful to preserve file generation behavior from a
| previous version of Filament, to ensure consistency between older and
| newer generated files. These flags are often documented in the upgrade
| guide for the version of Filament you are upgrading to.
|
*/
'file_generation' => [
'flags' => [],
],
/*
|--------------------------------------------------------------------------
| System Route Prefix
|--------------------------------------------------------------------------
|
| This is the prefix used for the system routes that Filament registers,
| such as the routes for downloading exports and failed import rows.
|
*/
'system_route_prefix' => 'filament',
];

File diff suppressed because one or more lines are too long

View file

@ -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}

View file

@ -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)});})();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -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.hook("commit",({component:e,commit:t,succeed:i,fail:o,respond:h})=>{i(({snapshot:r,effect:l})=>{this.$nextTick(()=>{e.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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -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};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -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};

View file

@ -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};

File diff suppressed because one or more lines are too long

View file

@ -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};

View file

@ -0,0 +1 @@
function x({activeTab:p,isScrollable:m,isTabPersisted:T,isTabPersistedInQueryString:w,livewireId:g,schemaKey:D,tab:W,tabQueryStringKey:r}){return{boundResizeHandler:null,boundResetHandler:null,isScrollable:m,resizeDebounceTimer:null,tab:W,unsubscribeLivewireHook:null,withinDropdownIndex:null,withinDropdownMounted:!1,init(){let t=this.getTabs(),e=new URLSearchParams(window.location.search);w&&e.has(r)&&t.includes(e.get(r))&&(this.tab=e.get(r)),(!this.tab||!t.includes(this.tab))&&(this.tab=t[p-1]),this.$watch("tab",()=>{this.updateQueryString(),this.autofocusFields()}),this.autofocusFields(!0),this.unsubscribeLivewireHook=Livewire.hook("commit",({component:i,commit:d,succeed:c,fail:h,respond:u})=>{c(({snapshot:b,effect:n})=>{this.$nextTick(()=>{if(i.id!==g)return;let o=this.getTabs();o.includes(this.tab)||(this.tab=o[p-1]??this.tab)})})}),this.boundResetHandler=i=>{i.detail.livewireId!==g||i.detail.schemaKey!==D||T||w||this.$nextTick(()=>{this.tab=this.getTabs()[p-1]??this.tab})},window.addEventListener("reset-schema-component-state",this.boundResetHandler),m||(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,d,c,h){let u=t.map(n=>Math.ceil(n.clientWidth)),b=t.map(n=>{let o=n.querySelector(".fi-tabs-item-label"),s=n.querySelector(".fi-badge"),a=Math.ceil(o.clientWidth),l=s?Math.ceil(s.clientWidth):0;return{label:a,badge:l,total:a+(l>0?d+l:0)}});for(let n=0;n<t.length;n++){let o=u.slice(0,n+1).reduce((f,I)=>f+I,0),s=n*i,a=b.slice(n+1),l=a.length>0,v=l?Math.max(...a.map(f=>f.total)):0,y=l?c+v+d+h+i:0;if(o+s+y>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(!w)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),d=i.map(s=>s.style.display);i.forEach(s=>s.style.display=""),t.offsetHeight;let c=this.calculateAvailableWidth(t),h=this.calculateContainerGap(t),u=this.calculateDropdownIconWidth(e),b=this.calculateTabItemGap(i[0]),n=this.calculateTabItemPadding(i[0]),o=this.findOverflowIndex(i,c,h,b,n,u);i.forEach((s,a)=>s.style.display=d[a]),o!==-1&&(this.withinDropdownIndex=o),this.withinDropdownMounted=!0},destroy(){this.unsubscribeLivewireHook?.(),this.boundResetHandler&&window.removeEventListener("reset-schema-component-state",this.boundResetHandler),this.boundResizeHandler&&window.removeEventListener("resize",this.boundResizeHandler),clearTimeout(this.resizeDebounceTimer)}}}export{x as default};

View file

@ -0,0 +1 @@
function l({isSkippable:i,isStepPersistedInQueryString:n,key:o,livewireId:h,schemaKey:p,startStep:r,stepQueryStringKey:d}){return{boundResetHandler:null,step:null,init(){this.step=this.getSteps().at(r-1),this.$watch("step",()=>{this.updateQueryString(),this.autofocusFields()}),this.autofocusFields(!0),this.boundResetHandler=t=>{t.detail.livewireId!==h||t.detail.schemaKey!==p||n||this.$nextTick(()=>{this.step=this.getSteps().at(r-1)??this.step})},window.addEventListener("reset-schema-component-state",this.boundResetHandler)},async requestNextStep(){await this.$wire.callSchemaComponentMethod(o,"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(d,this.step),history.replaceState(null,document.title,t.toString())},destroy(){this.boundResetHandler&&window.removeEventListener("reset-schema-component-state",this.boundResetHandler)}}}export{l as default};

View file

@ -0,0 +1 @@
(()=>{var d=()=>({isSticky:!1,width:0,resizeObserver:null,boundUpdateWidth:null,init(){let t=this.$el.parentElement;t&&(this.updateWidth(),this.resizeObserver=new ResizeObserver(()=>this.updateWidth()),this.resizeObserver.observe(t),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 t=this.$el.parentElement;if(!t)return;let e=getComputedStyle(this.$root.querySelector(".fi-ac"));this.width=t.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 u=function(t,e,n){let i=t;if(e.startsWith("/")&&(n=!0,e=e.slice(1)),n)return e;for(;e.startsWith("../");)i=i.includes(".")?i.slice(0,i.lastIndexOf(".")):null,e=e.slice(3);return["",null,void 0].includes(i)?e:["",null,void 0].includes(e)?i:`${i}.${e}`},c=t=>{let e=Alpine.findClosest(t,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:t})=>({handleFormValidationError(e){e.detail.livewireId===t&&this.$nextTick(()=>{let n=this.$el.querySelector("[data-validation-error]");if(!n)return;let i=n;for(;i;)i.dispatchEvent(new CustomEvent("expand")),i=i.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:t,containerPath:e,$wire:n})=>({$statePath:t,$get:(i,s)=>n.$get(u(e,i,s)),$set:(i,s,a,o=!1)=>n.$set(u(e,i,a),s,o),get $state(){return n.$get(t)}})),window.Alpine.data("filamentActionsSchemaComponent",d),Livewire.hook("commit",({component:t,commit:e,respond:n,succeed:i,fail:s})=>{i(({snapshot:a,effects:o})=>{o.dispatches?.forEach(r=>{if(!r.params?.awaitSchemaComponent)return;let l=Array.from(t.el.querySelectorAll(`[wire\\:partial="schema-component::${r.params.awaitSchemaComponent}"]`)).filter(h=>c(h)===t);if(l.length!==1){if(l.length>1)throw`Multiple schema components found with key [${r.params.awaitSchemaComponent}].`;window.addEventListener(`schema-component-${t.id}-${r.params.awaitSchemaComponent}-loaded`,()=>{window.dispatchEvent(new CustomEvent(r.name,{detail:r.params}))},{once:!0})}})})})});})();

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
function o({name:r,recordKey:s,state:n}){return{error:void 0,isLoading:!1,state:n,unsubscribeLivewireHook:null,init(){this.unsubscribeLivewireHook=Livewire.hook("commit",({component:e,commit:i,succeed:a,fail:u,respond:h})=>{a(({snapshot:d,effect:f})=>{this.$nextTick(()=>{if(this.isLoading||e.id!==this.$root.closest("[wire\\:id]")?.attributes["wire:id"].value)return;let t=this.getServerState();t===void 0||Alpine.raw(this.state)===t||(this.state=t)})})}),this.$watch("state",async()=>{let e=this.getServerState();if(e===void 0||Alpine.raw(this.state)===e)return;this.isLoading=!0;let i=await this.$wire.updateTableColumnState(r,s,this.state);this.error=i?.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{o as default};

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
function o({name:i,recordKey:s,state:n}){return{error:void 0,isLoading:!1,state:n,unsubscribeLivewireHook:null,init(){this.unsubscribeLivewireHook=Livewire.hook("commit",({component:e,commit:r,succeed:a,fail:u,respond:d})=>{a(({snapshot:h,effect:l})=>{this.$nextTick(()=>{if(this.isLoading||e.id!==this.$root.closest("[wire\\:id]")?.attributes["wire:id"].value)return;let t=this.getServerState();t===void 0||this.getNormalizedState()===t||(this.state=t)})})}),this.$watch("state",async()=>{let e=this.getServerState();if(e===void 0||this.getNormalizedState()===e)return;this.isLoading=!0;let r=await this.$wire.updateTableColumnState(i,s,this.state);this.error=r?.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{o as default};

View file

@ -0,0 +1 @@
function o({name:r,recordKey:s,state:n}){return{error:void 0,isLoading:!1,state:n,unsubscribeLivewireHook:null,init(){this.unsubscribeLivewireHook=Livewire.hook("commit",({component:e,commit:i,succeed:a,fail:u,respond:h})=>{a(({snapshot:d,effect:f})=>{this.$nextTick(()=>{if(this.isLoading||e.id!==this.$root.closest("[wire\\:id]")?.attributes["wire:id"].value)return;let t=this.getServerState();t===void 0||Alpine.raw(this.state)===t||(this.state=t)})})}),this.$watch("state",async()=>{let e=this.getServerState();if(e===void 0||Alpine.raw(this.state)===e)return;this.isLoading=!0;let i=await this.$wire.updateTableColumnState(r,s,this.state);this.error=i?.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{o as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

22
rector.php Normal file
View file

@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
return RectorConfig::configure()
->withPaths([
__DIR__ . '/app',
__DIR__ . '/bootstrap',
__DIR__ . '/config',
__DIR__ . '/lang',
__DIR__ . '/public',
__DIR__ . '/resources',
__DIR__ . '/routes',
__DIR__ . '/tests',
])
// uncomment to reach your current PHP version
// ->withPhpSets()
->withTypeCoverageLevel(0)
->withDeadCodeLevel(0)
->withCodeQualityLevel(0);

View file

@ -4,6 +4,8 @@
@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php'; @source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../storage/framework/views/*.php'; @source '../../storage/framework/views/*.php';
@source '../../app/Filament/**/*';
@source '../../resources/views/**/*';
@theme { @theme {
--font-sans: --font-sans:

View file

@ -1,15 +1,7 @@
<x-filament-panels::page>
<p class="text-sm text-gray-500 dark:text-gray-400 -mt-4">
Välkommen! Här kan du reservera spel som du gärna vill låna.
</p>
{{ $this->table }}
<div id="reserve-form-container"> </x-filament-panels::page>
<nav class="py-2 flex h-16 items-center align-items gap-x-4 bg-white px-4 shadow-xs ring-1 ring-gray-950/5 dark:bg-gray-900 dark:ring-white/10 md:px-6 lg:px-8">
<img class=" w-auto h-full" src="/img/logo.png" alt="logo">
<h1 class="fi-logo flex text-xl font-bold leading-5 tracking-tight text-gray-950 dark:text-white">vBytes</h1>
</nav>
<div class="py-12 mx-auto h-full w-full px-4 md:px-6 lg:px-8 max-w-7xl">
<h1 class="fi-header-heading text-2xl font-bold tracking-tight text-gray-950 dark:text-white sm:text-3xl">Reservera spel</h1>
<p class="py-4">Välkommen! Här kan du reservera spel som du gärna vill låna.</p>
</div>
<div class="mx-auto h-full w-full px-4 md:px-6 lg:px-8 max-w-7xl">
{{ $this->table }}
</div>
</div>

View file

@ -9,7 +9,7 @@ use App\Models\Reserveditem;
//Route::group(['domain' => 'boka.vbytes.se'], function(){ //Route::group(['domain' => 'boka.vbytes.se'], function(){
Route::get('/boka', Reserve::class); // Route::get('/boka', Reserve::class);
//}); //});
//Route::get('/demo', function () { return new App\Mail\Delivered(Reserveditem::first()); }); //Route::get('/demo', function () { return new App\Mail\Delivered(Reserveditem::first()); });