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
@@ -219,6 +219,14 @@ public function answered(Booking $booking, FactContribution $contribution, FactS
|
||||
return;
|
||||
}
|
||||
|
||||
if ($source->isAuthoritative() && $request->status === DataRequest::OPEN && $request->next_reminder_at === null && $request->followups_sent < $booking->process()->followupsMax()) {
|
||||
// The landlord took over the guest's e-mail answer and something is still missing: a follow-up question is
|
||||
// prepared for his release.
|
||||
$request->forceFill(['status' => DataRequest::DRAFT, 'last_message' => DataRequest::FOLLOWUP, 'fields' => $needs['fields']])->save();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ($source->isAuthoritative() || $request->status !== DataRequest::OPEN || (! $contribution->anyApplied() && ! $contribution->needsReview())) {
|
||||
$request->update(['fields' => $needs['fields']]);
|
||||
|
||||
@@ -243,6 +251,21 @@ public function answered(Booking $booking, FactContribution $contribution, FactS
|
||||
CaseLog::record($booking, 'data_request', 'Antwort unvollständig – Folgefrage vorbereitet: '.implode(', ', CaseRequirements::labels($needs['fields'])), actor: CaseLog::SYSTEM);
|
||||
}
|
||||
|
||||
/**
|
||||
* A reply of the guest arrived (assigned by the inbox): the open reminder is cancelled (CH-17). What it says is
|
||||
* taken over only through the extraction and the fact intake.
|
||||
*/
|
||||
public function replyReceived(Booking $booking): void
|
||||
{
|
||||
$request = $booking->openDataRequest();
|
||||
if ($request?->status !== DataRequest::OPEN) {
|
||||
return;
|
||||
}
|
||||
|
||||
$request->forceFill(['answered_at' => now(), 'next_reminder_at' => null])->save();
|
||||
CaseLog::record($booking, 'data_request', 'Antwort des Gastes per E-Mail – Erinnerungen ruhen', actor: CaseLog::SYSTEM);
|
||||
}
|
||||
|
||||
/**
|
||||
* Due reminders of every running request (scheduler). At the limit the landlord takes over; nothing changes any
|
||||
* deadline of the case.
|
||||
|
||||
Reference in new issue
Block a user