2024-04-10 17:10:25 -04:00
|
|
|
<?php
|
|
|
|
|
|
2024-12-07 15:51:27 +01:00
|
|
|
namespace App\Filament\Admin\Pages;
|
2024-04-10 17:10:25 -04:00
|
|
|
|
2026-01-27 11:36:07 +01:00
|
|
|
use App\Enums\TablerIcon;
|
2024-06-08 00:38:46 +02:00
|
|
|
use App\Services\Helpers\SoftwareVersionService;
|
2026-01-27 11:36:07 +01:00
|
|
|
use BackedEnum;
|
2025-04-04 09:30:00 +02:00
|
|
|
use Filament\Pages\Dashboard as BaseDashboard;
|
2024-04-10 17:10:25 -04:00
|
|
|
|
2025-04-04 09:30:00 +02:00
|
|
|
class Dashboard extends BaseDashboard
|
2024-04-10 17:10:25 -04:00
|
|
|
{
|
2026-01-27 11:36:07 +01:00
|
|
|
protected static string|BackedEnum|null $navigationIcon = TablerIcon::LayoutDashboard;
|
2024-04-10 17:10:25 -04:00
|
|
|
|
2025-04-04 09:30:00 +02:00
|
|
|
private SoftwareVersionService $softwareVersionService;
|
2024-04-11 00:45:20 -04:00
|
|
|
|
2025-04-04 09:30:00 +02:00
|
|
|
public function mount(SoftwareVersionService $softwareVersionService): void
|
2024-04-25 23:29:19 -04:00
|
|
|
{
|
2025-04-04 09:30:00 +02:00
|
|
|
$this->softwareVersionService = $softwareVersionService;
|
2024-04-25 23:29:19 -04:00
|
|
|
}
|
2024-04-11 00:51:36 -04:00
|
|
|
|
2025-09-08 13:12:33 -04:00
|
|
|
public function getColumns(): int|array
|
2025-02-08 23:16:54 -05:00
|
|
|
{
|
2025-04-04 09:30:00 +02:00
|
|
|
return 1;
|
2025-02-08 23:16:54 -05:00
|
|
|
}
|
2024-04-11 00:51:36 -04:00
|
|
|
|
2025-04-04 09:30:00 +02:00
|
|
|
public function getHeading(): string
|
2024-04-11 00:45:20 -04:00
|
|
|
{
|
2025-04-04 09:30:00 +02:00
|
|
|
return trans('admin/dashboard.heading');
|
2024-10-19 17:22:03 -04:00
|
|
|
}
|
2024-06-08 00:38:46 +02:00
|
|
|
|
2025-04-04 09:30:00 +02:00
|
|
|
public function getSubheading(): string
|
2024-10-19 17:22:03 -04:00
|
|
|
{
|
2025-04-04 09:30:00 +02:00
|
|
|
return trans('admin/dashboard.version', ['version' => $this->softwareVersionService->currentPanelVersion()]);
|
2024-04-11 00:45:20 -04:00
|
|
|
}
|
2024-04-10 17:10:25 -04:00
|
|
|
}
|