feat: implement permission system via usePermission hook and integrate it into dashboard, project, and financial modules
Some checks failed
Tests / PHP 8.3 (push) Has been cancelled
Tests / PHP 8.4 (push) Has been cancelled
Tests / PHP 8.5 (push) Has been cancelled

This commit is contained in:
Ajjj
2026-08-05 05:26:23 +08:00
parent 089e421716
commit fa12179ca5
18 changed files with 99 additions and 51 deletions

View File

@@ -89,13 +89,10 @@ class PurchaseOrderController extends Controller
'project_manager',
'Super Admin',
'admin',
'Main Contractor Admin',
]);
})
->orWhere('user_type', 'admin')
->orWhereHas('permissions', function ($permissionQuery) {
$permissionQuery->where('name', 'approve_po');
});
;
})
->where('status', 'active')
->pluck('id')
@@ -342,13 +339,10 @@ class PurchaseOrderController extends Controller
'project_manager',
'Super Admin',
'admin',
'Main Contractor Admin',
]);
})
->orWhere('user_type', 'admin')
->orWhereHas('permissions', function ($permissionQuery) {
$permissionQuery->where('name', 'approve_po');
});
;
})
->where('status', 'active')
->pluck('id')