@extends('layouts.dashboard') @section('title', 'Message Templates') @section('page-title', 'Message Templates') @section('content')
Showing {{ $templates->count() }} of {{ $templates->total() }} templates
@forelse($templates as $template)
{{ $template->name }}
@if($template->is_default) Default @endif @if($template->is_active) Active @else Inactive @endif
{{ ucfirst(str_replace('_', ' ', $template->type ?? 'auto_reply')) }} @php $channelBadge = match($template->channel ?? 'sms') { 'whatsapp' => 'bg-success', default => 'bg-primary', }; $channelLabel = match($template->channel ?? 'sms') { 'whatsapp' => 'WhatsApp', default => 'SMS', }; @endphp @if(($template->channel ?? 'sms') == 'whatsapp') @else @endif {{ $channelLabel }} {{ ucfirst($template->call_type ?? 'all') }} @if($template->priority > 0) Priority: {{ $template->priority }} @endif

{{ Str::limit($template->content, 120) }}

@empty

No message templates found

Create Your First Template
@endforelse
{{ $templates->withQueryString()->links() }}
@endsection