diff --git a/app/Http/Controllers/Web/Auth/LoginController.php b/app/Http/Controllers/Web/Auth/LoginController.php index 89bce282..5c7d0ddd 100644 --- a/app/Http/Controllers/Web/Auth/LoginController.php +++ b/app/Http/Controllers/Web/Auth/LoginController.php @@ -129,6 +129,8 @@ class LoginController extends Controller return redirect()->to('userarea/production_dashboard.php'); } elseif ($user->hasRole('TechOffice')) { return redirect()->to('userarea/production_dashboard.php'); + } elseif ($user->hasRole('Sales')) { + return redirect()->to('userarea/production_dashboard.php'); } // Se il ruolo non รจ specificato, reindirizza alla home predefinita return redirect()->intended('/'); diff --git a/public/userarea/production_dashboard.php b/public/userarea/production_dashboard.php index ec3dde58..d1ed1cfe 100644 --- a/public/userarea/production_dashboard.php +++ b/public/userarea/production_dashboard.php @@ -75,6 +75,50 @@ $dashboardSections = [ ], ], ], + [ + 'id' => 'secVendite', + 'title' => 'Vendite', + 'subtitle' => 'Ordini clienti, fatturato, clienti e consegne (dati Mago)', + 'icon' => '๐Ÿ’ถ', + 'open' => false, + 'buttons' => [ + [ + 'label' => 'Sommario', + 'icon' => '๐Ÿšฆ', + 'class' => 'btn-sales-summary', + 'url' => 'sales_summary.php', + 'permission' => 'sales.stats.view', + ], + [ + 'label' => 'Andamento ordini', + 'icon' => '๐Ÿงพ', + 'class' => 'btn-sales', + 'url' => 'sales_orders_stats.php', + 'permission' => 'sales.stats.view', + ], + [ + 'label' => 'Confronto anni', + 'icon' => '๐Ÿ“Š', + 'class' => 'btn-sales', + 'url' => 'sales_orders_years.php', + 'permission' => 'sales.stats.view', + ], + [ + 'label' => 'Scheda cliente', + 'icon' => '๐Ÿชช', + 'class' => 'btn-sales', + 'url' => 'sales_customer.php', + 'permission' => 'sales.stats.view', + ], + [ + 'label' => 'Consegne', + 'icon' => '๐Ÿšš', + 'class' => 'btn-sales-deliveries', + 'url' => 'sales_orders_deliveries.php', + 'permission' => 'sales.deliveries.view', + ], + ], + ], [ 'id' => 'secAnagrafiche', 'title' => 'Anagrafiche', @@ -490,6 +534,19 @@ $dashboardSections = [ background: linear-gradient(135deg, #e5e7eb, #f3f4f6); } + .btn-sales-summary { + background: linear-gradient(135deg, #198754, #3bb77e); + color: #fff; + } + + .btn-sales { + background: linear-gradient(135deg, #b9ebc7, #dcf7e4); + } + + .btn-sales-deliveries { + background: linear-gradient(135deg, #fde68a, #fef3c7); + } + /* Tablet/mobile */ @media (max-width: 992px) { .dashboard-grid {