fix: add null check for media model in CustomPathGenerator and remove duplicate transaction permissions in RolePermissionSeeder

This commit is contained in:
Yoga Pangestu 2026-08-04 10:43:03 +07:00
parent a5185eab56
commit 7f91ce22db
2 changed files with 1 additions and 2 deletions

View File

@ -11,7 +11,7 @@ public function getPath(Media $media): string
{
$model = $media->model;
if (method_exists($model, 'getMediaPath')) {
if ($model && method_exists($model, 'getMediaPath')) {
return $model->getMediaPath($media).'/';
}

View File

@ -31,7 +31,6 @@ public function run(): void
'cutting' => ['view', 'create', 'update', 'delete'],
'restock' => ['view', 'create', 'update', 'delete'],
'transaction' => ['view', 'create', 'update', 'delete'],
'transaction' => ['view', 'create', 'update', 'delete'],
'dashboard' => ['attendance', 'revenue', 'expense', 'orders_channel', 'orders_payment', 'orders_marketing', 'orders_status'],
'analysis' => ['attendance', 'cash', 'raw_materials', 'product_stock', 'revenue', 'expense', 'profit_gross', 'profit_hpp', 'profit_orders', 'marketing_sales', 'top_suppliers', 'top_products', 'top_customers', 'busy_hours'],
];