feat: implement comprehensive dashboard controller and modular administrative and project management interfaces
This commit is contained in:
@@ -144,7 +144,15 @@ class MaterialController extends Controller
|
||||
->with(['warehouseStocks', 'projectInventories'])
|
||||
->get();
|
||||
|
||||
$projectManagers = User::role('Project Manager')->select('id', 'name')->get();
|
||||
$projectManagers = User::whereIn('user_type', ['admin', 'employee', 'contractor'])
|
||||
->where(function ($q) {
|
||||
$q->whereIn('user_type', ['admin'])
|
||||
->orWhereHas('roles', function ($rq) {
|
||||
$rq->whereIn('name', ['Project Manager', 'Main Contractor Admin', 'Super Admin', 'admin', 'Construction Supervisor', 'Site Technical', 'Contractor']);
|
||||
});
|
||||
})
|
||||
->select('id', 'name', 'email')
|
||||
->get();
|
||||
|
||||
return Inertia::render('MaterialLogistics::Inventory/OperationsForm', [
|
||||
'warehouses' => $warehouses,
|
||||
|
||||
Reference in New Issue
Block a user