phase 8 and 9
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<x-analytics-layout :website="$website" title="Alert Notifications">
|
||||
<x-slot name="headerActions">
|
||||
<a href="{{ route('alerts.index', $website) }}" class="inline-flex items-center gap-2 px-3 py-2 rounded-lg border border-gray-300 text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 transition">
|
||||
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18" /></svg>
|
||||
Back to Alerts
|
||||
</a>
|
||||
</x-slot>
|
||||
|
||||
@if ($notifications->isEmpty())
|
||||
<x-empty-state title="No notifications" message="Alert notifications will appear here when triggered." />
|
||||
@else
|
||||
<div class="bg-white rounded-xl border border-gray-200 overflow-hidden">
|
||||
<div class="divide-y divide-gray-200">
|
||||
@foreach ($notifications as $notification)
|
||||
<div class="px-6 py-4">
|
||||
<div class="flex items-start justify-between">
|
||||
<div>
|
||||
<p class="text-sm font-medium text-gray-900">{{ $notification->alert->name }}</p>
|
||||
<p class="text-sm text-gray-600 mt-0.5">{{ $notification->message }}</p>
|
||||
</div>
|
||||
<span class="text-xs text-gray-400 whitespace-nowrap ml-4">{{ $notification->created_at->diffForHumans() }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
{{ $notifications->links() }}
|
||||
</div>
|
||||
@endif
|
||||
</x-analytics-layout>
|
||||
Reference in New Issue
Block a user