@extends('business::layouts.app') @section('title', $template->name . ' — BizWap') @section('content')

{{ $template->name }}

{{ $template->category }} · {{ $template->language }} · Created {{ $template->created_at->format('d M Y') }}

{{ $template->status }}
@if(session('success')) @endif @if(session('error')) @endif
{{-- Left: Details --}}
@if($template->status === 'REJECTED' && $template->rejection_reason)
Rejected by Meta: {{ $template->rejection_reason }}
@endif @if($template->meta_error)
Last sync error from Meta

"{{ $template->meta_error['message'] ?? 'Unknown error' }}"

@if(!empty($template->meta_error['fbtrace_id']))

Trace ID: {{ $template->meta_error['fbtrace_id'] }}

@endif

Contact support if this persists.

@endif @if($template->status === 'DRAFT')
This template is a draft. Our team will review and submit it to Meta on your behalf.
@endif
Template Content
@if($template->header_text)

Header

{{ $template->header_text }}


@endif

Body

{{ $template->body }}

@if($template->footer)

Footer

{{ $template->footer }}

@endif @if(!empty($template->buttons))

Buttons

@foreach($template->buttons as $button) @if($button['type'] === 'QUICK_REPLY') @else @endif {{ $button['text'] }} @if(!empty($button['url'])) ({{ $button['url'] }}) @endif @endforeach
@endif
@if(!empty($template->body_examples) || !empty($template->header_examples))
Variable Examples
@if(!empty($template->header_examples))

Header:

@foreach($template->header_examples as $i => $ex) {{{{ $i + 1 }}}} = {{ $ex }} @endforeach @endif @if(!empty($template->body_examples))

Body:

@foreach($template->body_examples as $i => $ex) {{{{ $i + 1 }}}} = {{ $ex }} @endforeach @endif
@endif
{{-- Right: Preview + Actions + Meta Info --}}
{{-- WhatsApp Preview --}}
Preview
@if($template->header_text)
{{ $template->header_text }}
@endif
{{ $template->body }}
@if($template->footer)
{{ $template->footer }}
@endif
@if(!empty($template->buttons))
@foreach($template->buttons as $button)
@if($button['type'] === 'QUICK_REPLY') @else @endif {{ $button['text'] }}
@endforeach
@endif
@if($template->status !== 'DRAFT')
Sync Status

Check if Meta has approved or updated your template status.

@csrf
@endif
Details
Category
{{ $template->category }}
Language
{{ $template->language }}
@if($template->meta_template_id)
Meta ID
{{ $template->meta_template_id }}
@endif @if($template->submitted_at)
Submitted
{{ $template->submitted_at->format('d M Y, H:i') }}
@endif
Created
{{ $template->created_at->format('d M Y') }}
@endsection