From 56740e73daebd10ccdd219a0180c18c663bb4bcd Mon Sep 17 00:00:00 2001 From: Sagar Date: Thu, 29 Aug 2024 14:22:10 +0200 Subject: [PATCH 01/20] wip: the pop up modals should open on status change of the column select dropdown --- .../Dashboard/Resources/ReportResource.php | 100 ++++-- .../ReportResource/Pages/CreateReport.php | 2 +- app/Models/Report.php | 4 + app/States/Report/ApprovedState.php | 13 + app/States/Report/DraftState.php | 13 + app/States/Report/ProcessingState.php | 13 + app/States/Report/RejectedState.php | 13 + app/States/Report/ReportState.php | 32 ++ app/States/Report/SubmittedState.php | 20 ++ app/States/Report/ToApproved.php | 41 +++ app/States/Report/ToRejected.php | 41 +++ composer.json | 6 + composer.lock | 303 +++++++++++++++++- config/model-states.php | 10 + 14 files changed, 588 insertions(+), 23 deletions(-) create mode 100644 app/States/Report/ApprovedState.php create mode 100644 app/States/Report/DraftState.php create mode 100644 app/States/Report/ProcessingState.php create mode 100644 app/States/Report/RejectedState.php create mode 100644 app/States/Report/ReportState.php create mode 100644 app/States/Report/SubmittedState.php create mode 100644 app/States/Report/ToApproved.php create mode 100644 app/States/Report/ToRejected.php create mode 100644 config/model-states.php diff --git a/app/Filament/Dashboard/Resources/ReportResource.php b/app/Filament/Dashboard/Resources/ReportResource.php index 74509803..1a6c2be5 100644 --- a/app/Filament/Dashboard/Resources/ReportResource.php +++ b/app/Filament/Dashboard/Resources/ReportResource.php @@ -6,6 +6,7 @@ use App\Filament\Dashboard\Resources\ReportResource\Pages; use App\Filament\Dashboard\Resources\ReportResource\RelationManagers; use App\Models\Citation; +use App\Models\Molecule; use App\Models\Report; use Filament\Forms\Components\KeyValue; use Filament\Forms\Components\Select; @@ -17,10 +18,12 @@ use Filament\Forms\Get; use Filament\Resources\Resource; use Filament\Tables; +use Filament\Tables\Columns\SelectColumn; use Filament\Tables\Columns\TextColumn; use Filament\Tables\Table; use Illuminate\Database\Eloquent\Builder; use Illuminate\Support\Str; +use Maartenpaauw\Filament\ModelStates\StateSelectColumn; use Tapp\FilamentAuditing\RelationManagers\AuditsRelationManager; class ReportResource extends Resource @@ -182,18 +185,18 @@ public static function form(Form $form): Form ->hintIcon('heroicon-m-question-mark-circle', tooltip: 'Provide comma separated search terms that would help in finding your report when searched.') ->splitKeys(['Tab', ',']) ->type('reports'), - Select::make('status') - ->options([ - 'pending' => 'Pending', - 'approved' => 'Approved', - 'rejected' => 'Rejected', - ]) - ->hidden(function () { - return ! auth()->user()->hasRole('curator'); - }) - ->afterStateUpdated(function (?Report $record, ?string $state, ?string $old) { - ReportStatusChanged::dispatch($record, $state, $old); - }), + // Select::make('status') + // ->options([ + // 'pending' => 'Pending', + // 'approved' => 'Approved', + // 'rejected' => 'Rejected', + // ]) + // ->hidden(function () { + // return ! auth()->user()->hasRole('curator'); + // }) + // ->afterStateUpdated(function (?Report $record, ?string $state, ?string $old) { + // ReportStatusChanged::dispatch($record, $state, $old); + // }), Textarea::make('comment') ->hintIcon('heroicon-m-question-mark-circle', tooltip: 'Provide your comments/observations on anything noteworthy in the Curation process.') ->hidden(function () { @@ -211,14 +214,30 @@ public static function table(Table $table): Table TextColumn::make('url') ->url(fn (Report $record) => $record->url) ->openUrlInNewTab(), - TextColumn::make('status') - ->badge() - ->color(function (Report $record) { - return match ($record->status) { - 'pending' => 'info', - 'approved' => 'success', - 'rejected' => 'danger', - }; + // StateSelectColumn::make('status'), + + SelectColumn::make('status') + ->selectablePlaceholder(false) + ->options(function ($state) { + if ($state == 'draft') { + return [ + 'draft' => 'Draft', + 'submitted' => 'Submitted', + ]; + } elseif ($state != 'draft') { + return [ + 'draft' => 'Draft', + 'submitted' => 'Submitted', + 'processing' => 'Processing', + 'approved' => 'Approved', + 'rejected' => 'Rejected', + ]; + } + }) + ->disabled(function ($state) { + if (($state != 'draft' && ! auth()->user()->roles()->exists()) || $state == 'processing' || $state == 'approved' || $state == 'rejected') { + return true; + } }), TextColumn::make('comment')->wrap(), ]) @@ -227,7 +246,46 @@ public static function table(Table $table): Table // ]) ->actions([ - Tables\Actions\EditAction::make(), + Tables\Actions\EditAction::make() + ->visible(function ($record) { + return $record->status == 'draft'; + }), + Tables\Actions\Action::make('approve') + ->hidden(function (Report $record) { + return ! auth()->user()->roles()->exists() || $record['status'] == 'draft' || $record['status'] == 'rejected' || $record['status'] == 'approved'; + }) + ->form([ + Textarea::make('reason'), + ]) + ->action(function (array $data, Report $record, Molecule $molecule): void { + + $record['status'] = 'approved'; + $record['comment'] = $data['reason']; + $record->save(); + + if ($molecule['mol_id_csv']) { + $molecule_ids = explode(',', $molecule['mol_id_csv']); + $molecule = Molecule::whereIn('id', $molecule_ids)->get(); + foreach ($molecule as $mol) { + $mol->active = false; + $mol->save(); + } + } + }), + Tables\Actions\Action::make('reject') + ->hidden(function (Report $record) { + return ! auth()->user()->roles()->exists() || $record['status'] == 'draft' || $record['status'] == 'rejected' || $record['status'] == 'approved'; + }) + ->form([ + Textarea::make('reason'), + + ]) + ->action(function (array $data, Report $record): void { + + $record['status'] = 'rejected'; + $record['comment'] = $data['reason']; + $record->save(); + }), ]) ->bulkActions([ Tables\Actions\BulkActionGroup::make([ diff --git a/app/Filament/Dashboard/Resources/ReportResource/Pages/CreateReport.php b/app/Filament/Dashboard/Resources/ReportResource/Pages/CreateReport.php index c696a551..25eab422 100644 --- a/app/Filament/Dashboard/Resources/ReportResource/Pages/CreateReport.php +++ b/app/Filament/Dashboard/Resources/ReportResource/Pages/CreateReport.php @@ -65,7 +65,7 @@ protected function beforeCreate(): void protected function mutateFormDataBeforeCreate(array $data): array { $data['user_id'] = auth()->id(); - $data['status'] = 'pending'; + $data['status'] = 'draft'; return $data; } diff --git a/app/Models/Report.php b/app/Models/Report.php index 57e464cc..e4c4cfb9 100644 --- a/app/Models/Report.php +++ b/app/Models/Report.php @@ -2,16 +2,19 @@ namespace App\Models; +use App\States\Report\ReportState; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\MorphToMany; use OwenIt\Auditing\Contracts\Auditable; +use Spatie\ModelStates\HasStates; use Spatie\Tags\HasTags; class Report extends Model implements Auditable { use HasFactory; + use HasStates; use HasTags; use \OwenIt\Auditing\Auditable; @@ -35,6 +38,7 @@ class Report extends Model implements Auditable protected $casts = [ 'suggested_changes' => 'array', + // 'status' => ReportState::class, ]; /** diff --git a/app/States/Report/ApprovedState.php b/app/States/Report/ApprovedState.php new file mode 100644 index 00000000..d4dfd9aa --- /dev/null +++ b/app/States/Report/ApprovedState.php @@ -0,0 +1,13 @@ +default(DraftState::class) + ->allowTransition(DraftState::class, SubmittedState::class); + } else { + return parent::config() + ->default(DraftState::class) + ->allowTransition(DraftState::class, SubmittedState::class) + ->allowTransition(SubmittedState::class, ProcessingState::class) + ->allowTransition([SubmittedState::class, ProcessingState::class], RejectedState::class, ToRejected::class) + ->allowTransition([SubmittedState::class, ProcessingState::class], ApprovedState::class, ToApproved::class); + } + + } +} diff --git a/app/States/Report/SubmittedState.php b/app/States/Report/SubmittedState.php new file mode 100644 index 00000000..f025b6ff --- /dev/null +++ b/app/States/Report/SubmittedState.php @@ -0,0 +1,20 @@ +report->state = new ApprovedState($this->report); + $this->report->comments = $this->reason; + + $this->report->save(); + + return $this->report; + } + + public function form(): array + { + return [ + Textarea::make('comments') + ->required() + ->minLength(1) + ->maxLength(1000) + ->rows(5) + ->helperText(__('This reason will be sent to the report creator.')), + ]; + } +} diff --git a/app/States/Report/ToRejected.php b/app/States/Report/ToRejected.php new file mode 100644 index 00000000..b71f01df --- /dev/null +++ b/app/States/Report/ToRejected.php @@ -0,0 +1,41 @@ +report->state = new RejectedState($this->report); + $this->report->comments = $this->reason; + + $this->report->save(); + + return $this->report; + } + + public function form(): array + { + return [ + Textarea::make('comments') + ->required() + ->minLength(1) + ->maxLength(1000) + ->rows(5) + ->helperText(__('This reason will be sent to the report creator.')), + ]; + } +} diff --git a/composer.json b/composer.json index 566649f9..5d6faf9b 100644 --- a/composer.json +++ b/composer.json @@ -28,6 +28,7 @@ "league/flysystem-aws-s3-v3": "^3.0", "livewire/livewire": "^3.0", "lomkit/laravel-rest-api": "*", + "maartenpaauw/model-states-for-filament": "^2.3", "mpdf/mpdf": "^8.2", "owen-it/laravel-auditing": "^13.6", "predis/predis": "^2.2", @@ -36,6 +37,7 @@ "shuvroroy/filament-spatie-laravel-backup": "^2.1", "spatie/laravel-backup": "^8.6", "spatie/laravel-cookie-consent": "^3.3", + "spatie/laravel-model-states": "^2.7", "spatie/laravel-permission": "^6.3", "spatie/schema-org": "^3.23", "stechstudio/filament-impersonate": "*", @@ -103,6 +105,10 @@ { "type": "composer", "url": "https://filament-filter-sets.composer.sh" + }, + { + "type": "composer", + "url": "https://model-states-for-filament.composer.sh" } ] } diff --git a/composer.lock b/composer.lock index d8d1c3f8..b7e3610b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9aeed4c020fef8e2baf0a41088bef26f", + "content-hash": "00e53096c3100ad2d23005e4f69defc3", "packages": [ { "name": "anourvalar/eloquent-serialize", @@ -1993,6 +1993,59 @@ }, "time": "2023-11-17T15:01:25+00:00" }, + { + "name": "facade/ignition-contracts", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/facade/ignition-contracts.git", + "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/3c921a1cdba35b68a7f0ccffc6dffc1995b18267", + "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^v2.15.8", + "phpunit/phpunit": "^9.3.11", + "vimeo/psalm": "^3.17.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Facade\\IgnitionContracts\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://flareapp.io", + "role": "Developer" + } + ], + "description": "Solution contracts for Ignition", + "homepage": "https://github.com/facade/ignition-contracts", + "keywords": [ + "contracts", + "flare", + "ignition" + ], + "support": { + "issues": "https://github.com/facade/ignition-contracts/issues", + "source": "https://github.com/facade/ignition-contracts/tree/1.0.2" + }, + "time": "2020-10-16T08:27:54+00:00" + }, { "name": "filament/actions", "version": "v3.2.108", @@ -4961,6 +5014,179 @@ ], "time": "2024-08-11T12:26:23+00:00" }, + { + "name": "maartenpaauw/laravel-specification-pattern", + "version": "v2.5.0", + "source": { + "type": "git", + "url": "https://github.com/maartenpaauw/laravel-specification-pattern.git", + "reference": "ea724b0d0ef40d9477fac63a479406ff5c0501f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maartenpaauw/laravel-specification-pattern/zipball/ea724b0d0ef40d9477fac63a479406ff5c0501f5", + "reference": "ea724b0d0ef40d9477fac63a479406ff5c0501f5", + "shasum": "" + }, + "require": { + "illuminate/console": "^10.0|^11.0", + "illuminate/support": "^10.0|^11.0", + "php": "^8.1", + "spatie/laravel-package-tools": "^1.16.2", + "symfony/polyfill-php83": "^1.30", + "webmozart/assert": "^1.11" + }, + "require-dev": { + "illuminate/testing": "^10.0|^11.0", + "larastan/larastan": "^2.8", + "laravel/pint": "^1.0", + "nunomaduro/collision": "^7.8|^8.1", + "orchestra/testbench": "^8.8|^9.0", + "pestphp/pest": "^2.20", + "pestphp/pest-plugin-arch": "^2.5", + "pestphp/pest-plugin-laravel": "^2.2", + "pestphp/pest-plugin-type-coverage": "^2.8", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "spatie/laravel-ray": "^1.35", + "spatie/phpunit-snapshot-assertions": "^5.1" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Maartenpaauw\\Specifications\\SpecificationsServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Maartenpaauw\\Specifications\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maarten Paauw", + "email": "maartenpaauw@gmail.com", + "role": "Developer" + } + ], + "description": "This is my package laravel-specification-pattern", + "homepage": "https://github.com/maartenpaauw/laravel-specification-pattern", + "keywords": [ + "laravel", + "laravel-specification-pattern", + "maartenpaauw" + ], + "support": { + "issues": "https://github.com/maartenpaauw/laravel-specification-pattern/issues", + "source": "https://github.com/maartenpaauw/laravel-specification-pattern/tree/v2.5.0" + }, + "funding": [ + { + "url": "https://github.com/maartenpaauw", + "type": "github" + } + ], + "time": "2024-08-24T17:12:44+00:00" + }, + { + "name": "maartenpaauw/model-states-for-filament", + "version": "2.3.2", + "dist": { + "type": "zip", + "url": "https://model-states-for-filament.composer.sh/download/9cd1e221-7068-4004-9c4f-87ad84446f4f/model-states-for-filament-2.3.2.zip", + "reference": "4eb3ad7235563f1c9a5e73940ef958a84092964b", + "shasum": "5f43ba389cd124e3f9873926a1f349006df01533" + }, + "require": { + "filament/filament": "^3.2.39", + "illuminate/contracts": "^10.10.1|^11.0", + "illuminate/database": "^10.10.1|^11.0", + "illuminate/support": "^10.10.1|^11.0", + "maartenpaauw/laravel-specification-pattern": "^2.2", + "php": "^8.1", + "spatie/laravel-model-states": "^2.7", + "spatie/laravel-package-tools": "^1.16.2", + "symfony/polyfill-php83": "^1.30", + "webmozart/assert": "^1.11" + }, + "require-dev": { + "larastan/larastan": "^2.9", + "laravel/pint": "^1.17", + "nunomaduro/collision": "^7.9|^8.1", + "orchestra/testbench": "^8.8|^9.0", + "pestphp/pest": "^2.34", + "pestphp/pest-plugin-arch": "^2.7", + "pestphp/pest-plugin-laravel": "^2.4", + "pestphp/pest-plugin-type-coverage": "^2.8", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan-deprecation-rules": "^1.2", + "phpstan/phpstan-phpunit": "^1.4", + "phpstan/phpstan-webmozart-assert": "^1.2" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Maartenpaauw\\Filament\\ModelStates\\FilamentModelStatesServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Maartenpaauw\\Filament\\ModelStates\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Workbench\\App\\": "workbench/app/", + "Workbench\\Database\\Factories\\": "workbench/database/factories/", + "Maartenpaauw\\Filament\\ModelStates\\Tests\\": "tests/" + } + }, + "scripts": { + "test": [ + "vendor/bin/pest" + ], + "format": [ + "vendor/bin/pint" + ], + "analyse": [ + "vendor/bin/phpstan analyse" + ], + "test-coverage": [ + "vendor/bin/pest --coverage" + ], + "post-autoload-dump": [ + "@php ./vendor/bin/testbench package:discover --ansi" + ] + }, + "authors": [ + { + "name": "Maarten Paauw", + "role": "Developer", + "email": "maartenpaauw@gmail.com" + } + ], + "description": "Model States for Filament", + "homepage": "https://filamentphp.com/plugins/maartenpaauw-model-states", + "keywords": [ + "filamentphp", + "laravel", + "maartenpaauw", + "model-states-for-filament" + ], + "support": { + "email": "filamentphp@paauw.dev" + }, + "time": "2024-08-21T15:02:40+00:00" + }, { "name": "maatwebsite/excel", "version": "3.1.56", @@ -9099,6 +9325,81 @@ ], "time": "2024-08-22T09:20:42+00:00" }, + { + "name": "spatie/laravel-model-states", + "version": "2.7.1", + "source": { + "type": "git", + "url": "https://github.com/spatie/laravel-model-states.git", + "reference": "91e7dfcf2d1d471d3b7fec151465346e7db43e72" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/laravel-model-states/zipball/91e7dfcf2d1d471d3b7fec151465346e7db43e72", + "reference": "91e7dfcf2d1d471d3b7fec151465346e7db43e72", + "shasum": "" + }, + "require": { + "ext-json": "*", + "facade/ignition-contracts": "^1.0", + "illuminate/contracts": "^8.73 | ^9.0 | ^10.0 | ^11.0", + "illuminate/database": "^8.73 | ^9.0 | ^10.0 | ^11.0", + "illuminate/support": "^8.73 | ^9.0 | ^10.0 | ^11.0", + "php": "^7.4|^8.0", + "spatie/laravel-package-tools": "^1.9" + }, + "require-dev": { + "orchestra/testbench": "^6.23 | ^7.0 | ^8.0 | ^9.0", + "pestphp/pest": "^1.22|^2.0", + "phpunit/phpunit": "^9.4|^10.0", + "symfony/var-dumper": "^5.3 | ^6.0 | ^7.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Spatie\\ModelStates\\ModelStatesServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Spatie\\ModelStates\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brent Roose", + "email": "brent@spatie.be", + "homepage": "https://spatie.be", + "role": "Developer" + } + ], + "description": "State support for Eloquent models", + "homepage": "https://github.com/spatie/laravel-model-states", + "keywords": [ + "spatie", + "state" + ], + "support": { + "source": "https://github.com/spatie/laravel-model-states/tree/2.7.1" + }, + "funding": [ + { + "url": "https://spatie.be/open-source/support-us", + "type": "custom" + }, + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2024-03-07T07:05:22+00:00" + }, { "name": "spatie/laravel-package-tools", "version": "1.16.5", diff --git a/config/model-states.php b/config/model-states.php new file mode 100644 index 00000000..57ef8cb2 --- /dev/null +++ b/config/model-states.php @@ -0,0 +1,10 @@ + Spatie\ModelStates\DefaultTransition::class, + +]; From 858c4d6f865af5e4873296e4121deef92ab972e9 Mon Sep 17 00:00:00 2001 From: Sagar Date: Mon, 9 Sep 2024 17:01:55 +0200 Subject: [PATCH 02/20] wip: approval or rejection can be done from inside the edit or view pages and other changes to improve user experience were made --- .../Dashboard/Resources/ReportResource.php | 163 +++++++++++------- .../ReportResource/Pages/CreateReport.php | 2 +- .../ReportResource/Pages/EditReport.php | 2 +- .../ReportResource/Pages/ListReports.php | 27 +++ .../MoleculesRelationManager.php | 42 ++++- ...09_150749_add_columns_on_reports_table.php | 31 ++++ 6 files changed, 199 insertions(+), 68 deletions(-) create mode 100644 database/migrations/2024_09_09_150749_add_columns_on_reports_table.php diff --git a/app/Filament/Dashboard/Resources/ReportResource.php b/app/Filament/Dashboard/Resources/ReportResource.php index 513542fb..8facfc38 100644 --- a/app/Filament/Dashboard/Resources/ReportResource.php +++ b/app/Filament/Dashboard/Resources/ReportResource.php @@ -2,12 +2,15 @@ namespace App\Filament\Dashboard\Resources; -use App\Events\ReportStatusChanged; use App\Filament\Dashboard\Resources\ReportResource\Pages; use App\Filament\Dashboard\Resources\ReportResource\RelationManagers; use App\Models\Citation; use App\Models\Molecule; use App\Models\Report; +use Archilex\AdvancedTables\Filters\AdvancedFilter; +use Filament\Forms\Components\Actions; +use Filament\Forms\Components\Actions\Action; +use Filament\Forms\Components\Grid; use Filament\Forms\Components\KeyValue; use Filament\Forms\Components\Select; use Filament\Forms\Components\SpatieTagsInput; @@ -17,13 +20,13 @@ use Filament\Forms\Form; use Filament\Forms\Get; use Filament\Resources\Resource; +use Filament\Support\Enums\VerticalAlignment; use Filament\Tables; -use Filament\Tables\Columns\SelectColumn; use Filament\Tables\Columns\TextColumn; use Filament\Tables\Table; use Illuminate\Database\Eloquent\Builder; +use Illuminate\Support\HtmlString; use Illuminate\Support\Str; -use Maartenpaauw\Filament\ModelStates\StateSelectColumn; use Tapp\FilamentAuditing\RelationManagers\AuditsRelationManager; class ReportResource extends Resource @@ -40,15 +43,65 @@ public static function form(Form $form): Form { return $form ->schema([ - ToggleButtons::make('is_change') - ->label('') - ->live() - ->default(false) - ->options([ - true => 'Request Changes to Data', - false => 'Report Synthetic Compound(s)', + Grid::make() + ->schema([ + ToggleButtons::make('is_change') + ->label('') + ->live() + ->default(false) + ->options([ + false => 'Report Synthetic Compound(s)', + true => 'Request Changes to Data', + ]) + ->inline() + ->columnSpan(2), + Actions::make([ + Action::make('approve') + ->hidden(function (Get $get, string $operation) { + return ! auth()->user()->roles()->exists() || $get('status') == 'rejected' || $get('status') == 'approved' || $operation == 'create'; + }) + ->form([ + Textarea::make('reason'), + ]) + ->action(function (array $data, Report $record, Molecule $molecule, $set): void { + + $record['status'] = 'approved'; + $record['reason'] = $data['reason']; + $record->save(); + + $set('status', 'rejected'); + + if ($record['mol_id_csv'] && ! $record['is_change']) { + $molecule_ids = explode(',', $record['mol_id_csv']); + $molecule = Molecule::whereIn('id', $molecule_ids)->get(); + foreach ($molecule as $mol) { + $mol->active = false; + $mol->save(); + } + } + }), + Action::make('reject') + ->color('danger') + ->hidden(function (Get $get, string $operation) { + return ! auth()->user()->roles()->exists() || $get('status') == 'rejected' || $get('status') == 'approved' || $operation == 'create'; + }) + ->form([ + Textarea::make('reason'), + ]) + ->action(function (array $data, Report $record, $set): void { + + $record['status'] = 'rejected'; + $record['reason'] = $data['reason']; + $record->save(); + + $set('status', 'rejected'); + }), + ]) + ->verticalAlignment(VerticalAlignment::End) + ->columnStart(4), ]) - ->inline(), + ->columns(3), + Select::make('report_type') ->label('Choose') ->hintIcon('heroicon-m-question-mark-circle', tooltip: 'Select what you want to report. Ex: Molecule, Citation, Collection, Organism.') @@ -73,15 +126,25 @@ public static function form(Form $form): Form return $get('is_change'); }), KeyValue::make('suggested_changes') + ->hintIcon('heroicon-m-question-mark-circle', tooltip: 'Enter the property (in the left column) and suggested change (in the right column)') ->addActionLabel('Add property') ->keyLabel('Property') ->valueLabel('Suggested change') ->hidden(function (Get $get) { return ! $get('is_change'); }), - TextInput::make('url') - ->hintIcon('heroicon-m-question-mark-circle', tooltip: 'Provide a link to the webpage that supports your claims.') - ->label('URL'), + TextInput::make('doi') + ->hintIcon('heroicon-m-question-mark-circle', tooltip: 'Provide the DOI link to the resource you are reporting so as to help curators verify.') + ->label('DOI') + ->url() + ->suffixAction( + fn (?string $state): Action => Action::make('visit') + ->icon('heroicon-s-link') + ->url( + $state, + shouldOpenInNewTab: true, + ), + ), Select::make('collections') ->hintIcon('heroicon-m-question-mark-circle', tooltip: 'Select the Collections you want to report. This will help our Curators in reviewing your report.') ->relationship('collections', 'title') @@ -181,22 +244,10 @@ public static function form(Form $form): Form return true; } }), - SpatieTagsInput::make('tags') - ->hintIcon('heroicon-m-question-mark-circle', tooltip: 'Provide comma separated search terms that would help in finding your report when searched.') - ->splitKeys(['Tab', ',']) - ->type('reports'), - // Select::make('status') - // ->options([ - // 'pending' => 'Pending', - // 'approved' => 'Approved', - // 'rejected' => 'Rejected', - // ]) - // ->hidden(function () { - // return ! auth()->user()->hasRole('curator'); - // }) - // ->afterStateUpdated(function (?Report $record, ?string $state, ?string $old) { - // ReportStatusChanged::dispatch($record, $state, $old); - // }), + // SpatieTagsInput::make('tags') + // ->hintIcon('heroicon-m-question-mark-circle', tooltip: 'Provide comma separated search terms that would help in finding your report when searched.') + // ->splitKeys(['Tab', ',']) + // ->type('reports'), Textarea::make('comment') ->hintIcon('heroicon-m-question-mark-circle', tooltip: 'Provide your comments/observations on anything noteworthy in the Curation process.') ->hidden(function () { @@ -212,46 +263,26 @@ public static function table(Table $table): Table TextColumn::make('title') ->wrap() ->description(fn (Report $record): string => Str::of($record->evidence)->words(10)), - TextColumn::make('url') - ->url(fn (Report $record) => $record->url) - ->openUrlInNewTab(), - // StateSelectColumn::make('status'), - - SelectColumn::make('status') - ->selectablePlaceholder(false) - ->options(function ($state) { - if ($state == 'draft') { - return [ - 'draft' => 'Draft', - 'submitted' => 'Submitted', - ]; - } elseif ($state != 'draft') { - return [ - 'draft' => 'Draft', - 'submitted' => 'Submitted', - 'processing' => 'Processing', - 'approved' => 'Approved', - 'rejected' => 'Rejected', - ]; - } - }) - ->disabled(function ($state) { - if (($state != 'draft' && ! auth()->user()->roles()->exists()) || $state == 'processing' || $state == 'approved' || $state == 'rejected') { - return true; - } - }), - TextColumn::make('comment')->wrap(), + Tables\Columns\TextColumn::make('name')->searchable() + ->formatStateUsing( + fn (Report $record): HtmlString => new HtmlString("DOI: {$record->doi}") + ) + ->description(fn (Report $record): string => $record->comment ?? '') + ->wrap(), ]) ->defaultSort('created_at', 'desc') ->filters([ - // + AdvancedFilter::make() + ->includeColumns(), ]) ->actions([ + Tables\Actions\ViewAction::make(), Tables\Actions\EditAction::make() ->visible(function ($record) { - return $record->status == 'draft'; + return auth()->user()->roles()->exists() && $record['status'] == 'submitted'; }), Tables\Actions\Action::make('approve') + // ->button() ->hidden(function (Report $record) { return ! auth()->user()->roles()->exists() || $record['status'] == 'draft' || $record['status'] == 'rejected' || $record['status'] == 'approved'; }) @@ -261,11 +292,11 @@ public static function table(Table $table): Table ->action(function (array $data, Report $record, Molecule $molecule): void { $record['status'] = 'approved'; - $record['comment'] = $data['reason']; + $record['reason'] = $data['reason']; $record->save(); - if ($molecule['mol_id_csv']) { - $molecule_ids = explode(',', $molecule['mol_id_csv']); + if ($record['mol_id_csv'] && ! $record['is_change']) { + $molecule_ids = explode(',', $record['mol_id_csv']); $molecule = Molecule::whereIn('id', $molecule_ids)->get(); foreach ($molecule as $mol) { $mol->active = false; @@ -274,6 +305,8 @@ public static function table(Table $table): Table } }), Tables\Actions\Action::make('reject') + // ->button() + ->color('danger') ->hidden(function (Report $record) { return ! auth()->user()->roles()->exists() || $record['status'] == 'draft' || $record['status'] == 'rejected' || $record['status'] == 'approved'; }) @@ -284,7 +317,7 @@ public static function table(Table $table): Table ->action(function (array $data, Report $record): void { $record['status'] = 'rejected'; - $record['comment'] = $data['reason']; + $record['reason'] = $data['reason']; $record->save(); }), ]) diff --git a/app/Filament/Dashboard/Resources/ReportResource/Pages/CreateReport.php b/app/Filament/Dashboard/Resources/ReportResource/Pages/CreateReport.php index 25eab422..937c3131 100644 --- a/app/Filament/Dashboard/Resources/ReportResource/Pages/CreateReport.php +++ b/app/Filament/Dashboard/Resources/ReportResource/Pages/CreateReport.php @@ -65,7 +65,7 @@ protected function beforeCreate(): void protected function mutateFormDataBeforeCreate(array $data): array { $data['user_id'] = auth()->id(); - $data['status'] = 'draft'; + $data['status'] = 'submitted'; return $data; } diff --git a/app/Filament/Dashboard/Resources/ReportResource/Pages/EditReport.php b/app/Filament/Dashboard/Resources/ReportResource/Pages/EditReport.php index 5bf27158..faec4f41 100644 --- a/app/Filament/Dashboard/Resources/ReportResource/Pages/EditReport.php +++ b/app/Filament/Dashboard/Resources/ReportResource/Pages/EditReport.php @@ -13,7 +13,7 @@ class EditReport extends EditRecord protected function getHeaderActions(): array { return [ - Actions\DeleteAction::make(), + // Actions\DeleteAction::make(), ]; } } diff --git a/app/Filament/Dashboard/Resources/ReportResource/Pages/ListReports.php b/app/Filament/Dashboard/Resources/ReportResource/Pages/ListReports.php index 105cb4f4..dc0f0dff 100644 --- a/app/Filament/Dashboard/Resources/ReportResource/Pages/ListReports.php +++ b/app/Filament/Dashboard/Resources/ReportResource/Pages/ListReports.php @@ -3,11 +3,16 @@ namespace App\Filament\Dashboard\Resources\ReportResource\Pages; use App\Filament\Dashboard\Resources\ReportResource; +use App\Models\Report; +use Archilex\AdvancedTables\AdvancedTables; +use Archilex\AdvancedTables\Components\PresetView; use Filament\Actions; use Filament\Resources\Pages\ListRecords; class ListReports extends ListRecords { + use AdvancedTables; + protected static string $resource = ReportResource::class; protected function getHeaderActions(): array @@ -16,4 +21,26 @@ protected function getHeaderActions(): array Actions\CreateAction::make(), ]; } + + public function getPresetViews(): array + { + return [ + 'submitted' => PresetView::make() + ->modifyQueryUsing(fn ($query) => $query->where('status', 'submitted')) + ->favorite() + ->badge(Report::query()->where('status', 'submitted')->count()) + ->preserveAll() + ->default(), + 'approved' => PresetView::make() + ->modifyQueryUsing(fn ($query) => $query->where('status', 'approved')) + ->favorite() + ->badge(Report::query()->where('status', 'approved')->count()) + ->preserveAll(), + 'rejected' => PresetView::make() + ->modifyQueryUsing(fn ($query) => $query->where('status', 'rejected')) + ->favorite() + ->badge(Report::query()->where('status', 'rejected')->count()) + ->preserveAll(), + ]; + } } diff --git a/app/Filament/Dashboard/Resources/ReportResource/RelationManagers/MoleculesRelationManager.php b/app/Filament/Dashboard/Resources/ReportResource/RelationManagers/MoleculesRelationManager.php index a978843d..e75751fb 100644 --- a/app/Filament/Dashboard/Resources/ReportResource/RelationManagers/MoleculesRelationManager.php +++ b/app/Filament/Dashboard/Resources/ReportResource/RelationManagers/MoleculesRelationManager.php @@ -2,12 +2,15 @@ namespace App\Filament\Dashboard\Resources\ReportResource\RelationManagers; +use App\Models\Molecule; use Filament\Forms; use Filament\Forms\Form; use Filament\Resources\RelationManagers\RelationManager; use Filament\Tables; +use Filament\Tables\Columns\ImageColumn; use Filament\Tables\Table; use Illuminate\Database\Eloquent\Model; +use Illuminate\Support\HtmlString; class MoleculesRelationManager extends RelationManager { @@ -27,8 +30,45 @@ public function table(Table $table): Table { return $table ->recordTitleAttribute('canonical_smiles') + ->recordTitleAttribute('identifier') ->columns([ - Tables\Columns\TextColumn::make('canonical_smiles'), + ImageColumn::make('structure')->square() + ->label('Structure') + ->state(function ($record) { + return env('CM_API', 'https://api.cheminf.studio/latest/').'depict/2D?smiles='.urlencode($record->canonical_smiles).'&height=300&width=300&CIP=true&toolkit=cdk'; + }) + ->width(200) + ->height(200) + ->ring(5) + ->defaultImageUrl(url('/images/placeholder.png')), + Tables\Columns\TextColumn::make('id')->searchable()->toggleable(isToggledHiddenByDefault: true), + Tables\Columns\TextColumn::make('identifier')->searchable()->toggleable(isToggledHiddenByDefault: true), + Tables\Columns\TextColumn::make('identifier') + ->label('Details') + ->formatStateUsing( + fn (Molecule $molecule): HtmlString => new HtmlString("ID: {$molecule->id}
Identifier: {$molecule->identifier}
Name: {$molecule->name}") + ) + ->description(fn (Molecule $molecule): string => $molecule->standard_inchi) + ->wrap(), + Tables\Columns\TextColumn::make('name') + ->searchable() + ->wrap() + ->lineClamp(6) + ->toggleable(isToggledHiddenByDefault: true), + Tables\Columns\TextColumn::make('synonyms') + ->searchable() + ->wrap() + ->lineClamp(6) + ->toggleable(isToggledHiddenByDefault: true), + Tables\Columns\TextColumn::make('properties.exact_molecular_weight') + ->label('Mol.Wt') + ->numeric() + ->toggleable(isToggledHiddenByDefault: true), + Tables\Columns\TextColumn::make('properties.np_likeness') + ->label('NP Likeness') + ->numeric() + ->toggleable(isToggledHiddenByDefault: true), + Tables\Columns\TextColumn::make('status'), ]) ->filters([ // diff --git a/database/migrations/2024_09_09_150749_add_columns_on_reports_table.php b/database/migrations/2024_09_09_150749_add_columns_on_reports_table.php new file mode 100644 index 00000000..cb186437 --- /dev/null +++ b/database/migrations/2024_09_09_150749_add_columns_on_reports_table.php @@ -0,0 +1,31 @@ +longText('reason')->nullable(); + $table->longText('query')->nullable(); + $table->renameColumn('url', 'doi'); + $table->string('doi')->nullable()->change(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('reports', function (Blueprint $table) { + $table->dropColumn(['reason', 'doi', 'query']); + }); + } +}; From 01ad02ddf5dc414a68b32a727cef5bf52f3768a5 Mon Sep 17 00:00:00 2001 From: Sagar Date: Mon, 9 Sep 2024 19:45:05 +0200 Subject: [PATCH 03/20] fix: improvements to the time line display in the compound details page --- .../Dashboard/Resources/MoleculeResource.php | 21 +--------- app/Livewire/MoleculeHistoryTimeline.php | 12 +++--- app/Models/Molecule.php | 1 - ...0750_change_columns_on_molecules_table.php | 28 +++++++++++++ .../molecule-history-timeline.blade.php | 41 ++++++++++++++++++- 5 files changed, 74 insertions(+), 29 deletions(-) create mode 100644 database/migrations/2024_09_09_150750_change_columns_on_molecules_table.php diff --git a/app/Filament/Dashboard/Resources/MoleculeResource.php b/app/Filament/Dashboard/Resources/MoleculeResource.php index 9af255f5..fda56f34 100644 --- a/app/Filament/Dashboard/Resources/MoleculeResource.php +++ b/app/Filament/Dashboard/Resources/MoleculeResource.php @@ -24,7 +24,6 @@ use Filament\Tables\Columns\ImageColumn; use Filament\Tables\Table; use Illuminate\Database\Eloquent\Collection; -use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Redirect; use Illuminate\Support\HtmlString; @@ -128,15 +127,7 @@ public static function table(Table $table): Table $record->active = ! $record->active; - $reasons = json_decode($record->comment, true); - array_push($reasons, [ - 'changed_status_to' => $record['active'], - 'changed_by' => Auth::user()->id, - 'changed_at' => now(), - 'reason' => $data['reason'], - 'bulk_action' => false, - ]); - $record->comment = json_encode($reasons); + $record->active ?: $record->comment = $data['reason']; $record->save(); }) @@ -158,15 +149,7 @@ public static function table(Table $table): Table foreach ($records as $record) { $record->active = ! $record->active; - $reasons = json_decode($record->comment, true); - array_push($reasons, [ - 'changed_status_to' => $record['active'], - 'changed_by' => Auth::user()->id, - 'changed_at' => now(), - 'reason' => $data['reason'], - 'bulk_action' => true, - ]); - $record->comment = json_encode($reasons); + $record->comment = $data['reason']; $record->save(); } diff --git a/app/Livewire/MoleculeHistoryTimeline.php b/app/Livewire/MoleculeHistoryTimeline.php index 47db6dfc..6efaa7f5 100644 --- a/app/Livewire/MoleculeHistoryTimeline.php +++ b/app/Livewire/MoleculeHistoryTimeline.php @@ -18,19 +18,17 @@ public function getHistory() $audit_data[$index]['event'] = $audit->getMetadata()['audit_event']; $audit_data[$index]['created_at'] = date('Y/m/d', strtotime($audit->getMetadata()['audit_created_at'])); foreach ($audit->getModified() as $key => $value) { - $audit_data[$index]['affected_column'] = $key; - $audit_data[$index]['old_value'] = $value['old']; - $audit_data[$index]['new_value'] = $value['new']; + $audit_data[$index]['affected_columns'][$key]['old_value'] = $value['old']; + $audit_data[$index]['affected_columns'][$key]['new_value'] = $value['new']; } } $initial_audit = []; $initial_audit['user_name'] = null; - $initial_audit['event'] = 'created'; + $initial_audit['event'] = null; $initial_audit['created_at'] = $this->mol->created_at->format('Y/m/d'); - $initial_audit['affected_column'] = null; - $initial_audit['old_value'] = null; - $initial_audit['new_value'] = null; + $initial_audit['affected_columns']['created']['old_value'] = null; + $initial_audit['affected_columns']['created']['new_value'] = null; array_unshift($audit_data, $initial_audit); $this->audit_data = $audit_data; diff --git a/app/Models/Molecule.php b/app/Models/Molecule.php index b61b3f96..93e94130 100644 --- a/app/Models/Molecule.php +++ b/app/Models/Molecule.php @@ -60,7 +60,6 @@ class Molecule extends Model implements Auditable protected $casts = [ 'synonyms' => 'array', 'cas' => 'array', - 'comment' => 'array', ]; /** diff --git a/database/migrations/2024_09_09_150750_change_columns_on_molecules_table.php b/database/migrations/2024_09_09_150750_change_columns_on_molecules_table.php new file mode 100644 index 00000000..2ba8b59a --- /dev/null +++ b/database/migrations/2024_09_09_150750_change_columns_on_molecules_table.php @@ -0,0 +1,28 @@ +longText('comment')->nullable()->change(); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('reports', function (Blueprint $table) { + $table->json('comment')->nullable()->change(); + }); + } +}; diff --git a/resources/views/livewire/molecule-history-timeline.blade.php b/resources/views/livewire/molecule-history-timeline.blade.php index 3f4f9260..2e632da8 100644 --- a/resources/views/livewire/molecule-history-timeline.blade.php +++ b/resources/views/livewire/molecule-history-timeline.blade.php @@ -1,4 +1,4 @@ -
+

