- integrate spatie/icalendar-generator for candidate & panelist .ics invitations (RSVP & 15m alerts)
- add StoreInterviewRequest, ScheduleInterviewDto, and invitation/reminder queued actions
- add migration for job_title, round, description, and reminder_sent_at on interviews table
- style datetime-local picker indicators to pure white on dark input backgrounds
- support button loading spinners with :showLoader="true" and loadingText
- auto-open schedule drawer on validation failure with inline @error alerts and old() bindings
55 lines
1.4 KiB
PHP
55 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Mail;
|
|
|
|
use App\Models\Interview;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Mail\Mailables\Content;
|
|
use Illuminate\Mail\Mailables\Envelope;
|
|
use Illuminate\Queue\SerializesModels;
|
|
|
|
class InterviewReminderMail extends Mailable implements ShouldQueue
|
|
{
|
|
use Queueable, SerializesModels;
|
|
|
|
/**
|
|
* Create a new message instance.
|
|
*/
|
|
public function __construct(
|
|
public readonly Interview $interview,
|
|
public readonly string $recipientType = 'candidate', // 'candidate' or 'interviewer'
|
|
public readonly ?string $recipientName = null,
|
|
) {
|
|
$this->afterCommit();
|
|
}
|
|
|
|
/**
|
|
* Get the message envelope.
|
|
*/
|
|
public function envelope(): Envelope
|
|
{
|
|
$jobTitle = $this->interview->job_title ?: 'Candidate Assessment';
|
|
$round = $this->interview->round ?: 'R1';
|
|
|
|
$prefix = $this->recipientType === 'interviewer'
|
|
? "Interviewer Reminder (15 Mins): {$this->interview->candidate_name}"
|
|
: "Interview Reminder (15 Mins): {$this->interview->candidate_name}";
|
|
|
|
return new Envelope(
|
|
subject: "{$prefix} - {$jobTitle} ({$round})",
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Get the message content definition.
|
|
*/
|
|
public function content(): Content
|
|
{
|
|
return new Content(
|
|
view: 'emails.interview.reminder',
|
|
);
|
|
}
|
|
}
|