@extends('layouts.app') @section('title', 'Operational Alert Center') @section('content')

Operational Alert Center

Live operational exceptions across stock, payments, offline selling, stored value, and sensitive transactions.

@foreach([ ['Open alerts', $summary['open'], 'bg-aqua', 'fa-bell'], ['Critical', $summary['critical'], 'bg-red', 'fa-exclamation-circle'], ['Warnings', $summary['warning'], 'bg-yellow', 'fa-exclamation-triangle'], ['Acknowledged', $summary['acknowledged'], 'bg-green', 'fa-check'], ] as $card)

{{ $card[1] }}

{{ $card[0] }}

@endforeach

Filters

{!! Form::open(['route' => 'operational-alerts.index', 'method' => 'get']) !!}
{!! Form::label('status', 'Status') !!} {!! Form::select('status', ['' => 'All', 'open' => 'Open', 'acknowledged' => 'Acknowledged', 'resolved' => 'Resolved'], request('status'), ['class' => 'form-control']) !!}
{!! Form::label('alert_type', 'Alert type') !!} {!! Form::select('alert_type', [ '' => 'All', 'low_stock' => 'Low/out of stock', 'payment_mismatch' => 'Payment mismatch', 'offline_sync' => 'Offline sync failure', 'expiring_voucher' => 'Expiring stored value', 'unusual_transaction' => 'Sensitive transaction', ], request('alert_type'), ['class' => 'form-control']) !!}
{!! Form::label('severity', 'Severity') !!} {!! Form::select('severity', ['' => 'All', 'critical' => 'Critical', 'warning' => 'Warning', 'info' => 'Information'], request('severity'), ['class' => 'form-control']) !!}
{!! Form::label('location_id', 'Branch') !!} {!! Form::select('location_id', $locations, request('location_id'), ['class' => 'form-control select2', 'placeholder' => 'All branches', 'style' => 'width:100%']) !!}
{!! Form::close() !!}

Alerts

Conditions are refreshed whenever this page opens.
@forelse($alerts as $alert) @empty @endforelse
Severity Alert Branch Occurred Status Actions
{{ ucfirst($alert->severity) }} {{ $alert->title }}
{{ $alert->message }}
@if($alert->alert_type === 'payment_mismatch') Open payment reconciliation @elseif($alert->alert_type === 'expiring_voucher' && !empty($alert->entity_id)) Open stored-value account @endif
{{ $alert->location->name ?? 'All / Not assigned' }} {{ optional($alert->occurred_at)->format('M d, Y h:i A') }} {{ ucfirst($alert->status) }} @if((auth()->user()->can('operational_alerts.manage') || auth()->user()->can('business_settings.access') || auth()->user()->can('superadmin')) && $alert->status === 'open') {!! Form::open(['route' => ['operational-alerts.acknowledge', $alert->id], 'method' => 'post', 'style' => 'display:inline']) !!} {!! Form::close() !!} @endif @if((auth()->user()->can('operational_alerts.manage') || auth()->user()->can('business_settings.access') || auth()->user()->can('superadmin')) && $alert->status !== 'resolved') {!! Form::open(['route' => ['operational-alerts.resolve', $alert->id], 'method' => 'post', 'style' => 'display:inline']) !!} {!! Form::close() !!} @endif
No alerts match the selected filters.
{{ $alerts->links() }}
@endsection