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:
1 parent
876a0a20f3
commit
b9225f5fb8
17 files changed
+593
-15
No files matched your search
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Resources\InboxMessages;
|
||||
|
||||
use App\Filament\Concerns\FollowsAdminMode;
|
||||
use App\Filament\Resources\InboxMessages\Pages\ListInboxMessages;
|
||||
use App\Filament\Resources\InboxMessages\Tables\InboxMessagesTable;
|
||||
use App\Models\InboxMessage;
|
||||
use BackedEnum;
|
||||
use Filament\Resources\Resource;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Filament\Tables\Table;
|
||||
use UnitEnum;
|
||||
|
||||
/**
|
||||
* The admin inbox ("Postfach"): findings the landlord has to look at, each posted once (App\Support\Inbox).
|
||||
*/
|
||||
class InboxMessageResource extends Resource
|
||||
{
|
||||
use FollowsAdminMode;
|
||||
|
||||
protected static ?string $model = InboxMessage::class;
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedInbox;
|
||||
|
||||
protected static string|UnitEnum|null $navigationGroup = 'Vermietung';
|
||||
|
||||
protected static ?string $navigationLabel = 'Postfach';
|
||||
|
||||
protected static ?string $modelLabel = 'Meldung';
|
||||
|
||||
protected static ?string $pluralModelLabel = 'Postfach';
|
||||
|
||||
protected static ?int $navigationSort = 0;
|
||||
|
||||
public static function table(Table $table): Table
|
||||
{
|
||||
return InboxMessagesTable::configure($table);
|
||||
}
|
||||
|
||||
public static function canCreate(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function getNavigationBadge(): ?string
|
||||
{
|
||||
$unread = InboxMessage::query()->unread()->count();
|
||||
|
||||
return $unread > 0 ? (string) $unread : null;
|
||||
}
|
||||
|
||||
public static function getNavigationBadgeColor(): string
|
||||
{
|
||||
return 'danger';
|
||||
}
|
||||
|
||||
public static function getNavigationBadgeTooltip(): ?string
|
||||
{
|
||||
return 'Ungelesen';
|
||||
}
|
||||
|
||||
public static function getPages(): array
|
||||
{
|
||||
return [
|
||||
'index' => ListInboxMessages::route('/'),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user