Anliegen, Feldkatalog, Feldgruppen, Anfragevorlagen mit unveränderlichen Fassungen, Anfrage-Einstiege und eingegangene Anfragen. Eine gemeinsame Regelauswertung bedient Besucher, Vorschau und Anfrageservice; Werte nicht mehr relevanter Felder werden verworfen, Anliegen und Auswahlwerte serverseitig geprüft, doppeltes Absenden bleibt eine Anfrage. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
36 lines
1.0 KiB
PHP
36 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Mail;
|
|
|
|
use App\Domain\Communication\Inquiry;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Mail\Mailables\Content;
|
|
use Illuminate\Mail\Mailables\Envelope;
|
|
|
|
/**
|
|
* Interne Benachrichtigung. Sie nennt nur Kennzeichen, Anliegen und den Weg zur Anfrage; Kontaktdaten und Antworten
|
|
* stehen ausschließlich in der Verwaltung (Datensparsamkeit).
|
|
*/
|
|
class InquiryReceived extends Mailable
|
|
{
|
|
public function __construct(public Inquiry $inquiry) {}
|
|
|
|
public function envelope(): Envelope
|
|
{
|
|
return new Envelope(subject: 'Neue Anfrage '.$this->inquiry->reference);
|
|
}
|
|
|
|
public function content(): Content
|
|
{
|
|
return new Content(
|
|
text: 'mail.inquiry-received',
|
|
with: [
|
|
'reference' => $this->inquiry->reference,
|
|
'issue' => $this->inquiry->issueTitle(),
|
|
'received' => $this->inquiry->created_at?->timezone(config('app.timezone'))->format('d.m.Y H:i'),
|
|
'url' => url('/verwaltung/anfragen/'.$this->inquiry->id),
|
|
],
|
|
);
|
|
}
|
|
}
|