Skip to content

Commit

Permalink
Merge pull request #12 from edwink75/bugfix-cached-tabs
Browse files Browse the repository at this point in the history
Compatibility with FIlament 3.0.47 and later
  • Loading branch information
husam-tariq authored Oct 7, 2023
2 parents 069729f + 51e5e62 commit 49ab6e9
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"require": {
"php": "^8.0",
"awcodes/filament-table-repeater": "^2.0.4",
"filament/filament": "^3.0.5",
"filament/filament": "^3.0.47",
"spatie/laravel-package-tools": "^1.13.5",
"illuminate/contracts": "^8.0|^9.0|^10.0"
},
Expand Down
5 changes: 5 additions & 0 deletions config/filament-database-schedule.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
*/
"navigation_icon" => 'heroicon-o-rectangle-stack',

/**
* When opening history, is output collapsed
*/
'history_collapsed' => env('FILAMENT_SCHEDULE_HISTORY_COLLAPSED', false),

/**
* How many jobs do you want to have on each page ?
*/
Expand Down
6 changes: 6 additions & 0 deletions resources/views/layouts/schedule-history-layout.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<div>
<h1 class="fi-header-heading text-2xl font-bold tracking-tight text-gray-950 dark:text-white sm:text-3xl">
{{ __("filament-database-schedule::schedule.resource.history") }}
</h1>
{{ $this->table }}
</div>
1 change: 0 additions & 1 deletion src/Filament/Columns/ScheduleArguments.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public function getTags(): array
if (count($tags) === 1 && blank($tags[0])) {
$tags = [];
}
dd($tags);
return $tags;
}
}
12 changes: 4 additions & 8 deletions src/Filament/Resources/ScheduleResource/Pages/ViewSchedule.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Filament\Forms;
use Filament\Resources\Pages\Page;
use Filament\Resources\Pages\Concerns\HasRelationManagers;
use Filament\Resources\Concerns\HasTabs;
use Filament\Resources\Pages\Concerns\InteractsWithRecord;
use Livewire\Attributes\Url;

Expand All @@ -23,16 +24,11 @@ class ViewSchedule extends Page implements HasTable
protected static string $view = 'filament-panels::resources.pages.list-records';
use InteractsWithRecord;
use HasRelationManagers;
use HasTabs;

#[Url]
public ?string $activeTab = null;
/**
* @return array<string | int, Tab>
*/
public function getTabs(): array
{
return [];
}

use Forms\Concerns\InteractsWithForms;
use Tables\Concerns\InteractsWithTable {
makeTable as makeBaseTable;
Expand Down Expand Up @@ -85,7 +81,7 @@ protected function getTableColumns(): array
Tables\Columns\TextColumn::make('output')->extraAttributes(["class"=>"!max-w-max"],true),


])->collapsible(),
])->collapsible()->collapsed(config("filament-database-schedule.history_collapsed")),

];
}
Expand Down

0 comments on commit 49ab6e9

Please sign in to comment.