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.
Refactor the Filament dashboard by replacing the legacy FinanceOverviewWidget
with a new set of specialized widgets:
- DashboardInfoWidget for general information
- ExchangeRateWidget for real-time rate monitoring
- WalletStats for financial overview
Additionally, refactor the ExchangeRateService to improve encapsulation
and clean up the ExchangeRateHistory model by moving business logic
(change calculation and recording) from the model to the service layer.
Changes include:
- Removing deprecated helper methods from ExchangeRateHistory model
- Implementing direct queries in ExchangeRateService to replace model scopes
- Adding support for rate chart data retrieval
- Reordering and updating widget sorting in AdminPanelProvider