Erinnerungsabstand und taegliche/woechentliche Zusammenfassung einstellbar
System > Betrieb > Benachrichtigungen: offene Meldungen (Doppelbuchungen im Postfach, Portal-Aufgaben) nur einmal oder alle 1/2/3/7 Tage erneut senden; Tages- und/oder Wochenuebersicht mit waehlbarer Uhrzeit, Wochentag und Inhalt (Postfach, Anfragen, Neues, An-/Abreisen, Zahlungen, Portale, Bewertungen). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
70a39315e2
commit
1c757f7429
20 files changed
+842
-22
No files matched your search
@@ -25,6 +25,7 @@
|
||||
use App\Models\InboxMessage;
|
||||
use App\Models\Property;
|
||||
use App\Models\User;
|
||||
use App\Tenancy\TenantContext;
|
||||
use Carbon\CarbonImmutable;
|
||||
use Database\Seeders\PropertySeeder;
|
||||
use Filament\Actions\CreateAction;
|
||||
@@ -149,6 +150,48 @@ public function test_a_lasting_double_booking_is_reported_once_however_often_the
|
||||
$this->assertSame(2, InboxMessage::count());
|
||||
}
|
||||
|
||||
public function test_an_unread_double_booking_is_repeated_after_the_chosen_interval_until_it_is_read(): void
|
||||
{
|
||||
$this->property->tenant->update(['reminder_interval_days' => 3]);
|
||||
Booking::factory()->for($this->property)->create(['arrival' => '2026-11-08', 'departure' => '2026-11-12', 'status' => BookingStatus::Confirmed]);
|
||||
$channel = $this->channel('FeWo-direkt');
|
||||
$this->fakeFeed([['x1', '20261107', '20261110']]);
|
||||
(new SyncChannel)->handle($channel);
|
||||
|
||||
$this->travel(2)->days();
|
||||
(new SyncChannel)->handle($channel);
|
||||
Mail::assertSentCount(1);
|
||||
|
||||
$this->travel(1)->days();
|
||||
(new SyncChannel)->handle($channel);
|
||||
(new SyncChannel)->handle($channel);
|
||||
Mail::assertSentCount(2);
|
||||
Mail::assertSent(ChannelConflict::class, fn (ChannelConflict $mail): bool => $mail->conflicts === [] && count($mail->reminders) === 1
|
||||
&& str_starts_with($mail->envelope()->subject, 'Erinnerung'));
|
||||
|
||||
InboxMessage::sole()->update(['read_at' => now()]);
|
||||
$this->travel(4)->days();
|
||||
(new SyncChannel)->handle($channel);
|
||||
Mail::assertSentCount(2);
|
||||
}
|
||||
|
||||
public function test_open_portal_tasks_are_repeated_after_the_chosen_interval(): void
|
||||
{
|
||||
config(['fewo.channels.task_reminder_after_minutes' => 30]);
|
||||
$this->property->tenant->update(['reminder_interval_days' => 1]);
|
||||
app(TenantContext::class)->set($this->property->tenant);
|
||||
ChannelTask::factory()->for($this->channel('Ostseeklar', manual: true))->create(['created_at' => now()->subHour()]);
|
||||
|
||||
$this->assertSame(1, app(RemindChannelTasks::class)->handle());
|
||||
$this->assertSame(0, app(RemindChannelTasks::class)->handle());
|
||||
$this->travel(1)->days();
|
||||
$this->assertSame(1, app(RemindChannelTasks::class)->handle());
|
||||
|
||||
$this->property->tenant->update(['reminder_interval_days' => 0]);
|
||||
$this->travel(5)->days();
|
||||
$this->assertSame(0, app(RemindChannelTasks::class)->handle());
|
||||
}
|
||||
|
||||
public function test_failed_import_is_logged_and_alerted_once_until_it_works_again(): void
|
||||
{
|
||||
$channel = $this->channel('Ostseeklar');
|
||||
|
||||
Reference in new issue
Block a user