first commit

This commit is contained in:
Sampanna Rimal
2024-08-27 17:48:06 +05:45
commit 53c0140f58
10839 changed files with 1125847 additions and 0 deletions

View File

@ -0,0 +1,53 @@
<?php
namespace App\Observers;
use App\Notifications\HrActionNotification;
use Modules\Employee\Models\Employee;
use Modules\Recruit\Models\InterviewSchedule;
class InterviewScheduleObserver
{
/**
* Handle the InterviewSchedule "created" event.
*/
public function created(InterviewSchedule $interviewSchedule): void
{
$interviewers = Employee::whereIn('id', $interviewSchedule->interviewer_choices)->get();
$interviewers->each->notify(new HrActionNotification('interviewer', $interviewSchedule,'you have been selected as interviewer'));
$interviewSchedule->jobPost->jobApplications->each->notify(new HrActionNotification('interviewee', $interviewSchedule,'you interview has been scheduled'));
}
/**
* Handle the InterviewSchedule "updated" event.
*/
public function updated(InterviewSchedule $interviewSchedule): void
{
//
}
/**
* Handle the InterviewSchedule "deleted" event.
*/
public function deleted(InterviewSchedule $interviewSchedule): void
{
//
}
/**
* Handle the InterviewSchedule "restored" event.
*/
public function restored(InterviewSchedule $interviewSchedule): void
{
//
}
/**
* Handle the InterviewSchedule "force deleted" event.
*/
public function forceDeleted(InterviewSchedule $interviewSchedule): void
{
//
}
}