feat: add new permissions for attendance and profit margin, update return values in analysis component
This commit is contained in:
parent
1fe95d66fc
commit
a468f6c4ff
@ -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',
|
||||
|
||||
@ -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')) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user