TenantAtlas/app/Support/Alerts/AlertDestinationLastTestStatus.php
ahmido d49d33ac27 feat(alerts): test message + last test status + deep links (#122)
Implements feature 100 (Alert Targets):

- US1: “Send test message” action (RBAC + confirmation + rate limit + audit + async job)
- US2: Derived “Last test” status badge (Never/Sent/Failed/Pending) on view + edit surfaces
- US3: “View last delivery” deep link + deliveries viewer filters (event_type, destination) incl. tenantless test deliveries

Tests:
- Full suite green (1348 passed, 7 skipped)
- Added focused feature tests for send test, last test resolver/badges, and deep-link filters

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #122
2026-02-18 23:12:38 +00:00

26 lines
557 B
PHP

<?php
declare(strict_types=1);
namespace App\Support\Alerts;
use Carbon\CarbonImmutable;
final class AlertDestinationLastTestStatus
{
public function __construct(
public readonly AlertDestinationLastTestStatusEnum $status,
public readonly ?CarbonImmutable $timestamp,
public readonly ?int $deliveryId,
) {}
public static function never(): self
{
return new self(
status: AlertDestinationLastTestStatusEnum::Never,
timestamp: null,
deliveryId: null,
);
}
}