Erinnerungsabstand und taegliche/woechentliche Zusammenfassung einstellbar

System > Betrieb > Benachrichtigungen: offene Meldungen (Doppelbuchungen im
Postfach, Portal-Aufgaben) nur einmal oder alle 1/2/3/7 Tage erneut senden;
Tages- und/oder Wochenuebersicht mit waehlbarer Uhrzeit, Wochentag und Inhalt
(Postfach, Anfragen, Neues, An-/Abreisen, Zahlungen, Portale, Bewertungen).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 5.5 committed 2026-10-30 10:11:15 +01:00
1 parent 70a39315e2
commit 1c757f7429
20 files changed
+842 -22

No files matched your search

+8 -4
View File
@@ -10,19 +10,23 @@
use Illuminate\Queue\SerializesModels;
/**
* Reports overlaps between a newly imported portal occupation and occupations from elsewhere.
* Reports overlaps between an imported portal occupation and occupations from elsewhere: new ones and
* reminders about ones that are still open.
*/
class ChannelConflict extends Mailable
{
use Queueable, SerializesModels;
/** @param list<string> $conflicts */
public function __construct(public Channel $channel, public array $conflicts) {}
/**
* @param list<string> $conflicts reported for the first time
* @param list<string> $reminders reported before, still unread and still detected
*/
public function __construct(public Channel $channel, public array $conflicts, public array $reminders = []) {}
public function envelope(): Envelope
{
return new Envelope(
subject: 'Achtung: mögliche Doppelbuchung über '.$this->channel->name,
subject: ($this->conflicts === [] ? 'Erinnerung' : 'Achtung').': mögliche Doppelbuchung über '.$this->channel->name,
);
}
+40
View File
@@ -0,0 +1,40 @@
<?php
namespace App\Mail;
use App\Enums\DigestSection;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
/**
* The landlord's daily or weekly summary of open points and news (SendDigests, DigestReport).
*/
class Digest extends Mailable
{
use Queueable, SerializesModels;
/**
* @param list<array{section: DigestSection, title: string, items: list<string>, more: int, url: string, link: string}> $sections
*/
public function __construct(public bool $weekly, public array $sections) {}
public function envelope(): Envelope
{
$title = $this->weekly ? 'Wochenübersicht KW '.now()->isoWeek() : 'Tagesübersicht '.now()->format('d.m.Y');
$count = array_sum(array_map(fn (array $section): int => count($section['items']) + $section['more'], $this->sections));
return new Envelope(
subject: $title.($count === 0 ? ': nichts Neues' : ": {$count} ".($count === 1 ? 'Punkt' : 'Punkte')),
);
}
public function content(): Content
{
return new Content(
markdown: 'mail.digest',
);
}
}