ifnex/04_Laravel/app/Filament/Widgets/DashboardInfoWidget.php
Kazem Alghasi 91984dbde3 feat(ui): redesign admin dashboard with layered grid and custom branding
Implement a comprehensive overhaul of the Filament admin dashboard,
introducing a structured 12-column responsive grid layout and enhanced
visual identity.

Key changes include:
- Redesigned Dashboard layout with a 4-layer progressive disclosure
  architecture (KPIs, Exchange Rates, Data Tables, and Trends).
- Introduced custom IFNEX design tokens via CSS, including branded
  stat cards, status badges, and improved sidebar typography.
- Enhanced FinanceOverviewWidget with real-time trend analysis and
  sparkline-ready data structures.
- Refactored RecentShipments and RecentTransactions widgets to use
  custom Blade templates for a more polished, consistent UI.
- Integrated brand assets including the company logo and custom
  authentication pages.
- Added global number formatting helpers and integrated them into
  financial widgets.
- Updated AdminPanelProvider to support custom login pages and
  brand-specific header/footer hooks.
2026-10-03 11:08:50 +03:30

34 lines
913 B
PHP

<?php
namespace App\Filament\Widgets;
use Filament\Widgets\Widget;
use Morilog\Jalali\Jalalian;
/**
* کارت کوچک تاریخ/ساعت/خوش‌آمد — گوشه داشبورد.
* جدول «آخرین سفارشات» به RecentShipmentsWidget جدا منتقل شده است.
*/
class DashboardInfoWidget extends Widget
{
protected static ?int $sort = 1;
protected static bool $isLazy = false;
protected int | string | array $columnSpan = 2;
protected static string $view = 'filament.widgets.dashboard-info';
protected function getViewData(): array
{
$now = now();
return [
'gregorianDate' => $now->format('l, j F Y'),
'jalaliDate' => Jalalian::fromCarbon($now)->format('l، d F Y'),
'time' => $now->format('H:i'),
'userName' => auth()->user()?->name ?? 'کاربر',
];
}
}