Decrease vacancy slots by one when firing approval event

This commit is contained in:
2021-11-16 17:00:01 +00:00
parent 54b0d746fa
commit e46ebfc63a
3 changed files with 17 additions and 2 deletions

View File

@@ -47,6 +47,7 @@ class PromoteUser
public function handle(ApplicationApprovedEvent $event)
{
$event->application->setStatus('APPROVED');
$event->application->response->vacancy->decrease();
$staffProfile = StaffProfile::create([
'userID' => $event->application->user->id,