Posteingang: Antwortbezug ohne Klammern, Testadresse im Testbetrieb, sofortige Auswertung
Deploy FeWo mit PipelineManager / deploy (push) Successful in 5m6s
Deploy FeWo mit PipelineManager / deploy (push) Successful in 5m6s
- Antwortbezug (In-Reply-To/References) wird mit und ohne spitze Klammern verglichen – Strato liefert ihn ohne, gespeichert war er mit; Antworten blieben deshalb im Posteingang hängen. - Testbetrieb: Die Testadresse steht zusammen mit der genannten Vorgangsnummer für den Gast dieses Vorgangs (alle Antworten kommen vom Testpostfach). Im Live-Betrieb gilt das nicht. - Eine zugeordnete Nachricht wird sofort ausgewertet (automatisch und nach Zuordnung von Hand), nicht erst im Fünf-Minuten-Lauf; die Meldung nennt, was übernommen wurde. Neu: „Erneut auswerten“. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f4a435c71a
commit
ad63db78f3
6 files changed
+78
-11
No files matched your search
@@ -4,6 +4,7 @@
|
||||
|
||||
use App\Actions\ContributeCaseFacts;
|
||||
use App\Actions\CreateReservation;
|
||||
use App\Actions\ReceiveInboundMessage;
|
||||
use App\Actions\RequestCaseData;
|
||||
use App\Enums\BookingStatus;
|
||||
use App\Enums\BookingTaskKind;
|
||||
@@ -137,7 +138,15 @@ public static function table(Table $table): Table
|
||||
CaseLog::record($booking, 'mail_in', 'E-Mail von Ihnen zugeordnet: '.$record->subject);
|
||||
$requests->replyReceived($booking);
|
||||
BookingTask::openOnce($booking, BookingTaskKind::InboundReview, 'm'.$record->id, ['due_on' => today(), 'note' => '„'.mb_substr((string) $record->subject, 0, 120).'“ – im Posteingang ansehen.']);
|
||||
Notification::make()->title('Zugeordnet')->success()->send();
|
||||
app(ReceiveInboundMessage::class)->evaluate($record);
|
||||
Notification::make()->title('Zugeordnet')->body(self::evaluationSummary($record->fresh()))->success()->send();
|
||||
}),
|
||||
Action::make('evaluateAgain')->label('Erneut auswerten')->icon(Heroicon::OutlinedArrowPath)->color('gray')
|
||||
->visible(fn (InboundMessage $record): bool => $record->booking_id !== null && in_array($record->extraction_status, ['failed', 'disabled'], true))
|
||||
->action(function (InboundMessage $record): void {
|
||||
$record->update(['extraction_status' => null]);
|
||||
app(ReceiveInboundMessage::class)->evaluate($record);
|
||||
Notification::make()->title('Ausgewertet')->body(self::evaluationSummary($record->fresh()))->send();
|
||||
}),
|
||||
Action::make('createInquiry')->label('Als neue Anfrage anlegen')->icon(Heroicon::OutlinedPlus)
|
||||
->visible(fn (InboundMessage $record): bool => $record->status === InboundMessage::NEEDS_REVIEW)
|
||||
@@ -204,6 +213,22 @@ public static function table(Table $table): Table
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* What the evaluation of a message did, in one sentence.
|
||||
*/
|
||||
public static function evaluationSummary(InboundMessage $message): string
|
||||
{
|
||||
$applied = collect((array) ($message->extraction['applied'] ?? []))->map(fn (array $fact): string => CaseRequirements::label($fact['field']))->implode(', ');
|
||||
$proposed = count((array) ($message->extraction['proposed'] ?? []));
|
||||
|
||||
return match ($message->extraction_status) {
|
||||
'done' => ($applied !== '' ? 'Übernommen: '.$applied.'.' : 'Keine Angaben automatisch übernommen.').($proposed > 0 ? ' '.$proposed.' Vorschlag/Vorschläge zu prüfen.' : ''),
|
||||
'disabled' => 'Keine automatische Auswertung (System › KI-Anbindung nicht eingerichtet oder abgelehnt).',
|
||||
'failed' => 'Die automatische Auswertung war nicht möglich: '.($message->extraction['error'] ?? 'unbekannter Fehler'),
|
||||
default => 'Wird ausgewertet.',
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Cases to assign a message to: the hints first, then the open cases.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user