feat: Implement role-based dashboards, user management CRUD, and integration request authorization policies.
This commit is contained in:
@@ -48,7 +48,7 @@ class IntegrationService
|
||||
]);
|
||||
|
||||
// Notify RH users about the new request
|
||||
$rhUsers = \App\Models\User::role('RH')->get();
|
||||
$rhUsers = \App\Models\User::permission(['validate rh', 'create integration'])->get();
|
||||
\Illuminate\Support\Facades\Notification::send($rhUsers, new \App\Notifications\NewIntegrationRequestNotification($request));
|
||||
|
||||
return $request;
|
||||
@@ -110,7 +110,7 @@ class IntegrationService
|
||||
$request->agent->update(['integration_status' => IntegrationStatus::Completed]);
|
||||
|
||||
// Notify RH (Standard notification)
|
||||
$rhUsers = \App\Models\User::role('RH')->get();
|
||||
$rhUsers = \App\Models\User::permission('validate rh')->get();
|
||||
\Illuminate\Support\Facades\Notification::send($rhUsers, new \App\Notifications\ProcessCompletedNotification($request));
|
||||
|
||||
// Generate PDF for Prescriber and DSI
|
||||
|
||||
@@ -56,7 +56,7 @@ class ServiceTaskManager
|
||||
]);
|
||||
|
||||
// Notify RH that a service has completed their task
|
||||
$rhUsers = \App\Models\User::role('RH')->get();
|
||||
$rhUsers = \App\Models\User::permission('validate rh')->get();
|
||||
\Illuminate\Support\Facades\Notification::send($rhUsers, new \App\Notifications\ServiceTaskValidatedNotification($task));
|
||||
|
||||
// Trigger check on the parent integration request
|
||||
|
||||
Reference in New Issue
Block a user