@extends('merchant.layout.app', ['page' => 'notifications']) @section('title', 'Push Notifications') @section('content')
{{-- ── Breadcrumb ─────────────────────────────────────────────────────── --}}

Push Notifications

{{-- ── Flash messages ──────────────────────────────────────────────────── --}} @if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif {{-- ── Table card ───────────────────────────────────────────────────────── --}}
{{-- Card header --}}

All Notifications {{ $notifications->count() }}

{{-- Table --}}
@forelse ($notifications as $notification) {{-- Title + notes --}} {{-- Description --}} {{-- Image --}} {{-- Status --}} {{-- Sent at --}} {{-- Delete --}} @empty @endforelse

Title

Description

Image

Status

Sent At

Action

{{ $notification->title }} @if ($notification->notes) {{ Str::limit($notification->notes, 40) }} @endif

{{ $notification->description ? Str::limit($notification->description, 80) : '—' }}

@if ($notification->image)
Notification image
@else No image @endif
@if ($notification->status === 'active') Active @else {{ ucfirst($notification->status) }} @endif

{{ $notification->created_at->format('M d, Y') }}

{{ $notification->created_at->format('h:i A') }}

{{-- Delete button --}} {{-- Inline confirm --}}
Sure?
@csrf @method('DELETE')
No push notifications sent yet.
{{-- ── Add Notification Modal ───────────────────────────────────────────── --}}
{{-- backdrop --}}
{{-- Close --}}

Send Push Notification

This will be sent to all customers within 1000 km of your shop.

@csrf {{-- Title --}}
@error('title')

{{ $message }}

@enderror
{{-- Description --}}
@error('description')

{{ $message }}

@enderror
{{-- Notes --}}
@error('notes')

{{ $message }}

@enderror
{{-- Image --}}
@error('image')

{{ $message }}

@enderror
{{-- Actions --}}
@endsection @push('scripts') {{-- Re-open the modal with old input if validation failed --}} @if ($errors->any()) @endif @endpush