From 6f40d5df3073c2657fa2091226412b0be0dec98c Mon Sep 17 00:00:00 2001 From: salam Date: Fri, 30 Jan 2026 15:14:25 +0100 Subject: [PATCH] wip --- .../Resources/Events/Tables/EventsTable.php | 31 ++++++++++++++++++- app/Models/Sport.php | 5 +++ composer.lock | 24 +++++++------- 3 files changed, 47 insertions(+), 13 deletions(-) diff --git a/app/Filament/Resources/Events/Tables/EventsTable.php b/app/Filament/Resources/Events/Tables/EventsTable.php index dcbd9264..68a45e3a 100644 --- a/app/Filament/Resources/Events/Tables/EventsTable.php +++ b/app/Filament/Resources/Events/Tables/EventsTable.php @@ -23,9 +23,14 @@ use Filament\Actions\ActionGroup; use Filament\Actions\BulkActionGroup; use Filament\Actions\DeleteAction; use Filament\Actions\DeleteBulkAction; +use Filament\Actions\EditAction; +use Filament\Forms\Components\Checkbox; use Filament\Forms\Components\Hidden; use Filament\Forms\Components\Select; use Filament\Forms\Components\TextInput; +use Filament\Infolists\Components\TextEntry; +use Filament\Schemas\Components\Grid; +use Filament\Schemas\Components\Section; use Filament\Schemas\Components\Utilities\Get; use Filament\Support\Enums\FontWeight; use Filament\Support\Enums\VerticalAlignment; @@ -509,7 +514,31 @@ class EventsTable ->emptyStateHeading('No events') ->emptyStateDescription('Modify the filter') ->recordActions([ - Action::make('note')->iconButton()->icon('phosphor-note')->color('gray')->tooltip('Add a message'), + Action::make('note') + ->iconButton()->icon('phosphor-note')->color('gray') + ->tooltip('Add a note') + ->schema([ + Grid::make(2) + ->schema([ + Section::make('Details') + ->schema([ + TextInput::make('name'), + Select::make('position') + ->options([ + 'developer' => 'Developer', + 'designer' => 'Designer', + ]), + Checkbox::make('is_admin'), + ]), + Section::make('Auditing') + ->schema([ + TextEntry::make('created_at') + ->dateTime(), + TextEntry::make('updated_at') + ->dateTime(), + ]), + ]), + ]), Action::make('notify')->iconButton()->icon('phosphor-bell')->color('gray')->tooltip('Add a notifications'), Action::make('star') ->iconButton() diff --git a/app/Models/Sport.php b/app/Models/Sport.php index e5569f60..447c3c4a 100644 --- a/app/Models/Sport.php +++ b/app/Models/Sport.php @@ -28,6 +28,11 @@ class Sport extends Model } } + public static function getActiveSports() + { + return Sport::query()->where('is_active', 1)->pluck('id')->toArray(); + } + public static function getSportForClient() { $sports = Client::where('id', auth()->user()->client_id)->value('sport'); diff --git a/composer.lock b/composer.lock index 0527b31c..ed5b73f3 100644 --- a/composer.lock +++ b/composer.lock @@ -12642,24 +12642,24 @@ }, { "name": "ta-tikoma/phpunit-architecture-test", - "version": "0.8.5", + "version": "0.8.6", "source": { "type": "git", "url": "https://github.com/ta-tikoma/phpunit-architecture-test.git", - "reference": "cf6fb197b676ba716837c886baca842e4db29005" + "reference": "ad48430b92901fd7d003fdaf2d7b139f96c0906e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ta-tikoma/phpunit-architecture-test/zipball/cf6fb197b676ba716837c886baca842e4db29005", - "reference": "cf6fb197b676ba716837c886baca842e4db29005", + "url": "https://api.github.com/repos/ta-tikoma/phpunit-architecture-test/zipball/ad48430b92901fd7d003fdaf2d7b139f96c0906e", + "reference": "ad48430b92901fd7d003fdaf2d7b139f96c0906e", "shasum": "" }, "require": { "nikic/php-parser": "^4.18.0 || ^5.0.0", "php": "^8.1.0", - "phpdocumentor/reflection-docblock": "^5.3.0", - "phpunit/phpunit": "^10.5.5 || ^11.0.0 || ^12.0.0", - "symfony/finder": "^6.4.0 || ^7.0.0" + "phpdocumentor/reflection-docblock": "^5.3.0 || ^6.0.0", + "phpunit/phpunit": "^10.5.5 || ^11.0.0 || ^12.0.0", + "symfony/finder": "^6.4.0 || ^7.0.0 || ^8.0.0" }, "require-dev": { "laravel/pint": "^1.13.7", @@ -12695,9 +12695,9 @@ ], "support": { "issues": "https://github.com/ta-tikoma/phpunit-architecture-test/issues", - "source": "https://github.com/ta-tikoma/phpunit-architecture-test/tree/0.8.5" + "source": "https://github.com/ta-tikoma/phpunit-architecture-test/tree/0.8.6" }, - "time": "2025-04-20T20:23:40+00:00" + "time": "2026-01-30T07:16:00+00:00" }, { "name": "theseer/tokenizer", @@ -12814,12 +12814,12 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": {}, + "stability-flags": [], "prefer-stable": true, "prefer-lowest": false, "platform": { "php": "^8.3" }, - "platform-dev": {}, - "plugin-api-version": "2.9.0" + "platform-dev": [], + "plugin-api-version": "2.6.0" }