diff --git a/database/seeders/RolePermissionSeeder.php b/database/seeders/RolePermissionSeeder.php index 5017c0f..49bb68c 100644 --- a/database/seeders/RolePermissionSeeder.php +++ b/database/seeders/RolePermissionSeeder.php @@ -70,6 +70,7 @@ public function run(): void 'admin-toko' => array_values(array_filter($allPermissions, function ($p) { return in_array($p, [ 'dashboard.view', + 'dashboard.attendance', 'dashboard.revenue', 'dashboard.expense', 'dashboard.orders_channel', @@ -88,6 +89,7 @@ public function run(): void 'analysis.profit_orders', 'analysis.profit_hpp', 'analysis.profit_gross', + 'analysis.profit_margin', 'analysis.top_customers', 'analysis.top_products', 'analysis.top_suppliers', @@ -379,6 +381,7 @@ public function run(): void 'analysis.profit_margin', 'analysis.top_customers', 'analysis.top_products', + 'analysis.top_suppliers', 'analysis.marketing_sales', 'employees.view', diff --git a/resources/js/pages/admin/analysis/index.tsx b/resources/js/pages/admin/analysis/index.tsx index e2299ba..a16c570 100644 --- a/resources/js/pages/admin/analysis/index.tsx +++ b/resources/js/pages/admin/analysis/index.tsx @@ -515,7 +515,7 @@ export default function Analysis({ } if (hasAnyRole(['admin_toko', 'direktur'])) { - return { statCards: 1, revenue: 4, revenueByChannel: 5, orderPie: 6, expense: 7, totalOrder: 8, revenueTrend: 9, marketingSales: 10, topProducts: 11, topCustomers: 12, busyHours: 13 }; + return { statCards: 1, revenue: 4, revenueByChannel: 5, orderPie: 6, expense: 7, totalOrder: 8, revenueTrend: 9, marketingSales: 10, topSuppliers: 11, topProducts: 12, topCustomers: 13, busyHours: 14 }; } if (hasRole('marketing')) {