-

{{$audit['event']}} {{$audit['affected_column']}}

{{$audit['user_name']}}

+

+

{{$audit['user_name']}} {{$audit['event']}}

+ @foreach ($audit['affected_columns'] as $column_name => $column_values) + +
+
+ {{$column_name}} +
+ + + + + @switch($column_name) + @case('comment') + {{$column_values['new_value']}} + @break + @case('active') + @if ($column_values['new_value']) + Activated + @else + Deactivated + @endif + @break + @case('created') + Initial creation of the compound on COCONUT + @break + @default + Old Value: {{$column_values['old_value']}}
+ New Value: {{$column_values['new_value']}} + @endswitch +
+
+
+
+ + + @endforeach +

From 37c1c50b71a9618285f4eff5cba5309efa2e4b78 Mon Sep 17 00:00:00 2001 From: Sagar Date: Mon, 9 Sep 2024 20:07:34 +0200 Subject: [PATCH 04/20] fix: reason from reports table is removed since there is a column comment that curators can use --- .../2024_09_09_150749_add_columns_on_reports_table.php | 3 +-- .../2024_09_09_150750_change_columns_on_molecules_table.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/database/migrations/2024_09_09_150749_add_columns_on_reports_table.php b/database/migrations/2024_09_09_150749_add_columns_on_reports_table.php index cb186437..6ff85694 100644 --- a/database/migrations/2024_09_09_150749_add_columns_on_reports_table.php +++ b/database/migrations/2024_09_09_150749_add_columns_on_reports_table.php @@ -12,7 +12,6 @@ public function up(): void { Schema::table('reports', function (Blueprint $table) { - $table->longText('reason')->nullable(); $table->longText('query')->nullable(); $table->renameColumn('url', 'doi'); $table->string('doi')->nullable()->change(); @@ -25,7 +24,7 @@ public function up(): void public function down(): void { Schema::table('reports', function (Blueprint $table) { - $table->dropColumn(['reason', 'doi', 'query']); + $table->dropColumn([ 'doi', 'query']); }); } }; diff --git a/database/migrations/2024_09_09_150750_change_columns_on_molecules_table.php b/database/migrations/2024_09_09_150750_change_columns_on_molecules_table.php index 2ba8b59a..a2ce3881 100644 --- a/database/migrations/2024_09_09_150750_change_columns_on_molecules_table.php +++ b/database/migrations/2024_09_09_150750_change_columns_on_molecules_table.php @@ -21,7 +21,7 @@ public function up(): void */ public function down(): void { - Schema::table('reports', function (Blueprint $table) { + Schema::table('molecules', function (Blueprint $table) { $table->json('comment')->nullable()->change(); }); } From acb688c9e99ad915ed0ef2d2064abc68f8838c64 Mon Sep 17 00:00:00 2001 From: Sagar Date: Tue, 10 Sep 2024 14:59:54 +0200 Subject: [PATCH 05/20] fix: improved readability of the event and affected columns --- resources/views/livewire/molecule-history-timeline.blade.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/livewire/molecule-history-timeline.blade.php b/resources/views/livewire/molecule-history-timeline.blade.php index 2e632da8..4931df16 100644 --- a/resources/views/livewire/molecule-history-timeline.blade.php +++ b/resources/views/livewire/molecule-history-timeline.blade.php @@ -20,12 +20,12 @@

-

{{$audit['user_name']}} {{$audit['event']}}

+

{{$audit['user_name']}} {{$audit['event']}}

@foreach ($audit['affected_columns'] as $column_name => $column_values)
- {{$column_name}} + {{$column_name}}
From 9806d5c49f3fad2097b6c2236d7d2263230f1bdb Mon Sep 17 00:00:00 2001 From: Venkata Chandra Sekhar Nainala Date: Wed, 11 Sep 2024 12:55:17 +0200 Subject: [PATCH 06/20] fix: updated CD link and release notes in download page --- resources/views/livewire/download.blade.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/views/livewire/download.blade.php b/resources/views/livewire/download.blade.php index 2bebccf4..faf39fc9 100644 --- a/resources/views/livewire/download.blade.php +++ b/resources/views/livewire/download.blade.php @@ -34,7 +34,7 @@ class="mx-auto w-full max-w-2xl border-t border-gray-900/10 pt-12 sm:pt-16 lg:mx
+ September 2024 - release notes

COCONUT data is released under @@ -324,9 +324,9 @@ class="mt-3 text-lg font-semibold leading-6 text-gray-900 group-hover:text-gray-

- - Coming soon + CompoundDiscovererCOCONUT_ 2.csv (Sept 2024)
From 104f17b861e4df31d820d4b3a5abf015d7c67c10 Mon Sep 17 00:00:00 2001 From: Venkata Chandra Sekhar Nainala Date: Wed, 11 Sep 2024 14:32:08 +0200 Subject: [PATCH 07/20] fix: download page css updates --- resources/views/livewire/download.blade.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/resources/views/livewire/download.blade.php b/resources/views/livewire/download.blade.php index faf39fc9..975872ee 100644 --- a/resources/views/livewire/download.blade.php +++ b/resources/views/livewire/download.blade.php @@ -1,7 +1,7 @@
-
+

+ class="mx-auto w-full px-6 md:px-0 max-w-2xl border-t border-gray-900/10 pt-12 sm:pt-16 lg:mx-0 lg:max-w-none lg:border-t-0 lg:pt-0">
+ September 2024 - release notes

COCONUT data is released under @@ -77,7 +77,7 @@ class="text-sm font-semibold leading-6 text-indigo-600 hover:text-indigo-500">Do

-
+

Need older versions?

Download previous releases (Zenodo) From a35eac3026e58e5c55d1ed942e7f0784583c5610 Mon Sep 17 00:00:00 2001 From: Venkata Chandra Sekhar Nainala Date: Wed, 11 Sep 2024 14:34:13 +0200 Subject: [PATCH 08/20] fix: css updates fix --- resources/views/livewire/download.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/livewire/download.blade.php b/resources/views/livewire/download.blade.php index 975872ee..7c007c14 100644 --- a/resources/views/livewire/download.blade.php +++ b/resources/views/livewire/download.blade.php @@ -77,7 +77,7 @@ class="text-sm font-semibold leading-6 text-indigo-600 hover:text-indigo-500">Do
-
+

Need older versions?

Download previous releases (Zenodo) From edb928b85a8b992581ee7b64f1f33f7d3424f0c7 Mon Sep 17 00:00:00 2001 From: Venkata Chandra Sekhar Nainala Date: Wed, 11 Sep 2024 14:55:37 +0200 Subject: [PATCH 09/20] feat: enable local docker composer prod deployement --- docker-compose.prod.yml | 104 +++++++++++++++++++ resources/dc-ops/nginx/Dockerfile | 12 +++ resources/dc-ops/nginx/default.conf | 20 ++++ resources/dc-ops/production/Dockerfile | 82 +++++++++++++++ resources/dc-ops/production/php.ini | 5 + resources/dc-ops/production/start-container | 26 +++++ resources/dc-ops/production/supervisord.conf | 9 ++ 7 files changed, 258 insertions(+) create mode 100755 docker-compose.prod.yml create mode 100755 resources/dc-ops/nginx/Dockerfile create mode 100755 resources/dc-ops/nginx/default.conf create mode 100755 resources/dc-ops/production/Dockerfile create mode 100755 resources/dc-ops/production/php.ini create mode 100755 resources/dc-ops/production/start-container create mode 100755 resources/dc-ops/production/supervisord.conf diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml new file mode 100755 index 00000000..74c85246 --- /dev/null +++ b/docker-compose.prod.yml @@ -0,0 +1,104 @@ +services: + app: + build: + context: . + dockerfile: ./resources/dc-ops/production/Dockerfile + args: + WWWGROUP: '${WWWGROUP}' + image: coconut-8.3/app + container_name: coconut_app + networks: + - coconut + depends_on: + - pgsql + - redis + # - typesense + volumes: + - www-data:/var/www + pgsql: + image: "informaticsmatters/rdkit-cartridge-debian:latest" + ports: + - '${FORWARD_DB_PORT:-5432}:5432' + environment: + PGPASSWORD: '${DB_PASSWORD:-secret}' + POSTGRES_DB: '${DB_DATABASE}' + POSTGRES_USER: '${DB_USERNAME}' + POSTGRES_PASSWORD: '${DB_PASSWORD:-secret}' + volumes: + - 'coconut-pgsql:/var/lib/postgresql/data' + - './docker/pgsql/create-testing-database.sql:/docker-entrypoint-initdb.d/10-create-testing-database.sql' + networks: + - coconut + healthcheck: + test: + - CMD + - pg_isready + - '-q' + - '-d' + - '${DB_DATABASE}' + - '-U' + - '${DB_USERNAME}' + retries: 3 + timeout: 5s + redis: + image: 'redis:alpine' + ports: + - '${FORWARD_REDIS_PORT:-6379}:6379' + volumes: + - 'coconut-redis:/data' + networks: + - coconut + healthcheck: + test: + - CMD + - redis-cli + - ping + retries: 3 + timeout: 5s + nginx: + build: + context: . + dockerfile: ./resources/ops/nginx/Dockerfile + container_name: coconut_nginx + restart: unless-stopped + ports: + - 80:80 + networks: + - coconut + depends_on: + - app + volumes: + - www-data:/var/www + # typesense: + # image: 'typesense/typesense:0.25.2' + # ports: + # - '${FORWARD_TYPESENSE_PORT:-8108}:8108' + # environment: + # TYPESENSE_DATA_DIR: '${TYPESENSE_DATA_DIR:-/typesense-data}' + # TYPESENSE_API_KEY: '${TYPESENSE_API_KEY:-xyz}' + # TYPESENSE_ENABLE_CORS: '${TYPESENSE_ENABLE_CORS:-true}' + # volumes: + # - 'coconut-typesense:/typesense-data' + # networks: + # - coconut + # healthcheck: + # test: + # - CMD + # - wget + # - '--no-verbose' + # - '--spider' + # - 'http://localhost:8108/health' + # retries: 5 + # timeout: 7s +networks: + coconut: + driver: bridge +volumes: + coconut-pgsql: + driver: local + coconut-redis: + driver: local + www-data: + driver: local + # coconut-typesense: + # driver: local diff --git a/resources/dc-ops/nginx/Dockerfile b/resources/dc-ops/nginx/Dockerfile new file mode 100755 index 00000000..9d1f5d47 --- /dev/null +++ b/resources/dc-ops/nginx/Dockerfile @@ -0,0 +1,12 @@ +FROM nginx:alpine + +# Remove default configuration file +RUN rm /etc/nginx/conf.d/default.conf + +# Copy custom configuration file from the current directory +COPY ./resources/ops/nginx/default.conf /etc/nginx/conf.d + +# Expose port 80 +EXPOSE 80 + +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/resources/dc-ops/nginx/default.conf b/resources/dc-ops/nginx/default.conf new file mode 100755 index 00000000..4c6cbf44 --- /dev/null +++ b/resources/dc-ops/nginx/default.conf @@ -0,0 +1,20 @@ +server { + listen 80; + index index.php index.html; + error_log /var/log/nginx/error.log; + access_log /var/log/nginx/access.log; + root /var/www/public; + location ~ \.php$ { + try_files $uri =404; + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass app:9000; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param PATH_INFO $fastcgi_path_info; + } + location / { + try_files $uri $uri/ /index.php?$query_string; + gzip_static on; + } +} \ No newline at end of file diff --git a/resources/dc-ops/production/Dockerfile b/resources/dc-ops/production/Dockerfile new file mode 100755 index 00000000..3f0f070d --- /dev/null +++ b/resources/dc-ops/production/Dockerfile @@ -0,0 +1,82 @@ +FROM php:8.3-fpm + +# Copy composer.lock and composer.json +COPY composer.lock composer.json /var/www/ + +# Set working directory +WORKDIR /var/www + +ARG POSTGRES_VERSION=15 + +# Install dependencies +RUN apt-get update && apt-get install -y \ + build-essential \ + libpng-dev \ + libjpeg62-turbo-dev \ + libfreetype6-dev \ + locales \ + zip \ + jpegoptim optipng pngquant gifsicle \ + vim \ + unzip \ + git \ + curl \ + libonig-dev \ + libzip-dev \ + libicu-dev \ + libgd-dev \ + libpq-dev + +RUN apt-get install -y postgresql-client-$POSTGRES_VERSION + +# Install imagick +RUN apt-get update && apt-get install -y --no-install-recommends \ + libmagickwand-dev && \ + git clone https://github.com/Imagick/imagick.git --depth 1 /tmp/imagick && \ + cd /tmp/imagick && \ + phpize && \ + ./configure && \ + make && \ + make install && \ + docker-php-ext-enable imagick && \ + apt-get purge -y --auto-remove git && \ + rm -rf /var/lib/apt/lists/* /tmp/imagick + +# Clear cache +RUN apt-get clean && rm -rf /var/lib/apt/lists/* + +# Install extensions +RUN docker-php-ext-configure pgsql --with-pgsql=/usr/include/postgresql/ +RUN docker-php-ext-install pdo pdo_mysql pdo_pgsql pgsql mbstring zip exif pcntl +RUN docker-php-ext-configure gd --with-external-gd +RUN docker-php-ext-install gd +RUN docker-php-ext-configure intl +RUN docker-php-ext-install intl + +RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ + && apt-get install -y nodejs + +# Install composer +RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer + +# Add user for laravel application +RUN groupadd -g 1000 www +RUN useradd -u 1000 -ms /bin/bash -g www www + +# Copy existing application directory contents +COPY . /var/www + +RUN composer install --optimize-autoloader --no-scripts --prefer-dist +RUN npm ci +RUN npm run build + +# Copy existing application directory permissions +COPY --chown=www:www . /var/www + +# Change current user to www +USER www + +# Expose port 9000 and start php-fpm server +EXPOSE 9000 + +CMD ["php-fpm"] \ No newline at end of file diff --git a/resources/dc-ops/production/php.ini b/resources/dc-ops/production/php.ini new file mode 100755 index 00000000..0d8ce9e2 --- /dev/null +++ b/resources/dc-ops/production/php.ini @@ -0,0 +1,5 @@ +[PHP] +post_max_size = 100M +upload_max_filesize = 100M +variables_order = EGPCS +pcov.directory = . diff --git a/resources/dc-ops/production/start-container b/resources/dc-ops/production/start-container new file mode 100755 index 00000000..40c55dfe --- /dev/null +++ b/resources/dc-ops/production/start-container @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +if [ "$SUPERVISOR_PHP_USER" != "root" ] && [ "$SUPERVISOR_PHP_USER" != "sail" ]; then + echo "You should set SUPERVISOR_PHP_USER to either 'sail' or 'root'." + exit 1 +fi + +if [ ! -z "$WWWUSER" ]; then + usermod -u $WWWUSER sail +fi + +if [ ! -d /.composer ]; then + mkdir /.composer +fi + +chmod -R ugo+rw /.composer + +if [ $# -gt 0 ]; then + if [ "$SUPERVISOR_PHP_USER" = "root" ]; then + exec "$@" + else + exec gosu $WWWUSER "$@" + fi +else + exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf +fi diff --git a/resources/dc-ops/production/supervisord.conf b/resources/dc-ops/production/supervisord.conf new file mode 100755 index 00000000..5ad4a8a5 --- /dev/null +++ b/resources/dc-ops/production/supervisord.conf @@ -0,0 +1,9 @@ +[supervisord] +nodaemon=true + +# [program:php-fpm] +# command=/usr/sbin/php-fpm8.3 -F +# autostart=true +# autorestart=true +# stderr_logfile=/var/log/supervisor/php-fpm.err.log +# stdout_logfile=/var/log/supervisor/php-fpm.out.log From 0ab8a8061b6a66547e40cc3cb1aa19ded1d422d8 Mon Sep 17 00:00:00 2001 From: Venkata Chandra Sekhar Nainala Date: Wed, 11 Sep 2024 15:07:44 +0200 Subject: [PATCH 10/20] fix: nginx path update --- docker-compose.prod.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 74c85246..8b960853 100755 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -58,7 +58,7 @@ services: nginx: build: context: . - dockerfile: ./resources/ops/nginx/Dockerfile + dockerfile: ./resources/dc-ops/nginx/Dockerfile container_name: coconut_nginx restart: unless-stopped ports: From 2f4d64eb84ed8985172a8d9d142204ec1c14f0ef Mon Sep 17 00:00:00 2001 From: Venkata Chandra Sekhar Nainala Date: Wed, 11 Sep 2024 15:08:48 +0200 Subject: [PATCH 11/20] fix: path issues fix --- resources/dc-ops/nginx/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/dc-ops/nginx/Dockerfile b/resources/dc-ops/nginx/Dockerfile index 9d1f5d47..1eb7ac41 100755 --- a/resources/dc-ops/nginx/Dockerfile +++ b/resources/dc-ops/nginx/Dockerfile @@ -4,7 +4,7 @@ FROM nginx:alpine RUN rm /etc/nginx/conf.d/default.conf # Copy custom configuration file from the current directory -COPY ./resources/ops/nginx/default.conf /etc/nginx/conf.d +COPY ./resources/dc-ops/nginx/default.conf /etc/nginx/conf.d # Expose port 80 EXPOSE 80 From 2d89b6b2f7aff36ef61fd834748be117542e2074 Mon Sep 17 00:00:00 2001 From: Sagar Date: Wed, 11 Sep 2024 15:27:51 +0200 Subject: [PATCH 12/20] fix: classes are now made clickable which open corresponding searches in new tab --- .../views/livewire/molecule-details.blade.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/resources/views/livewire/molecule-details.blade.php b/resources/views/livewire/molecule-details.blade.php index fdb7e943..d0ae40ba 100644 --- a/resources/views/livewire/molecule-details.blade.php +++ b/resources/views/livewire/molecule-details.blade.php @@ -387,23 +387,31 @@ classification From 5a831082062a4420225a98cd21435415c9da5543 Mon Sep 17 00:00:00 2001 From: Venkata Chandra Sekhar Nainala Date: Wed, 11 Sep 2024 19:49:53 +0200 Subject: [PATCH 13/20] fix: added missing bcmath extension to php docker container --- resources/dc-ops/production/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/dc-ops/production/Dockerfile b/resources/dc-ops/production/Dockerfile index 3f0f070d..72fa0768 100755 --- a/resources/dc-ops/production/Dockerfile +++ b/resources/dc-ops/production/Dockerfile @@ -52,6 +52,8 @@ RUN docker-php-ext-configure gd --with-external-gd RUN docker-php-ext-install gd RUN docker-php-ext-configure intl RUN docker-php-ext-install intl +RUN docker-php-ext-install bcmath + RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \ && apt-get install -y nodejs From 392080f0af38f1a24103b2599db54c16dcaba722 Mon Sep 17 00:00:00 2001 From: Venkata Chandra Sekhar Nainala Date: Thu, 12 Sep 2024 10:49:27 +0200 Subject: [PATCH 14/20] fix: Redis not found bug fix --- resources/dc-ops/production/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/dc-ops/production/Dockerfile b/resources/dc-ops/production/Dockerfile index 72fa0768..630d59d3 100755 --- a/resources/dc-ops/production/Dockerfile +++ b/resources/dc-ops/production/Dockerfile @@ -25,7 +25,8 @@ RUN apt-get update && apt-get install -y \ libzip-dev \ libicu-dev \ libgd-dev \ - libpq-dev + libpq-dev \ + php-redis RUN apt-get install -y postgresql-client-$POSTGRES_VERSION From 20d6b234a1c1ab90544c89cf8c31f16b09f598c4 Mon Sep 17 00:00:00 2001 From: Venkata Chandra Sekhar Nainala Date: Thu, 12 Sep 2024 10:56:35 +0200 Subject: [PATCH 15/20] fix: added missing libraries --- resources/dc-ops/production/Dockerfile | 40 +++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/resources/dc-ops/production/Dockerfile b/resources/dc-ops/production/Dockerfile index 630d59d3..a23f2f71 100755 --- a/resources/dc-ops/production/Dockerfile +++ b/resources/dc-ops/production/Dockerfile @@ -25,10 +25,42 @@ RUN apt-get update && apt-get install -y \ libzip-dev \ libicu-dev \ libgd-dev \ - libpq-dev \ - php-redis - -RUN apt-get install -y postgresql-client-$POSTGRES_VERSION + libpq-dev + +RUN apt-get update \ + && mkdir -p /etc/apt/keyrings \ + && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 dnsutils librsvg2-bin fswatch \ + && curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c' | gpg --dearmor | tee /etc/apt/keyrings/ppa_ondrej_php.gpg > /dev/null \ + && echo "deb [signed-by=/etc/apt/keyrings/ppa_ondrej_php.gpg] https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \ + && apt-get update \ + && apt-get install -y php8.3-cli php8.3-dev \ + php8.3-pgsql php8.3-sqlite3 php8.3-gd \ + php8.3-curl \ + php8.3-imap php8.3-mysql php8.3-mbstring \ + php8.3-xml php8.3-zip php8.3-bcmath php8.3-soap \ + php8.3-intl php8.3-readline \ + php8.3-ldap \ + php8.3-msgpack php8.3-igbinary php8.3-redis php8.3-swoole \ + php8.3-memcached php8.3-pcov php8.3-imagick php8.3-xdebug \ + && curl -sLS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer \ + && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ + && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_VERSION.x nodistro main" > /etc/apt/sources.list.d/nodesource.list \ + && apt-get update \ + && apt-get install -y nodejs \ + && npm install -g npm \ + && npm install -g pnpm \ + && npm install -g bun \ + && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /etc/apt/keyrings/yarn.gpg >/dev/null \ + && echo "deb [signed-by=/etc/apt/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \ + && curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /etc/apt/keyrings/pgdg.gpg >/dev/null \ + && echo "deb [signed-by=/etc/apt/keyrings/pgdg.gpg] http://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list \ + && apt-get update \ + && apt-get install -y yarn \ + && apt-get install -y mysql-client \ + && apt-get install -y postgresql-client-$POSTGRES_VERSION \ + && apt-get -y autoremove \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* # Install imagick RUN apt-get update && apt-get install -y --no-install-recommends \ From 56b0a4513af1c9c97e74ede512b2ae862c197fa8 Mon Sep 17 00:00:00 2001 From: Venkata Chandra Sekhar Nainala Date: Thu, 12 Sep 2024 10:58:05 +0200 Subject: [PATCH 16/20] fix: removed python2 --- resources/dc-ops/production/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/dc-ops/production/Dockerfile b/resources/dc-ops/production/Dockerfile index a23f2f71..6670f457 100755 --- a/resources/dc-ops/production/Dockerfile +++ b/resources/dc-ops/production/Dockerfile @@ -29,7 +29,7 @@ RUN apt-get update && apt-get install -y \ RUN apt-get update \ && mkdir -p /etc/apt/keyrings \ - && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 dnsutils librsvg2-bin fswatch \ + && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev dnsutils librsvg2-bin fswatch \ && curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c' | gpg --dearmor | tee /etc/apt/keyrings/ppa_ondrej_php.gpg > /dev/null \ && echo "deb [signed-by=/etc/apt/keyrings/ppa_ondrej_php.gpg] https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \ && apt-get update \ From 665e84c409d2c026d395924f46ce87d9c0aaed19 Mon Sep 17 00:00:00 2001 From: Kohulan Rajan Date: Thu, 12 Sep 2024 11:18:06 +0200 Subject: [PATCH 17/20] fix: update release-please token --- .github/workflows/release-please.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index b69ac9b6..ed395b5d 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -21,5 +21,5 @@ jobs: with: release-type: php package-name: release-please-action - token: ${{ secrets.GITHUB_TOKEN }} - prerelease: true \ No newline at end of file + token: ${{ secrets.RELEASE_PLEASE_TOKEN }} + prerelease: true From d318b52dc6b374d79717842cbefc45b76eee0a28 Mon Sep 17 00:00:00 2001 From: Sagar Date: Thu, 12 Sep 2024 12:25:25 +0200 Subject: [PATCH 18/20] chore: reorganised the conditions for efficiency --- app/Filament/Dashboard/Resources/ReportResource.php | 12 +++++------- ...024_09_09_150749_add_columns_on_reports_table.php | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/app/Filament/Dashboard/Resources/ReportResource.php b/app/Filament/Dashboard/Resources/ReportResource.php index 8facfc38..a26e7ad1 100644 --- a/app/Filament/Dashboard/Resources/ReportResource.php +++ b/app/Filament/Dashboard/Resources/ReportResource.php @@ -156,7 +156,7 @@ public static function form(Form $form): Form } }) ->hidden(function (Get $get, string $operation) { - if ($operation == 'edit' || $operation == 'view') { + if ($operation != 'create') { if ($get('collections') == []) { return true; } @@ -183,7 +183,7 @@ public static function form(Form $form): Form } }) ->hidden(function (Get $get, string $operation) { - if ($operation == 'edit' || $operation == 'view') { + if ($operation != 'create') { if ($get('citations') == []) { return true; } @@ -208,7 +208,7 @@ public static function form(Form $form): Form } }) ->hidden(function (Get $get, string $operation) { - if ($operation == 'edit' || $operation == 'view') { + if ($operation != 'create') { if ($get('organisms') == []) { return true; } @@ -231,10 +231,8 @@ public static function form(Form $form): Form } }) ->hidden(function (Get $get, string $operation) { - if ($operation == 'edit' || $operation == 'view') { - if (is_null($get('mol_id_csv'))) { - return true; - } + if ($operation != 'create') { + return true; } elseif (! request()->has('compound_id') && $get('report_type') != 'molecule') { return true; } diff --git a/database/migrations/2024_09_09_150749_add_columns_on_reports_table.php b/database/migrations/2024_09_09_150749_add_columns_on_reports_table.php index 6ff85694..5a05fbf6 100644 --- a/database/migrations/2024_09_09_150749_add_columns_on_reports_table.php +++ b/database/migrations/2024_09_09_150749_add_columns_on_reports_table.php @@ -24,7 +24,7 @@ public function up(): void public function down(): void { Schema::table('reports', function (Blueprint $table) { - $table->dropColumn([ 'doi', 'query']); + $table->dropColumn(['doi', 'query']); }); } }; From a35bb25df4865c6c2f18302dd54e7c867d6f1236 Mon Sep 17 00:00:00 2001 From: Venkata Chandra Sekhar Nainala Date: Thu, 12 Sep 2024 14:50:53 +0200 Subject: [PATCH 19/20] fix: collections image override bug fix and auditables relation manager bug fix --- .../Pages/EditCollection.php | 9 + composer.lock | 682 ++++++++---------- .../tables/columns/key-value.blade.php | 40 +- 3 files changed, 339 insertions(+), 392 deletions(-) diff --git a/app/Filament/Dashboard/Resources/CollectionResource/Pages/EditCollection.php b/app/Filament/Dashboard/Resources/CollectionResource/Pages/EditCollection.php index 44c14375..4bae6a86 100644 --- a/app/Filament/Dashboard/Resources/CollectionResource/Pages/EditCollection.php +++ b/app/Filament/Dashboard/Resources/CollectionResource/Pages/EditCollection.php @@ -11,6 +11,15 @@ class EditCollection extends EditRecord { protected static string $resource = CollectionResource::class; + protected function mutateFormDataBeforeCreate(array $data): array + { + if (! $data['image']) { + $data['image'] = $this->record->image; + } + + return $data; + } + protected function getHeaderWidgets(): array { return [ diff --git a/composer.lock b/composer.lock index a86ed7ef..6b3a6712 100644 --- a/composer.lock +++ b/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "anourvalar/eloquent-serialize", - "version": "1.2.23", + "version": "1.2.24", "source": { "type": "git", "url": "https://github.com/AnourValar/eloquent-serialize.git", - "reference": "fd7bc1dc2c98fe705647ab4b81d13ea3d599ea1f" + "reference": "77e3fc7da44fa96b6148a1613dd76fe954a5f279" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/AnourValar/eloquent-serialize/zipball/fd7bc1dc2c98fe705647ab4b81d13ea3d599ea1f", - "reference": "fd7bc1dc2c98fe705647ab4b81d13ea3d599ea1f", + "url": "https://api.github.com/repos/AnourValar/eloquent-serialize/zipball/77e3fc7da44fa96b6148a1613dd76fe954a5f279", + "reference": "77e3fc7da44fa96b6148a1613dd76fe954a5f279", "shasum": "" }, "require": { @@ -68,9 +68,9 @@ ], "support": { "issues": "https://github.com/AnourValar/eloquent-serialize/issues", - "source": "https://github.com/AnourValar/eloquent-serialize/tree/1.2.23" + "source": "https://github.com/AnourValar/eloquent-serialize/tree/1.2.24" }, - "time": "2024-07-12T10:52:26+00:00" + "time": "2024-09-08T15:57:08+00:00" }, { "name": "archilex/filament-filter-sets", @@ -291,16 +291,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.321.2", + "version": "3.321.9", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "c04f8f30891cee8480c132778cd4cc486467e77a" + "reference": "5de5099cfe0e17cb3eb2fe51de0101c99bc9442a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/c04f8f30891cee8480c132778cd4cc486467e77a", - "reference": "c04f8f30891cee8480c132778cd4cc486467e77a", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/5de5099cfe0e17cb3eb2fe51de0101c99bc9442a", + "reference": "5de5099cfe0e17cb3eb2fe51de0101c99bc9442a", "shasum": "" }, "require": { @@ -383,9 +383,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.321.2" + "source": "https://github.com/aws/aws-sdk-php/tree/3.321.9" }, - "time": "2024-08-30T18:14:40+00:00" + "time": "2024-09-11T18:15:49+00:00" }, { "name": "bacon/bacon-qr-code", @@ -598,16 +598,16 @@ }, { "name": "bezhansalleh/filament-shield", - "version": "3.2.5", + "version": "3.2.6", "source": { "type": "git", "url": "https://github.com/bezhanSalleh/filament-shield.git", - "reference": "aa1046dac93350da5dec62753783ea28a56310dc" + "reference": "212428385855256d5499b02b6148b7c9eaa1b1fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bezhanSalleh/filament-shield/zipball/aa1046dac93350da5dec62753783ea28a56310dc", - "reference": "aa1046dac93350da5dec62753783ea28a56310dc", + "url": "https://api.github.com/repos/bezhanSalleh/filament-shield/zipball/212428385855256d5499b02b6148b7c9eaa1b1fb", + "reference": "212428385855256d5499b02b6148b7c9eaa1b1fb", "shasum": "" }, "require": { @@ -672,7 +672,7 @@ ], "support": { "issues": "https://github.com/bezhanSalleh/filament-shield/issues", - "source": "https://github.com/bezhanSalleh/filament-shield/tree/3.2.5" + "source": "https://github.com/bezhanSalleh/filament-shield/tree/3.2.6" }, "funding": [ { @@ -680,7 +680,7 @@ "type": "github" } ], - "time": "2024-05-14T00:32:23+00:00" + "time": "2024-09-02T14:20:04+00:00" }, { "name": "blade-ui-kit/blade-heroicons", @@ -1328,16 +1328,16 @@ }, { "name": "doctrine/dbal", - "version": "4.1.0", + "version": "4.1.1", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "2377cd41609aa51bee822c8d207317a3f363a558" + "reference": "7a8252418689feb860ea8dfeab66d64a56a64df8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/2377cd41609aa51bee822c8d207317a3f363a558", - "reference": "2377cd41609aa51bee822c8d207317a3f363a558", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/7a8252418689feb860ea8dfeab66d64a56a64df8", + "reference": "7a8252418689feb860ea8dfeab66d64a56a64df8", "shasum": "" }, "require": { @@ -1350,16 +1350,16 @@ "doctrine/coding-standard": "12.0.0", "fig/log-test": "^1", "jetbrains/phpstorm-stubs": "2023.2", - "phpstan/phpstan": "1.11.7", + "phpstan/phpstan": "1.12.0", "phpstan/phpstan-phpunit": "1.4.0", "phpstan/phpstan-strict-rules": "^1.6", - "phpunit/phpunit": "10.5.28", + "phpunit/phpunit": "10.5.30", "psalm/plugin-phpunit": "0.19.0", "slevomat/coding-standard": "8.13.1", "squizlabs/php_codesniffer": "3.10.2", "symfony/cache": "^6.3.8|^7.0", "symfony/console": "^5.4|^6.3|^7.0", - "vimeo/psalm": "5.24.0" + "vimeo/psalm": "5.25.0" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." @@ -1416,7 +1416,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/4.1.0" + "source": "https://github.com/doctrine/dbal/tree/4.1.1" }, "funding": [ { @@ -1432,7 +1432,7 @@ "type": "tidelift" } ], - "time": "2024-08-15T07:37:07+00:00" + "time": "2024-09-03T08:58:39+00:00" }, { "name": "doctrine/deprecations", @@ -2048,16 +2048,16 @@ }, { "name": "filament/actions", - "version": "v3.2.110", + "version": "v3.2.112", "source": { "type": "git", "url": "https://github.com/filamentphp/actions.git", - "reference": "5d6e4fe444f1ef04d373518248a445bbcc3ca272" + "reference": "df3310607b49dad302b03516c558c93cb82c5164" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/actions/zipball/5d6e4fe444f1ef04d373518248a445bbcc3ca272", - "reference": "5d6e4fe444f1ef04d373518248a445bbcc3ca272", + "url": "https://api.github.com/repos/filamentphp/actions/zipball/df3310607b49dad302b03516c558c93cb82c5164", + "reference": "df3310607b49dad302b03516c558c93cb82c5164", "shasum": "" }, "require": { @@ -2097,20 +2097,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-08-26T07:22:35+00:00" + "time": "2024-09-11T08:25:31+00:00" }, { "name": "filament/filament", - "version": "v3.2.110", + "version": "v3.2.112", "source": { "type": "git", "url": "https://github.com/filamentphp/panels.git", - "reference": "130636e90e821154e0ce60dcbc7b358d2a1a716f" + "reference": "86aa182deceedce5970560c60ceae30c2c40632d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/panels/zipball/130636e90e821154e0ce60dcbc7b358d2a1a716f", - "reference": "130636e90e821154e0ce60dcbc7b358d2a1a716f", + "url": "https://api.github.com/repos/filamentphp/panels/zipball/86aa182deceedce5970560c60ceae30c2c40632d", + "reference": "86aa182deceedce5970560c60ceae30c2c40632d", "shasum": "" }, "require": { @@ -2162,20 +2162,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-08-30T01:52:09+00:00" + "time": "2024-09-11T08:25:51+00:00" }, { "name": "filament/forms", - "version": "v3.2.110", + "version": "v3.2.112", "source": { "type": "git", "url": "https://github.com/filamentphp/forms.git", - "reference": "02fe2e211993f6291b719a093ed6f63e17125e9a" + "reference": "99d72777f1e6dc5d42d936e7deb53148e4233ec3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/forms/zipball/02fe2e211993f6291b719a093ed6f63e17125e9a", - "reference": "02fe2e211993f6291b719a093ed6f63e17125e9a", + "url": "https://api.github.com/repos/filamentphp/forms/zipball/99d72777f1e6dc5d42d936e7deb53148e4233ec3", + "reference": "99d72777f1e6dc5d42d936e7deb53148e4233ec3", "shasum": "" }, "require": { @@ -2218,20 +2218,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-08-30T18:04:06+00:00" + "time": "2024-09-12T12:27:13+00:00" }, { "name": "filament/infolists", - "version": "v3.2.110", + "version": "v3.2.112", "source": { "type": "git", "url": "https://github.com/filamentphp/infolists.git", - "reference": "96403f2842e4c485f32110e4456b7a3bbcb1e835" + "reference": "e50bd9a5fc623320bd79508e3bfb72ff9e309edf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/infolists/zipball/96403f2842e4c485f32110e4456b7a3bbcb1e835", - "reference": "96403f2842e4c485f32110e4456b7a3bbcb1e835", + "url": "https://api.github.com/repos/filamentphp/infolists/zipball/e50bd9a5fc623320bd79508e3bfb72ff9e309edf", + "reference": "e50bd9a5fc623320bd79508e3bfb72ff9e309edf", "shasum": "" }, "require": { @@ -2269,11 +2269,11 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-08-14T16:52:44+00:00" + "time": "2024-09-11T08:25:25+00:00" }, { "name": "filament/notifications", - "version": "v3.2.110", + "version": "v3.2.112", "source": { "type": "git", "url": "https://github.com/filamentphp/notifications.git", @@ -2325,7 +2325,7 @@ }, { "name": "filament/spatie-laravel-media-library-plugin", - "version": "v3.2.110", + "version": "v3.2.112", "source": { "type": "git", "url": "https://github.com/filamentphp/spatie-laravel-media-library-plugin.git", @@ -2362,7 +2362,7 @@ }, { "name": "filament/spatie-laravel-tags-plugin", - "version": "v3.2.110", + "version": "v3.2.112", "source": { "type": "git", "url": "https://github.com/filamentphp/spatie-laravel-tags-plugin.git", @@ -2399,16 +2399,16 @@ }, { "name": "filament/support", - "version": "v3.2.110", + "version": "v3.2.112", "source": { "type": "git", "url": "https://github.com/filamentphp/support.git", - "reference": "78e25428c754fcbb30c321d5dda439c760de9837" + "reference": "d07086506d39f318398c13a0b8d689f75cbc14d6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/support/zipball/78e25428c754fcbb30c321d5dda439c760de9837", - "reference": "78e25428c754fcbb30c321d5dda439c760de9837", + "url": "https://api.github.com/repos/filamentphp/support/zipball/d07086506d39f318398c13a0b8d689f75cbc14d6", + "reference": "d07086506d39f318398c13a0b8d689f75cbc14d6", "shasum": "" }, "require": { @@ -2454,20 +2454,20 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-08-26T07:22:57+00:00" + "time": "2024-09-11T08:25:46+00:00" }, { "name": "filament/tables", - "version": "v3.2.110", + "version": "v3.2.112", "source": { "type": "git", "url": "https://github.com/filamentphp/tables.git", - "reference": "129943d1b4e6c1edeef53e804eb56ef78a932a6c" + "reference": "4285a031dd36250a86710631a5b1fea1372097a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filamentphp/tables/zipball/129943d1b4e6c1edeef53e804eb56ef78a932a6c", - "reference": "129943d1b4e6c1edeef53e804eb56ef78a932a6c", + "url": "https://api.github.com/repos/filamentphp/tables/zipball/4285a031dd36250a86710631a5b1fea1372097a1", + "reference": "4285a031dd36250a86710631a5b1fea1372097a1", "shasum": "" }, "require": { @@ -2506,11 +2506,11 @@ "issues": "https://github.com/filamentphp/filament/issues", "source": "https://github.com/filamentphp/filament" }, - "time": "2024-08-30T01:52:14+00:00" + "time": "2024-09-11T08:25:43+00:00" }, { "name": "filament/widgets", - "version": "v3.2.110", + "version": "v3.2.112", "source": { "type": "git", "url": "https://github.com/filamentphp/widgets.git", @@ -3161,16 +3161,16 @@ }, { "name": "kirschbaum-development/eloquent-power-joins", - "version": "3.5.7", + "version": "3.5.8", "source": { "type": "git", "url": "https://github.com/kirschbaum-development/eloquent-power-joins.git", - "reference": "3f57b398117d97bae4dfd5c37ea0f8f48f296c97" + "reference": "397ef08f15ceff48111fd7f57d9f1fd41bf1a453" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kirschbaum-development/eloquent-power-joins/zipball/3f57b398117d97bae4dfd5c37ea0f8f48f296c97", - "reference": "3f57b398117d97bae4dfd5c37ea0f8f48f296c97", + "url": "https://api.github.com/repos/kirschbaum-development/eloquent-power-joins/zipball/397ef08f15ceff48111fd7f57d9f1fd41bf1a453", + "reference": "397ef08f15ceff48111fd7f57d9f1fd41bf1a453", "shasum": "" }, "require": { @@ -3217,9 +3217,9 @@ ], "support": { "issues": "https://github.com/kirschbaum-development/eloquent-power-joins/issues", - "source": "https://github.com/kirschbaum-development/eloquent-power-joins/tree/3.5.7" + "source": "https://github.com/kirschbaum-development/eloquent-power-joins/tree/3.5.8" }, - "time": "2024-06-26T13:09:29+00:00" + "time": "2024-09-10T10:28:05+00:00" }, { "name": "lab404/laravel-impersonate", @@ -3290,16 +3290,16 @@ }, { "name": "laravel/fortify", - "version": "v1.24.0", + "version": "v1.24.1", "source": { "type": "git", "url": "https://github.com/laravel/fortify.git", - "reference": "fbe67f018c1fe26d00913de56a6d60589b4be9b2" + "reference": "8158ba0960bb5f4aae509d01d74a95e16e30de20" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/fortify/zipball/fbe67f018c1fe26d00913de56a6d60589b4be9b2", - "reference": "fbe67f018c1fe26d00913de56a6d60589b4be9b2", + "url": "https://api.github.com/repos/laravel/fortify/zipball/8158ba0960bb5f4aae509d01d74a95e16e30de20", + "reference": "8158ba0960bb5f4aae509d01d74a95e16e30de20", "shasum": "" }, "require": { @@ -3351,20 +3351,20 @@ "issues": "https://github.com/laravel/fortify/issues", "source": "https://github.com/laravel/fortify" }, - "time": "2024-08-20T14:43:56+00:00" + "time": "2024-09-03T10:02:14+00:00" }, { "name": "laravel/framework", - "version": "v11.21.0", + "version": "v11.23.2", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "9d9d36708d56665b12185493f684abce38ad2d30" + "reference": "d38bf0fd3a8936e1cb9ca8eb8d7304a564f790f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/9d9d36708d56665b12185493f684abce38ad2d30", - "reference": "9d9d36708d56665b12185493f684abce38ad2d30", + "url": "https://api.github.com/repos/laravel/framework/zipball/d38bf0fd3a8936e1cb9ca8eb8d7304a564f790f3", + "reference": "d38bf0fd3a8936e1cb9ca8eb8d7304a564f790f3", "shasum": "" }, "require": { @@ -3426,6 +3426,7 @@ "illuminate/bus": "self.version", "illuminate/cache": "self.version", "illuminate/collections": "self.version", + "illuminate/concurrency": "self.version", "illuminate/conditionable": "self.version", "illuminate/config": "self.version", "illuminate/console": "self.version", @@ -3468,7 +3469,7 @@ "league/flysystem-sftp-v3": "^3.0", "mockery/mockery": "^1.6", "nyholm/psr7": "^1.2", - "orchestra/testbench-core": "^9.1.5", + "orchestra/testbench-core": "^9.4.0", "pda/pheanstalk": "^5.0", "phpstan/phpstan": "^1.11.5", "phpunit/phpunit": "^10.5|^11.0", @@ -3526,6 +3527,7 @@ "src/Illuminate/Events/functions.php", "src/Illuminate/Filesystem/functions.php", "src/Illuminate/Foundation/helpers.php", + "src/Illuminate/Log/functions.php", "src/Illuminate/Support/helpers.php" ], "psr-4": { @@ -3557,20 +3559,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-08-20T15:00:52+00:00" + "time": "2024-09-11T21:59:23+00:00" }, { "name": "laravel/horizon", - "version": "v5.27.1", + "version": "v5.28.1", "source": { "type": "git", "url": "https://github.com/laravel/horizon.git", - "reference": "184449be3eb296ab16c13a69ce22049f32d0fc2c" + "reference": "9d2c4eaeb11408384401f8a7d1b0ea4c76554f3f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/horizon/zipball/184449be3eb296ab16c13a69ce22049f32d0fc2c", - "reference": "184449be3eb296ab16c13a69ce22049f32d0fc2c", + "url": "https://api.github.com/repos/laravel/horizon/zipball/9d2c4eaeb11408384401f8a7d1b0ea4c76554f3f", + "reference": "9d2c4eaeb11408384401f8a7d1b0ea4c76554f3f", "shasum": "" }, "require": { @@ -3634,22 +3636,22 @@ ], "support": { "issues": "https://github.com/laravel/horizon/issues", - "source": "https://github.com/laravel/horizon/tree/v5.27.1" + "source": "https://github.com/laravel/horizon/tree/v5.28.1" }, - "time": "2024-08-05T14:23:30+00:00" + "time": "2024-09-04T14:06:50+00:00" }, { "name": "laravel/jetstream", - "version": "v5.1.5", + "version": "v5.2.0", "source": { "type": "git", "url": "https://github.com/laravel/jetstream.git", - "reference": "653a422fe65278c1c4f319e99d5cb700c4117ea0" + "reference": "8093245d850c215e47df1c5fc081f545afd7f0c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/jetstream/zipball/653a422fe65278c1c4f319e99d5cb700c4117ea0", - "reference": "653a422fe65278c1c4f319e99d5cb700c4117ea0", + "url": "https://api.github.com/repos/laravel/jetstream/zipball/8093245d850c215e47df1c5fc081f545afd7f0c5", + "reference": "8093245d850c215e47df1c5fc081f545afd7f0c5", "shasum": "" }, "require": { @@ -3703,7 +3705,7 @@ "issues": "https://github.com/laravel/jetstream/issues", "source": "https://github.com/laravel/jetstream" }, - "time": "2024-08-08T13:28:23+00:00" + "time": "2024-09-09T13:52:03+00:00" }, { "name": "laravel/prompts", @@ -3890,16 +3892,16 @@ }, { "name": "laravel/socialite", - "version": "v5.15.1", + "version": "v5.16.0", "source": { "type": "git", "url": "https://github.com/laravel/socialite.git", - "reference": "cc02625f0bd1f95dc3688eb041cce0f1e709d029" + "reference": "40a2dc98c53d9dc6d55eadb0d490d3d72b73f1bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/socialite/zipball/cc02625f0bd1f95dc3688eb041cce0f1e709d029", - "reference": "cc02625f0bd1f95dc3688eb041cce0f1e709d029", + "url": "https://api.github.com/repos/laravel/socialite/zipball/40a2dc98c53d9dc6d55eadb0d490d3d72b73f1bf", + "reference": "40a2dc98c53d9dc6d55eadb0d490d3d72b73f1bf", "shasum": "" }, "require": { @@ -3958,7 +3960,7 @@ "issues": "https://github.com/laravel/socialite/issues", "source": "https://github.com/laravel/socialite" }, - "time": "2024-06-28T20:09:34+00:00" + "time": "2024-09-03T09:46:57+00:00" }, { "name": "laravel/telescope", @@ -4942,16 +4944,16 @@ }, { "name": "lomkit/laravel-rest-api", - "version": "v2.8.6", + "version": "v2.8.7", "source": { "type": "git", "url": "https://github.com/Lomkit/laravel-rest-api.git", - "reference": "5ccdac89b99e2e54e71b2cf841fea7f53893eabb" + "reference": "473601f09b547ed020cbdc8d9855e5b41e954970" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Lomkit/laravel-rest-api/zipball/5ccdac89b99e2e54e71b2cf841fea7f53893eabb", - "reference": "5ccdac89b99e2e54e71b2cf841fea7f53893eabb", + "url": "https://api.github.com/repos/Lomkit/laravel-rest-api/zipball/473601f09b547ed020cbdc8d9855e5b41e954970", + "reference": "473601f09b547ed020cbdc8d9855e5b41e954970", "shasum": "" }, "require": { @@ -5004,7 +5006,7 @@ ], "support": { "issues": "https://github.com/Lomkit/laravel-rest-api/issues", - "source": "https://github.com/Lomkit/laravel-rest-api/tree/v2.8.6" + "source": "https://github.com/Lomkit/laravel-rest-api/tree/v2.8.7" }, "funding": [ { @@ -5012,7 +5014,7 @@ "type": "github" } ], - "time": "2024-08-11T12:26:23+00:00" + "time": "2024-09-07T14:24:30+00:00" }, { "name": "maartenpaauw/laravel-specification-pattern", @@ -5189,16 +5191,16 @@ }, { "name": "maatwebsite/excel", - "version": "3.1.56", + "version": "3.1.58", "source": { "type": "git", "url": "https://github.com/SpartnerNL/Laravel-Excel.git", - "reference": "0381d0225b42c3f328d90f0dd05ca071fca3953f" + "reference": "18495a71b112f43af8ffab35111a58b4e4ba4a4d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/SpartnerNL/Laravel-Excel/zipball/0381d0225b42c3f328d90f0dd05ca071fca3953f", - "reference": "0381d0225b42c3f328d90f0dd05ca071fca3953f", + "url": "https://api.github.com/repos/SpartnerNL/Laravel-Excel/zipball/18495a71b112f43af8ffab35111a58b4e4ba4a4d", + "reference": "18495a71b112f43af8ffab35111a58b4e4ba4a4d", "shasum": "" }, "require": { @@ -5206,7 +5208,7 @@ "ext-json": "*", "illuminate/support": "5.8.*||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0", "php": "^7.0||^8.0", - "phpoffice/phpspreadsheet": "^1.18", + "phpoffice/phpspreadsheet": "^1.29.1", "psr/simple-cache": "^1.0||^2.0||^3.0" }, "require-dev": { @@ -5254,7 +5256,7 @@ ], "support": { "issues": "https://github.com/SpartnerNL/Laravel-Excel/issues", - "source": "https://github.com/SpartnerNL/Laravel-Excel/tree/3.1.56" + "source": "https://github.com/SpartnerNL/Laravel-Excel/tree/3.1.58" }, "funding": [ { @@ -5266,7 +5268,7 @@ "type": "github" } ], - "time": "2024-08-19T09:40:43+00:00" + "time": "2024-09-07T13:53:36+00:00" }, { "name": "maennchen/zipstream-php", @@ -5863,16 +5865,16 @@ }, { "name": "mtdowling/jmespath.php", - "version": "2.7.0", + "version": "2.8.0", "source": { "type": "git", "url": "https://github.com/jmespath/jmespath.php.git", - "reference": "bbb69a935c2cbb0c03d7f481a238027430f6440b" + "reference": "a2a865e05d5f420b50cc2f85bb78d565db12a6bc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/bbb69a935c2cbb0c03d7f481a238027430f6440b", - "reference": "bbb69a935c2cbb0c03d7f481a238027430f6440b", + "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/a2a865e05d5f420b50cc2f85bb78d565db12a6bc", + "reference": "a2a865e05d5f420b50cc2f85bb78d565db12a6bc", "shasum": "" }, "require": { @@ -5889,7 +5891,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { @@ -5923,9 +5925,9 @@ ], "support": { "issues": "https://github.com/jmespath/jmespath.php/issues", - "source": "https://github.com/jmespath/jmespath.php/tree/2.7.0" + "source": "https://github.com/jmespath/jmespath.php/tree/2.8.0" }, - "time": "2023-08-25T10:54:48+00:00" + "time": "2024-09-04T18:46:31+00:00" }, { "name": "myclabs/deep-copy", @@ -6301,16 +6303,16 @@ }, { "name": "nunomaduro/termwind", - "version": "v2.0.1", + "version": "v2.1.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/termwind.git", - "reference": "58c4c58cf23df7f498daeb97092e34f5259feb6a" + "reference": "e5f21eade88689536c0cdad4c3cd75f3ed26e01a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/58c4c58cf23df7f498daeb97092e34f5259feb6a", - "reference": "58c4c58cf23df7f498daeb97092e34f5259feb6a", + "url": "https://api.github.com/repos/nunomaduro/termwind/zipball/e5f21eade88689536c0cdad4c3cd75f3ed26e01a", + "reference": "e5f21eade88689536c0cdad4c3cd75f3ed26e01a", "shasum": "" }, "require": { @@ -6320,11 +6322,11 @@ }, "require-dev": { "ergebnis/phpstan-rules": "^2.2.0", - "illuminate/console": "^11.0.0", - "laravel/pint": "^1.14.0", - "mockery/mockery": "^1.6.7", - "pestphp/pest": "^2.34.1", - "phpstan/phpstan": "^1.10.59", + "illuminate/console": "^11.1.1", + "laravel/pint": "^1.15.0", + "mockery/mockery": "^1.6.11", + "pestphp/pest": "^2.34.6", + "phpstan/phpstan": "^1.10.66", "phpstan/phpstan-strict-rules": "^1.5.2", "symfony/var-dumper": "^7.0.4", "thecodingmachine/phpstan-strict-rules": "^1.0.0" @@ -6369,7 +6371,7 @@ ], "support": { "issues": "https://github.com/nunomaduro/termwind/issues", - "source": "https://github.com/nunomaduro/termwind/tree/v2.0.1" + "source": "https://github.com/nunomaduro/termwind/tree/v2.1.0" }, "funding": [ { @@ -6385,7 +6387,7 @@ "type": "github" } ], - "time": "2024-03-06T16:17:14+00:00" + "time": "2024-09-05T15:25:50+00:00" }, { "name": "openspout/openspout", @@ -6570,24 +6572,24 @@ }, { "name": "paragonie/constant_time_encoding", - "version": "v2.7.0", + "version": "v3.0.0", "source": { "type": "git", "url": "https://github.com/paragonie/constant_time_encoding.git", - "reference": "52a0d99e69f56b9ec27ace92ba56897fe6993105" + "reference": "df1e7fde177501eee2037dd159cf04f5f301a512" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/52a0d99e69f56b9ec27ace92ba56897fe6993105", - "reference": "52a0d99e69f56b9ec27ace92ba56897fe6993105", + "url": "https://api.github.com/repos/paragonie/constant_time_encoding/zipball/df1e7fde177501eee2037dd159cf04f5f301a512", + "reference": "df1e7fde177501eee2037dd159cf04f5f301a512", "shasum": "" }, "require": { - "php": "^7|^8" + "php": "^8" }, "require-dev": { - "phpunit/phpunit": "^6|^7|^8|^9", - "vimeo/psalm": "^1|^2|^3|^4" + "phpunit/phpunit": "^9", + "vimeo/psalm": "^4|^5" }, "type": "library", "autoload": { @@ -6633,7 +6635,7 @@ "issues": "https://github.com/paragonie/constant_time_encoding/issues", "source": "https://github.com/paragonie/constant_time_encoding" }, - "time": "2024-05-08T12:18:48+00:00" + "time": "2024-05-08T12:36:18+00:00" }, { "name": "paragonie/random_compat", @@ -6687,16 +6689,16 @@ }, { "name": "phpoffice/phpspreadsheet", - "version": "1.29.0", + "version": "1.29.1", "source": { "type": "git", "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", - "reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0" + "reference": "59ee38f7480904cd6487e5cbdea4d80ff2758719" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/fde2ccf55eaef7e86021ff1acce26479160a0fa0", - "reference": "fde2ccf55eaef7e86021ff1acce26479160a0fa0", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/59ee38f7480904cd6487e5cbdea4d80ff2758719", + "reference": "59ee38f7480904cd6487e5cbdea4d80ff2758719", "shasum": "" }, "require": { @@ -6731,7 +6733,7 @@ "phpcompatibility/php-compatibility": "^9.3", "phpstan/phpstan": "^1.1", "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^8.5 || ^9.0 || ^10.0", + "phpunit/phpunit": "^8.5 || ^9.0", "squizlabs/php_codesniffer": "^3.7", "tecnickcom/tcpdf": "^6.5" }, @@ -6786,9 +6788,9 @@ ], "support": { "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", - "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.0" + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.29.1" }, - "time": "2023-06-14T22:48:31+00:00" + "time": "2024-09-03T00:55:32+00:00" }, { "name": "phpoption/phpoption", @@ -6977,24 +6979,24 @@ }, { "name": "pragmarx/google2fa", - "version": "v8.0.1", + "version": "v8.0.3", "source": { "type": "git", "url": "https://github.com/antonioribeiro/google2fa.git", - "reference": "80c3d801b31fe165f8fe99ea085e0a37834e1be3" + "reference": "6f8d87ebd5afbf7790bde1ffc7579c7c705e0fad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/antonioribeiro/google2fa/zipball/80c3d801b31fe165f8fe99ea085e0a37834e1be3", - "reference": "80c3d801b31fe165f8fe99ea085e0a37834e1be3", + "url": "https://api.github.com/repos/antonioribeiro/google2fa/zipball/6f8d87ebd5afbf7790bde1ffc7579c7c705e0fad", + "reference": "6f8d87ebd5afbf7790bde1ffc7579c7c705e0fad", "shasum": "" }, "require": { - "paragonie/constant_time_encoding": "^1.0|^2.0", + "paragonie/constant_time_encoding": "^1.0|^2.0|^3.0", "php": "^7.1|^8.0" }, "require-dev": { - "phpstan/phpstan": "^0.12.18", + "phpstan/phpstan": "^1.9", "phpunit/phpunit": "^7.5.15|^8.5|^9.0" }, "type": "library", @@ -7023,9 +7025,9 @@ ], "support": { "issues": "https://github.com/antonioribeiro/google2fa/issues", - "source": "https://github.com/antonioribeiro/google2fa/tree/v8.0.1" + "source": "https://github.com/antonioribeiro/google2fa/tree/v8.0.3" }, - "time": "2022-06-13T21:57:56+00:00" + "time": "2024-09-05T11:56:40+00:00" }, { "name": "predis/predis", @@ -7450,16 +7452,16 @@ }, { "name": "psr/log", - "version": "3.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "79dff0b268932c640297f5208d6298f71855c03e" + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/79dff0b268932c640297f5208d6298f71855c03e", - "reference": "79dff0b268932c640297f5208d6298f71855c03e", + "url": "https://api.github.com/repos/php-fig/log/zipball/f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", + "reference": "f16e1d5863e37f8d8c2a01719f5b34baa2b714d3", "shasum": "" }, "require": { @@ -7494,9 +7496,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/3.0.1" + "source": "https://github.com/php-fig/log/tree/3.0.2" }, - "time": "2024-08-21T13:31:24+00:00" + "time": "2024-09-11T13:17:53+00:00" }, { "name": "psr/simple-cache", @@ -8131,16 +8133,16 @@ }, { "name": "setasign/fpdi", - "version": "v2.6.0", + "version": "v2.6.1", "source": { "type": "git", "url": "https://github.com/Setasign/FPDI.git", - "reference": "a6db878129ec6c7e141316ee71872923e7f1b7ad" + "reference": "09a816004fcee9ed3405bd164147e3fdbb79a56f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Setasign/FPDI/zipball/a6db878129ec6c7e141316ee71872923e7f1b7ad", - "reference": "a6db878129ec6c7e141316ee71872923e7f1b7ad", + "url": "https://api.github.com/repos/Setasign/FPDI/zipball/09a816004fcee9ed3405bd164147e3fdbb79a56f", + "reference": "09a816004fcee9ed3405bd164147e3fdbb79a56f", "shasum": "" }, "require": { @@ -8191,7 +8193,7 @@ ], "support": { "issues": "https://github.com/Setasign/FPDI/issues", - "source": "https://github.com/Setasign/FPDI/tree/v2.6.0" + "source": "https://github.com/Setasign/FPDI/tree/v2.6.1" }, "funding": [ { @@ -8199,7 +8201,7 @@ "type": "tidelift" } ], - "time": "2023-12-11T16:03:32+00:00" + "time": "2024-09-02T10:17:15+00:00" }, { "name": "shuvroroy/filament-spatie-laravel-backup", @@ -9218,16 +9220,16 @@ }, { "name": "spatie/laravel-medialibrary", - "version": "11.9.0", + "version": "11.9.1", "source": { "type": "git", "url": "https://github.com/spatie/laravel-medialibrary.git", - "reference": "b103470caad6e7cd8013130e2651e637da94d4ef" + "reference": "ff589ea5532a33d84faeb64bfdfd59057b4148b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-medialibrary/zipball/b103470caad6e7cd8013130e2651e637da94d4ef", - "reference": "b103470caad6e7cd8013130e2651e637da94d4ef", + "url": "https://api.github.com/repos/spatie/laravel-medialibrary/zipball/ff589ea5532a33d84faeb64bfdfd59057b4148b8", + "reference": "ff589ea5532a33d84faeb64bfdfd59057b4148b8", "shasum": "" }, "require": { @@ -9311,7 +9313,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-medialibrary/issues", - "source": "https://github.com/spatie/laravel-medialibrary/tree/11.9.0" + "source": "https://github.com/spatie/laravel-medialibrary/tree/11.9.1" }, "funding": [ { @@ -9323,7 +9325,7 @@ "type": "github" } ], - "time": "2024-08-22T09:20:42+00:00" + "time": "2024-09-02T06:32:15+00:00" }, { "name": "spatie/laravel-model-states", @@ -11031,20 +11033,20 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "0424dff1c58f028c451efff2045f5d92410bd540" + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/0424dff1c58f028c451efff2045f5d92410bd540", - "reference": "0424dff1c58f028c451efff2045f5d92410bd540", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-ctype": "*" @@ -11090,7 +11092,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" }, "funding": [ { @@ -11106,24 +11108,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a" + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/64647a7c30b2283f5d49b874d84a18fc22054b7a", - "reference": "64647a7c30b2283f5d49b874d84a18fc22054b7a", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", + "reference": "b9123926e3b7bc2f98c02ad54f6a4b02b91a8abe", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "suggest": { "ext-intl": "For best performance" @@ -11168,7 +11170,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.31.0" }, "funding": [ { @@ -11184,26 +11186,25 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c" + "reference": "c36586dcf89a12315939e00ec9b4474adcb1d773" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/a6e83bdeb3c84391d1dfe16f42e40727ce524a5c", - "reference": "a6e83bdeb3c84391d1dfe16f42e40727ce524a5c", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/c36586dcf89a12315939e00ec9b4474adcb1d773", + "reference": "c36586dcf89a12315939e00ec9b4474adcb1d773", "shasum": "" }, "require": { - "php": ">=7.1", - "symfony/polyfill-intl-normalizer": "^1.10", - "symfony/polyfill-php72": "^1.10" + "php": ">=7.2", + "symfony/polyfill-intl-normalizer": "^1.10" }, "suggest": { "ext-intl": "For best performance" @@ -11252,7 +11253,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.31.0" }, "funding": [ { @@ -11268,24 +11269,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb" + "reference": "3833d7255cc303546435cb650316bff708a1c75c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/a95281b0be0d9ab48050ebd988b967875cdb9fdb", - "reference": "a95281b0be0d9ab48050ebd988b967875cdb9fdb", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", + "reference": "3833d7255cc303546435cb650316bff708a1c75c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "suggest": { "ext-intl": "For best performance" @@ -11333,7 +11334,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.31.0" }, "funding": [ { @@ -11349,24 +11350,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c" + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fd22ab50000ef01661e2a31d850ebaa297f8e03c", - "reference": "fd22ab50000ef01661e2a31d850ebaa297f8e03c", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-mbstring": "*" @@ -11413,7 +11414,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" }, "funding": [ { @@ -11429,97 +11430,24 @@ "type": "tidelift" } ], - "time": "2024-06-19T12:30:46+00:00" - }, - { - "name": "symfony/polyfill-php72", - "version": "v1.30.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "10112722600777e02d2745716b70c5db4ca70442" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/10112722600777e02d2745716b70c5db4ca70442", - "reference": "10112722600777e02d2745716b70c5db4ca70442", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.30.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-06-19T12:30:46+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433" + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/77fa7995ac1b21ab60769b7323d600a991a90433", - "reference": "77fa7995ac1b21ab60769b7323d600a991a90433", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { @@ -11566,7 +11494,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" }, "funding": [ { @@ -11582,24 +11510,24 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php83", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php83.git", - "reference": "dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9" + "reference": "2fb86d65e2d424369ad2905e83b236a8805ba491" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9", - "reference": "dbdcdf1a4dcc2743591f1079d0c35ab1e2dcbbc9", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/2fb86d65e2d424369ad2905e83b236a8805ba491", + "reference": "2fb86d65e2d424369ad2905e83b236a8805ba491", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { @@ -11642,7 +11570,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php83/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-php83/tree/v1.31.0" }, "funding": [ { @@ -11658,24 +11586,24 @@ "type": "tidelift" } ], - "time": "2024-06-19T12:35:24+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-uuid", - "version": "v1.30.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-uuid.git", - "reference": "2ba1f33797470debcda07fe9dce20a0003df18e9" + "reference": "21533be36c24be3f4b1669c4725c7d1d2bab4ae2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/2ba1f33797470debcda07fe9dce20a0003df18e9", - "reference": "2ba1f33797470debcda07fe9dce20a0003df18e9", + "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/21533be36c24be3f4b1669c4725c7d1d2bab4ae2", + "reference": "21533be36c24be3f4b1669c4725c7d1d2bab4ae2", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-uuid": "*" @@ -11721,7 +11649,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/polyfill-uuid/tree/v1.30.0" + "source": "https://github.com/symfony/polyfill-uuid/tree/v1.31.0" }, "funding": [ { @@ -11737,7 +11665,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T15:07:36+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/process", @@ -12449,16 +12377,16 @@ }, { "name": "tecnickcom/tc-lib-barcode", - "version": "2.2.3", + "version": "2.3.1", "source": { "type": "git", "url": "https://github.com/tecnickcom/tc-lib-barcode.git", - "reference": "1ec056eb68daf8aab072d9d7908712d7144814fa" + "reference": "e1d394525ce0e0db5a7b01d01a4d7c238a7b8bb4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tecnickcom/tc-lib-barcode/zipball/1ec056eb68daf8aab072d9d7908712d7144814fa", - "reference": "1ec056eb68daf8aab072d9d7908712d7144814fa", + "url": "https://api.github.com/repos/tecnickcom/tc-lib-barcode/zipball/e1d394525ce0e0db5a7b01d01a4d7c238a7b8bb4", + "reference": "e1d394525ce0e0db5a7b01d01a4d7c238a7b8bb4", "shasum": "" }, "require": { @@ -12537,7 +12465,7 @@ ], "support": { "issues": "https://github.com/tecnickcom/tc-lib-barcode/issues", - "source": "https://github.com/tecnickcom/tc-lib-barcode/tree/2.2.3" + "source": "https://github.com/tecnickcom/tc-lib-barcode/tree/2.3.1" }, "funding": [ { @@ -12545,20 +12473,20 @@ "type": "custom" } ], - "time": "2024-08-18T14:47:12+00:00" + "time": "2024-09-06T12:59:17+00:00" }, { "name": "tecnickcom/tc-lib-color", - "version": "2.2.2", + "version": "2.2.3", "source": { "type": "git", "url": "https://github.com/tecnickcom/tc-lib-color.git", - "reference": "14fc157ae64767cc6761e9126f7ec7e5b27bf1cb" + "reference": "ae2fd400d11b3665e6fe90158d2f0aa2bd7d85e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tecnickcom/tc-lib-color/zipball/14fc157ae64767cc6761e9126f7ec7e5b27bf1cb", - "reference": "14fc157ae64767cc6761e9126f7ec7e5b27bf1cb", + "url": "https://api.github.com/repos/tecnickcom/tc-lib-color/zipball/ae2fd400d11b3665e6fe90158d2f0aa2bd7d85e3", + "reference": "ae2fd400d11b3665e6fe90158d2f0aa2bd7d85e3", "shasum": "" }, "require": { @@ -12606,7 +12534,7 @@ ], "support": { "issues": "https://github.com/tecnickcom/tc-lib-color/issues", - "source": "https://github.com/tecnickcom/tc-lib-color/tree/2.2.2" + "source": "https://github.com/tecnickcom/tc-lib-color/tree/2.2.3" }, "funding": [ { @@ -12614,20 +12542,20 @@ "type": "custom" } ], - "time": "2024-08-18T14:45:34+00:00" + "time": "2024-09-06T12:57:44+00:00" }, { "name": "tecnickcom/tc-lib-file", - "version": "2.0.13", + "version": "2.0.14", "source": { "type": "git", "url": "https://github.com/tecnickcom/tc-lib-file.git", - "reference": "9bb2c364062d87918e2b0da31c12372660a13bca" + "reference": "1dc5eac6b7b4b66f8b3e0a2465e712ae5b7ea0d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tecnickcom/tc-lib-file/zipball/9bb2c364062d87918e2b0da31c12372660a13bca", - "reference": "9bb2c364062d87918e2b0da31c12372660a13bca", + "url": "https://api.github.com/repos/tecnickcom/tc-lib-file/zipball/1dc5eac6b7b4b66f8b3e0a2465e712ae5b7ea0d1", + "reference": "1dc5eac6b7b4b66f8b3e0a2465e712ae5b7ea0d1", "shasum": "" }, "require": { @@ -12672,7 +12600,7 @@ ], "support": { "issues": "https://github.com/tecnickcom/tc-lib-file/issues", - "source": "https://github.com/tecnickcom/tc-lib-file/tree/2.0.13" + "source": "https://github.com/tecnickcom/tc-lib-file/tree/2.0.14" }, "funding": [ { @@ -12680,7 +12608,7 @@ "type": "custom" } ], - "time": "2024-08-18T14:45:46+00:00" + "time": "2024-09-06T12:57:57+00:00" }, { "name": "tecnickcom/tc-lib-pdf", @@ -12757,16 +12685,16 @@ }, { "name": "tecnickcom/tc-lib-pdf-encrypt", - "version": "2.1.5", + "version": "2.1.6", "source": { "type": "git", "url": "https://github.com/tecnickcom/tc-lib-pdf-encrypt.git", - "reference": "59ec05413500515a119b0741210b6b38402dfde3" + "reference": "16d851d673438b706bf9875ccc4590cfc474185c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tecnickcom/tc-lib-pdf-encrypt/zipball/59ec05413500515a119b0741210b6b38402dfde3", - "reference": "59ec05413500515a119b0741210b6b38402dfde3", + "url": "https://api.github.com/repos/tecnickcom/tc-lib-pdf-encrypt/zipball/16d851d673438b706bf9875ccc4590cfc474185c", + "reference": "16d851d673438b706bf9875ccc4590cfc474185c", "shasum": "" }, "require": { @@ -12814,7 +12742,7 @@ ], "support": { "issues": "https://github.com/tecnickcom/tc-lib-pdf-encrypt/issues", - "source": "https://github.com/tecnickcom/tc-lib-pdf-encrypt/tree/2.1.5" + "source": "https://github.com/tecnickcom/tc-lib-pdf-encrypt/tree/2.1.6" }, "funding": [ { @@ -12822,20 +12750,20 @@ "type": "custom" } ], - "time": "2024-08-30T06:58:13+00:00" + "time": "2024-09-06T12:58:10+00:00" }, { "name": "tecnickcom/tc-lib-pdf-font", - "version": "2.5.0", + "version": "2.5.1", "source": { "type": "git", "url": "https://github.com/tecnickcom/tc-lib-pdf-font.git", - "reference": "6537d65aa7fbc63ab9aae5eb6c69900c6d4b6905" + "reference": "5d4f0a872c7505bb2937bfdbeb68ef44ef2a5600" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tecnickcom/tc-lib-pdf-font/zipball/6537d65aa7fbc63ab9aae5eb6c69900c6d4b6905", - "reference": "6537d65aa7fbc63ab9aae5eb6c69900c6d4b6905", + "url": "https://api.github.com/repos/tecnickcom/tc-lib-pdf-font/zipball/5d4f0a872c7505bb2937bfdbeb68ef44ef2a5600", + "reference": "5d4f0a872c7505bb2937bfdbeb68ef44ef2a5600", "shasum": "" }, "require": { @@ -12883,7 +12811,7 @@ ], "support": { "issues": "https://github.com/tecnickcom/tc-lib-pdf-font/issues", - "source": "https://github.com/tecnickcom/tc-lib-pdf-font/tree/2.5.0" + "source": "https://github.com/tecnickcom/tc-lib-pdf-font/tree/2.5.1" }, "funding": [ { @@ -12891,20 +12819,20 @@ "type": "custom" } ], - "time": "2024-08-24T13:12:13+00:00" + "time": "2024-09-06T13:01:32+00:00" }, { "name": "tecnickcom/tc-lib-pdf-graph", - "version": "2.2.0", + "version": "2.2.2", "source": { "type": "git", "url": "https://github.com/tecnickcom/tc-lib-pdf-graph.git", - "reference": "dc5d6703cc5e9d0756b0ab2b93e9bd54b7e95d4b" + "reference": "018917cb71ea636bfec79914da0fbaa6a8b94f8f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tecnickcom/tc-lib-pdf-graph/zipball/dc5d6703cc5e9d0756b0ab2b93e9bd54b7e95d4b", - "reference": "dc5d6703cc5e9d0756b0ab2b93e9bd54b7e95d4b", + "url": "https://api.github.com/repos/tecnickcom/tc-lib-pdf-graph/zipball/018917cb71ea636bfec79914da0fbaa6a8b94f8f", + "reference": "018917cb71ea636bfec79914da0fbaa6a8b94f8f", "shasum": "" }, "require": { @@ -12947,7 +12875,7 @@ ], "support": { "issues": "https://github.com/tecnickcom/tc-lib-pdf-graph/issues", - "source": "https://github.com/tecnickcom/tc-lib-pdf-graph/tree/2.2.0" + "source": "https://github.com/tecnickcom/tc-lib-pdf-graph/tree/2.2.2" }, "funding": [ { @@ -12955,20 +12883,20 @@ "type": "custom" } ], - "time": "2024-08-29T08:08:37+00:00" + "time": "2024-09-06T13:00:27+00:00" }, { "name": "tecnickcom/tc-lib-pdf-image", - "version": "2.1.1", + "version": "2.1.2", "source": { "type": "git", "url": "https://github.com/tecnickcom/tc-lib-pdf-image.git", - "reference": "8ccba63917b92bea730f4f3039b771bae4393013" + "reference": "19f7b56178bf62626fe4a6cef2ecb88f1825964c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tecnickcom/tc-lib-pdf-image/zipball/8ccba63917b92bea730f4f3039b771bae4393013", - "reference": "8ccba63917b92bea730f4f3039b771bae4393013", + "url": "https://api.github.com/repos/tecnickcom/tc-lib-pdf-image/zipball/19f7b56178bf62626fe4a6cef2ecb88f1825964c", + "reference": "19f7b56178bf62626fe4a6cef2ecb88f1825964c", "shasum": "" }, "require": { @@ -13014,7 +12942,7 @@ ], "support": { "issues": "https://github.com/tecnickcom/tc-lib-pdf-image/issues", - "source": "https://github.com/tecnickcom/tc-lib-pdf-image/tree/2.1.1" + "source": "https://github.com/tecnickcom/tc-lib-pdf-image/tree/2.1.2" }, "funding": [ { @@ -13022,20 +12950,20 @@ "type": "custom" } ], - "time": "2024-08-18T14:48:40+00:00" + "time": "2024-09-06T13:00:41+00:00" }, { "name": "tecnickcom/tc-lib-pdf-page", - "version": "4.2.0", + "version": "4.2.1", "source": { "type": "git", "url": "https://github.com/tecnickcom/tc-lib-pdf-page.git", - "reference": "df9f7f0b17eeb7eba526dbaa4ce4a32f49317c97" + "reference": "f3ceb30d437cfe932b2d1d293683cffe069b1c89" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tecnickcom/tc-lib-pdf-page/zipball/df9f7f0b17eeb7eba526dbaa4ce4a32f49317c97", - "reference": "df9f7f0b17eeb7eba526dbaa4ce4a32f49317c97", + "url": "https://api.github.com/repos/tecnickcom/tc-lib-pdf-page/zipball/f3ceb30d437cfe932b2d1d293683cffe069b1c89", + "reference": "f3ceb30d437cfe932b2d1d293683cffe069b1c89", "shasum": "" }, "require": { @@ -13078,7 +13006,7 @@ ], "support": { "issues": "https://github.com/tecnickcom/tc-lib-pdf-page/issues", - "source": "https://github.com/tecnickcom/tc-lib-pdf-page/tree/4.2.0" + "source": "https://github.com/tecnickcom/tc-lib-pdf-page/tree/4.2.1" }, "funding": [ { @@ -13086,20 +13014,20 @@ "type": "custom" } ], - "time": "2024-08-27T08:29:02+00:00" + "time": "2024-09-06T13:00:12+00:00" }, { "name": "tecnickcom/tc-lib-unicode", - "version": "2.0.13", + "version": "2.0.14", "source": { "type": "git", "url": "https://github.com/tecnickcom/tc-lib-unicode.git", - "reference": "287d616ce2b97206514b61ad829358b109199ffb" + "reference": "c54612cfce7041dde23494c784f61569e8c597eb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tecnickcom/tc-lib-unicode/zipball/287d616ce2b97206514b61ad829358b109199ffb", - "reference": "287d616ce2b97206514b61ad829358b109199ffb", + "url": "https://api.github.com/repos/tecnickcom/tc-lib-unicode/zipball/c54612cfce7041dde23494c784f61569e8c597eb", + "reference": "c54612cfce7041dde23494c784f61569e8c597eb", "shasum": "" }, "require": { @@ -13142,7 +13070,7 @@ ], "support": { "issues": "https://github.com/tecnickcom/tc-lib-unicode/issues", - "source": "https://github.com/tecnickcom/tc-lib-unicode/tree/2.0.13" + "source": "https://github.com/tecnickcom/tc-lib-unicode/tree/2.0.14" }, "funding": [ { @@ -13150,20 +13078,20 @@ "type": "custom" } ], - "time": "2024-08-18T14:47:53+00:00" + "time": "2024-09-06T12:59:52+00:00" }, { "name": "tecnickcom/tc-lib-unicode-data", - "version": "2.0.13", + "version": "2.0.14", "source": { "type": "git", "url": "https://github.com/tecnickcom/tc-lib-unicode-data.git", - "reference": "e82487c457e7ff9cb7ed29a53130099bc293c412" + "reference": "c25c8149c902ab0beb7b0b8851f982bc9a518f95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tecnickcom/tc-lib-unicode-data/zipball/e82487c457e7ff9cb7ed29a53130099bc293c412", - "reference": "e82487c457e7ff9cb7ed29a53130099bc293c412", + "url": "https://api.github.com/repos/tecnickcom/tc-lib-unicode-data/zipball/c25c8149c902ab0beb7b0b8851f982bc9a518f95", + "reference": "c25c8149c902ab0beb7b0b8851f982bc9a518f95", "shasum": "" }, "require": { @@ -13203,7 +13131,7 @@ ], "support": { "issues": "https://github.com/tecnickcom/tc-lib-unicode-data/issues", - "source": "https://github.com/tecnickcom/tc-lib-unicode-data/tree/2.0.13" + "source": "https://github.com/tecnickcom/tc-lib-unicode-data/tree/2.0.14" }, "funding": [ { @@ -13211,7 +13139,7 @@ "type": "custom" } ], - "time": "2024-08-18T14:46:31+00:00" + "time": "2024-09-06T12:58:38+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -13745,16 +13673,16 @@ }, { "name": "laravel/pint", - "version": "v1.17.2", + "version": "v1.17.3", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "e8a88130a25e3f9d4d5785e6a1afca98268ab110" + "reference": "9d77be916e145864f10788bb94531d03e1f7b482" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/e8a88130a25e3f9d4d5785e6a1afca98268ab110", - "reference": "e8a88130a25e3f9d4d5785e6a1afca98268ab110", + "url": "https://api.github.com/repos/laravel/pint/zipball/9d77be916e145864f10788bb94531d03e1f7b482", + "reference": "9d77be916e145864f10788bb94531d03e1f7b482", "shasum": "" }, "require": { @@ -13765,13 +13693,13 @@ "php": "^8.1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.61.1", - "illuminate/view": "^10.48.18", + "friendsofphp/php-cs-fixer": "^3.64.0", + "illuminate/view": "^10.48.20", "larastan/larastan": "^2.9.8", "laravel-zero/framework": "^10.4.0", "mockery/mockery": "^1.6.12", "nunomaduro/termwind": "^1.15.1", - "pestphp/pest": "^2.35.0" + "pestphp/pest": "^2.35.1" }, "bin": [ "builds/pint" @@ -13807,20 +13735,20 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2024-08-06T15:11:54+00:00" + "time": "2024-09-03T15:00:28+00:00" }, { "name": "laravel/sail", - "version": "v1.31.1", + "version": "v1.32.0", "source": { "type": "git", "url": "https://github.com/laravel/sail.git", - "reference": "3d06dd18cee8059baa7b388af00ba47f6d96bd85" + "reference": "4a7e41d280861ca7e35710cea011a07669b4003b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sail/zipball/3d06dd18cee8059baa7b388af00ba47f6d96bd85", - "reference": "3d06dd18cee8059baa7b388af00ba47f6d96bd85", + "url": "https://api.github.com/repos/laravel/sail/zipball/4a7e41d280861ca7e35710cea011a07669b4003b", + "reference": "4a7e41d280861ca7e35710cea011a07669b4003b", "shasum": "" }, "require": { @@ -13870,7 +13798,7 @@ "issues": "https://github.com/laravel/sail/issues", "source": "https://github.com/laravel/sail" }, - "time": "2024-08-02T07:45:47+00:00" + "time": "2024-09-11T20:14:29+00:00" }, { "name": "mockery/mockery", @@ -14493,16 +14421,16 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.30", + "version": "10.5.33", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "b15524febac0153876b4ba9aab3326c2ee94c897" + "reference": "4def7a9cda75af9c2bc179ed53a8e41313e7f7cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b15524febac0153876b4ba9aab3326c2ee94c897", - "reference": "b15524febac0153876b4ba9aab3326c2ee94c897", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4def7a9cda75af9c2bc179ed53a8e41313e7f7cf", + "reference": "4def7a9cda75af9c2bc179ed53a8e41313e7f7cf", "shasum": "" }, "require": { @@ -14516,7 +14444,7 @@ "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", "php": ">=8.1", - "phpunit/php-code-coverage": "^10.1.15", + "phpunit/php-code-coverage": "^10.1.16", "phpunit/php-file-iterator": "^4.1.0", "phpunit/php-invoker": "^4.0.0", "phpunit/php-text-template": "^3.0.1", @@ -14574,7 +14502,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.30" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.33" }, "funding": [ { @@ -14590,7 +14518,7 @@ "type": "tidelift" } ], - "time": "2024-08-13T06:09:37+00:00" + "time": "2024-09-09T06:06:56+00:00" }, { "name": "sebastian/cli-parser", diff --git a/resources/views/vendor/filament-auditing/tables/columns/key-value.blade.php b/resources/views/vendor/filament-auditing/tables/columns/key-value.blade.php index c0b15ec6..0389b3e2 100644 --- a/resources/views/vendor/filament-auditing/tables/columns/key-value.blade.php +++ b/resources/views/vendor/filament-auditing/tables/columns/key-value.blade.php @@ -1,16 +1,26 @@ +@php + $data = isset($state) ? $state : $getState() +@endphp +
- @foreach($getState() ?? [] as $key => $value) - - {{ $key }} - - @unless(is_array($value)) - {{ $value }} - @else - - @foreach ($value as $nestedValue) - {{$nestedValue['id']}} - @endforeach - - @endunless - @endforeach -
+
    + @foreach($data ?? [] as $key => $value) +
  • + + {{ Str::title($key) }}: + + + @unless(is_array($value)) + {{ $value }} + @else + + @foreach ($value as $nestedValue) + {{$nestedValue['id']}} + @endforeach + + @endunless + +
  • + @endforeach +
+
\ No newline at end of file From 5ba0554779866ed24754b533fc04103d8ad934fe Mon Sep 17 00:00:00 2001 From: Venkata Chandra Sekhar Nainala Date: Thu, 12 Sep 2024 15:37:03 +0200 Subject: [PATCH 20/20] fix: broken classification links fix --- .../views/livewire/molecule-details.blade.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/resources/views/livewire/molecule-details.blade.php b/resources/views/livewire/molecule-details.blade.php index d0ae40ba..9d24297f 100644 --- a/resources/views/livewire/molecule-details.blade.php +++ b/resources/views/livewire/molecule-details.blade.php @@ -385,31 +385,31 @@ classification