v0.11 U5: Posteingang, deterministische Zuordnung, Klärungsansicht
- mailboxes (Modell für mehrere, eines aktiv): Übernahme des bisherigen Postfachs als „nur Portal-Mails“; Modus „alle Nachrichten“ für ein eigenes Postfach; Adresse als Antwortadresse der Rückfragen. - inbound_messages: jede Nachricht zuerst gespeichert, einmal je Message-ID, mit Testbetriebs-Kennzeichen (M10). Portal-Mails laufen unverändert über den Portalpfad (CH-08). - MessageMatcher (CH-13, ohne Scoring): Antwortbezug; Vorgangsnummer nur mit dem Gast als Absender; sonst Absender + Wohnung + beide Termine eines einzigen offenen Vorgangs. Ein offener Vorgang des Absenders allein genügt nicht (nur Hinweis). Alles andere → Klärung (M04). - Ausgehende Mails speichern ihre Message-ID; Antwort stoppt Erinnerungen. - Filament „Posteingang“: lesen, Vorgang zuordnen, als neue Anfrage anlegen, ignorieren, erledigt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e4a3cb7f7b
commit
dff9e2344e
19 files changed
+990
-59
No files matched your search
@@ -123,6 +123,12 @@ public function serviceUsages(): HasMany
|
||||
*/
|
||||
public function mailbox(): ?array
|
||||
{
|
||||
// v0.11: the active mailbox record leads; the tenant columns remain the fallback until every system migrated.
|
||||
$mailbox = $this->activeMailbox();
|
||||
if ($mailbox !== null) {
|
||||
return $mailbox->connection();
|
||||
}
|
||||
|
||||
if (blank($this->mailbox_host) || blank($this->mailbox_username)) {
|
||||
return null;
|
||||
}
|
||||
@@ -137,6 +143,14 @@ public function mailbox(): ?array
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* The landlord's active mailbox (at most one, CH-05).
|
||||
*/
|
||||
public function activeMailbox(): ?Mailbox
|
||||
{
|
||||
return Mailbox::query()->withoutGlobalScopes()->where('tenant_id', $this->id)->where('is_active', true)->orderBy('id')->first();
|
||||
}
|
||||
|
||||
public function isLive(): bool
|
||||
{
|
||||
return $this->operating_mode === 'live';
|
||||
|
||||
Reference in new issue
Block a user