Doppelbuchungen nur einmal melden und im Postfach der Verwaltung zeigen

Der Kalenderabgleich alle 5 Minuten hat jede fortbestehende Ueberschneidung
erneut gemailt. ReportChannelConflicts legt jede Ueberschneidung einmal im
neuen Postfach (InboxMessage, Fingerabdruck je Mandant) ab und mailt nur neue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 5.5 committed 2026-10-30 09:52:35 +01:00
1 parent 876a0a20f3
commit b9225f5fb8
17 files changed
+593 -15

No files matched your search

@@ -0,0 +1,38 @@
<?php
namespace App\Filament\Resources\InboxMessages\Pages;
use App\Filament\Concerns\ListsCurrentProperty;
use App\Filament\Resources\InboxMessages\InboxMessageResource;
use App\Models\Property;
use Filament\Actions\Action;
use Filament\Resources\Pages\ListRecords;
use Filament\Support\Icons\Heroicon;
use Illuminate\Database\Eloquent\Builder;
class ListInboxMessages extends ListRecords
{
use ListsCurrentProperty;
protected static string $resource = InboxMessageResource::class;
/**
* Messages of the chosen apartment and those that concern no apartment in particular.
*/
protected function scopeToProperty(Builder $query, Property $property): Builder
{
return $query->where(fn (Builder $query) => $query->where('property_id', $property->id)->orWhereNull('property_id'));
}
protected function getHeaderActions(): array
{
return [
Action::make('readAll')
->label('Alle als gelesen markieren')
->icon(Heroicon::OutlinedCheck)
->color('gray')
->visible(fn (): bool => $this->getTableQuery()->unread()->exists())
->action(fn () => $this->getTableQuery()->unread()->update(['read_at' => now()])),
];
}
}