ifnex/04_Laravel/resources/views/filament/widgets/dashboard-info.blade.php
Kazem Alghasi c54530d8da refactor(admin): optimize dashboard layout and enhance sidebar UX
Refactor the Filament admin dashboard by decoupling the recent shipments
logic into a dedicated widget and improving the sidebar navigation
experience. Additionally, implement several improvements to the
WordPress theme for better client-side usability.

Laravel/Filament:
- Extract `RecentShipmentsWidget` from `DashboardInfoWidget` to improve
  modularization and dashboard performance.
- Update widget sorting and layout to accommodate the new structure.
- Inject custom CSS and Alpine.js logic into the admin head to provide
  sidebar group toggling and a "collapse all" utility.
- Improve sidebar group label visibility and hover states.

WordPress:
- Implement `ifnex_login_url()` to support Polylang-aware, language-specific
  login pages.
- Hide the WordPress admin bar for non-administrator users to provide a
  cleaner client interface.
- Add conditional rendering for the registration link in the login
  template based on WordPress user registration settings.
2026-10-03 07:01:54 +03:30

30 lines
1.5 KiB
PHP

<x-filament-widgets::widget>
<div class="bg-gradient-to-br from-amber-50 to-orange-50 rounded-xl p-6 border border-amber-200 dark:from-gray-800 dark:to-gray-900 dark:border-gray-700">
<div class="flex items-center gap-3 mb-4">
<div class="w-12 h-12 bg-amber-500 rounded-xl flex items-center justify-center text-white">
<x-heroicon-o-calendar-days class="w-6 h-6" />
</div>
<div>
<div class="text-xs text-gray-500 dark:text-gray-400">امروز</div>
<div class="text-sm font-bold text-gray-800 dark:text-white">{{ $time }}</div>
</div>
</div>
<div class="space-y-2">
<div class="flex items-center gap-2">
<span class="text-xs text-gray-500 dark:text-gray-400 w-16">📅 شمسی:</span>
<span class="font-bold text-amber-700 dark:text-amber-400">{{ $jalaliDate }}</span>
</div>
<div class="flex items-center gap-2">
<span class="text-xs text-gray-500 dark:text-gray-400 w-16">🌍 میلادی:</span>
<span class="text-sm text-gray-700 dark:text-gray-300 capitalize">{{ $gregorianDate }}</span>
</div>
</div>
<div class="mt-4 pt-4 border-t border-amber-200 dark:border-gray-700">
<div class="text-xs text-gray-500 dark:text-gray-400">خوش آمدید</div>
<div class="font-bold text-gray-800 dark:text-white">{{ $userName }}</div>
</div>
</div>
</x-filament-widgets::widget>