Ein Eingang fuer alle Kanaele (Paket 4, Prozessarchitektur v0.10)
Portalbuchungen und -anfragen aus Kalender und Mail werden ueber PortalIntake zum Vorgang (nur bei sicherer Erkennung), Dubletten ueber Buchungsnummer, gleiches Portal mit gleichen Naechten und Spiegelung; Unsicheres wird geklaert. Portalstorno und -aenderung als Aufgabe am Vorgang ohne stille Stornierung. Schalter je Kanal (Aus als Standard, Beobachten, Anlegen, Anlegen + weiter), Eingangsprotokoll, Bestandsuebernahme mit Vorschau/Bericht/Ruecknahme, Sperrnachweis in drei Stufen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cf11c8a474
commit
ac9d20b812
29 files changed
+1952
-16
No files matched your search
@@ -27,6 +27,9 @@ class CaseActivities
|
||||
/** Activities that are listed on their own in the work list (they are not "the" next step of a case). */
|
||||
private const LISTED_SEPARATELY = ['channel_block'];
|
||||
|
||||
/** Activities that are the next step whatever else is open. */
|
||||
private const URGENT = ['task_portal_cancel_reported', 'task_portal_change_reported'];
|
||||
|
||||
/**
|
||||
* @return list<Activity>
|
||||
*/
|
||||
@@ -110,7 +113,7 @@ public static function for(Booking $booking): array
|
||||
}
|
||||
|
||||
foreach (self::channelTasks($booking) as $task) {
|
||||
$activities[] = new Activity('channel_block', ($task->action->value === 'block' ? 'In ' : 'Freigeben in ').$task->channel?->name.($task->action->value === 'block' ? ' sperren' : ''), $task->status === ChannelTaskStatus::Open ? ActivityState::Open : ActivityState::Done, $task->period(), url: ChannelTaskResource::getUrl());
|
||||
$activities[] = new Activity('channel_block', ($task->action->value === 'block' ? 'In ' : 'Freigeben in ').$task->channel?->name.($task->action->value === 'block' ? ' sperren' : ''), $task->status === ChannelTaskStatus::Open ? ActivityState::Open : ActivityState::Done, $task->period().' · '.$task->proofLabel(), url: ChannelTaskResource::getUrl());
|
||||
}
|
||||
|
||||
if ($profile->payments() === Responsibility::Portal) {
|
||||
@@ -157,7 +160,11 @@ public static function for(Booking $booking): array
|
||||
*/
|
||||
public static function next(Booking $booking): ?Activity
|
||||
{
|
||||
foreach (self::for($booking) as $activity) {
|
||||
$activities = self::for($booking);
|
||||
// A report of the portal (cancellation, other dates) comes before everything else on the case.
|
||||
usort($activities, fn (Activity $a, Activity $b): int => (int) in_array($b->key, self::URGENT, true) <=> (int) in_array($a->key, self::URGENT, true));
|
||||
|
||||
foreach ($activities as $activity) {
|
||||
if ($activity->state->needsAction() && ! in_array($activity->key, self::LISTED_SEPARATELY, true)) {
|
||||
return $activity;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user