Participant mangement
This commit is contained in:
63
app/Mail/ParticipantCocMails/ParticipantCocCompleteMail.php
Normal file
63
app/Mail/ParticipantCocMails/ParticipantCocCompleteMail.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
namespace App\Mail\ParticipantCocMails;
|
||||
|
||||
use App\Models\EventParticipant;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Mail\Mailables\Attachment;
|
||||
use Illuminate\Mail\Mailables\Content;
|
||||
use Illuminate\Mail\Mailables\Envelope;
|
||||
|
||||
class ParticipantCocCompleteMail extends Mailable {
|
||||
public function __construct(
|
||||
private EventParticipant $participant,
|
||||
)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the message envelope.
|
||||
*/
|
||||
public function envelope(): Envelope
|
||||
{
|
||||
$participant = $this->participant->toResource()->toArray(new Request());
|
||||
|
||||
$subject = 'Dein erweitertes Führungszeugnis wurde bestätigt';
|
||||
|
||||
return new Envelope(
|
||||
subject: $subject,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the message content definition.
|
||||
*/
|
||||
public function content(): Content
|
||||
{
|
||||
$event = $this->participant->event()->first()->toResource()->toArray(new Request());
|
||||
$participant = $this->participant->toResource()->toArray(new Request());
|
||||
|
||||
return new Content(
|
||||
view: 'emails.cocCheck.coc_check_complete',
|
||||
with: [
|
||||
'name' => $participant['nicename'],
|
||||
'eventTitle' => $event['name'],
|
||||
'eventEmail' => $event['email'],
|
||||
'cocFinalDate' => $event['registrationFinalEnd']['formatted'],
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the attachments for the message.
|
||||
*
|
||||
* @return array<int, Attachment>
|
||||
*/
|
||||
public function attachments(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
63
app/Mail/ParticipantCocMails/ParticipantCocInvalidMail.php
Normal file
63
app/Mail/ParticipantCocMails/ParticipantCocInvalidMail.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?php
|
||||
|
||||
namespace App\Mail\ParticipantCocMails;
|
||||
|
||||
use App\Models\EventParticipant;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Mail\Mailables\Attachment;
|
||||
use Illuminate\Mail\Mailables\Content;
|
||||
use Illuminate\Mail\Mailables\Envelope;
|
||||
|
||||
class ParticipantCocInvalidMail extends Mailable {
|
||||
public function __construct(
|
||||
private EventParticipant $participant,
|
||||
)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the message envelope.
|
||||
*/
|
||||
public function envelope(): Envelope
|
||||
{
|
||||
$participant = $this->participant->toResource()->toArray(new Request());
|
||||
|
||||
$subject = 'Bitte reiche ein erweiteres polizeiliches Führungszeugnis ein';
|
||||
|
||||
return new Envelope(
|
||||
subject: $subject,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the message content definition.
|
||||
*/
|
||||
public function content(): Content
|
||||
{
|
||||
$event = $this->participant->event()->first()->toResource()->toArray(new Request());
|
||||
$participant = $this->participant->toResource()->toArray(new Request());
|
||||
|
||||
return new Content(
|
||||
view: 'emails.cocCheck.coc_check_invalid',
|
||||
with: [
|
||||
'name' => $participant['nicename'],
|
||||
'eventTitle' => $event['name'],
|
||||
'eventEmail' => $event['email'],
|
||||
'cocFinalDate' => $event['registrationFinalEnd']['formatted'],
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the attachments for the message.
|
||||
*
|
||||
* @return array<int, Attachment>
|
||||
*/
|
||||
public function attachments(): array
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user