Beta version

This commit is too large to list all changes.
This commit is contained in:
2020-06-27 00:32:33 +01:00
parent d15c0cb12f
commit 5a8c080a31
135 changed files with 8534 additions and 12774 deletions

View File

@@ -4,6 +4,7 @@ namespace App\Listeners;
use App\Events\ApplicationApprovedEvent;
use App\StaffProfile;
use App\Notifications\ApplicationApproved;
use Carbon\Carbon;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
@@ -37,11 +38,15 @@ class PromoteUser
'memberNotes' => 'Approved by staff members. Welcome them to the team!'
]);
$event->application->user->assignRole('reviewer');
Log::info('User ' . $event->application->user->name . ' has just been promoted!', [
'newRank' => $event->application->response->vacancy->permissionGroupName,
'staffProfileID' => $staffProfile->id
]);
// TODO: Dispatch alert email and notifications for the user and staff members
$event->application->user->notify(new ApplicationApproved($event->application));
// note: Also notify staff
// TODO: Also assign new app role based on the permission group name
}