@extends('layouts.app') @section('title', 'Templates de Notificação') @section('page-title', '🔔 Templates de Notificação') @section('content')
{{-- Stats --}}
✅
{{ $totalActive }}
Templates Ativos
⏸️
{{ $totalInactive }}
Templates Inativos
📤
{{ $sentToday }}
Enviadas Hoje
📊
{{ $sentMonth }}
Enviadas no Mês
{{-- Toolbar --}}
Novo
{{-- Alertas --}} @if(session('success')) @endif @if(session('error')) @endif {{-- Templates agrupados por categoria --}} @php $grouped = $templates->groupBy('category'); @endphp @foreach($categories as $catKey => $catLabel) @if($grouped->has($catKey))
@php $catIcons = ['order'=>'🛍️','delivery'=>'🚴','driver'=>'👷','store'=>'🏪','admin'=>'🔧','customer'=>'👤','finance'=>'💰','system'=>'⚙️']; @endphp {{ $catIcons[$catKey] ?? '🔔' }} {{ $catLabel }} {{ $grouped[$catKey]->count() }}
@foreach($grouped[$catKey] as $tpl) @endforeach
Nome Trigger Canal Destinatário Status Ações
{{ $tpl->name }}
@if($tpl->is_system) Sistema @endif
{{ $tpl->trigger }} @php $chIcons = ['whatsapp'=>'🟢','push'=>'🔔','in_app'=>'💬','all'=>'📡']; @endphp {{ $chIcons[$tpl->channel] ?? '' }} {{ $tpl->channel_label }} @php $recColors = ['customer'=>'primary','driver'=>'warning','store_owner'=>'success','admin'=>'danger','store_team'=>'info']; @endphp {{ $tpl->recipient_label }}
@csrf
@if(!$tpl->is_system)
@csrf @method('DELETE')
@endif
@endif @endforeach {{ $templates->links() }} {{-- Logs link --}}
Ver log de envios
{{-- Test Modal --}} @endsection @push('scripts') @endpush