@extends('layouts.app') {{-- Use your main layout file --}} {{-- Use the campaign title for the page title --}} @section('title', $campaign->title) @section('content') {{-- Back Navigation Link --}}
← Back to Campaigns List
{{-- Main Content Container --}}
{{-- Header Section with Image and Title/Actions --}}
{{-- Feature Image --}}
@if ($campaign->image_path) {{ $campaign->title }} @else {{-- Placeholder if no image --}}
{{-- Placeholder SVG --}}
@endif
{{-- Title, Status, Actions --}}

{{ $campaign->title }}

{{-- Status and Type Badges --}}
@if ($campaign->enabled) Enabled @else Disabled @endif Type: {{ $campaign->type }}
{{-- Timestamps --}}

Created: {{ $campaign->created_at->format('M d, Y H:i') }} ({{ $campaign->created_at->diffForHumans() }})
Last Updated: {{ $campaign->updated_at->format('M d, Y H:i') }} ({{ $campaign->updated_at->diffForHumans() }})

{{-- Action Buttons --}}
{{-- Edit Button --}} Edit {{-- Delete Button (Form) --}}
@csrf @method('DELETE')
{{-- End Header Section --}} {{-- Description Section --}} @if ($campaign->description)

Description

{{-- Basic prose styling for paragraphs, lists etc. within description --}}
{!! nl2br(e($campaign->description)) !!} {{-- Use nl2br to convert newlines, escape content --}}
@endif {{-- Notes Section (Conditional) --}} @if ($campaign->notes)

Notes

{!! nl2br(e($campaign->notes)) !!}
@endif {{-- Shipping Address Section --}}
{{-- Section Header with Icon --}}
{{-- Map Pin Icon --}}

Shipping Address

{{-- Link to edit campaign page --}} {{ $campaign->shippingAddress ? 'Change Address' : 'Set Address' }}
@if ($campaign->shippingAddress) {{-- Display the address if it exists --}}
@if ($campaign->shippingAddress->nickname)

{{ $campaign->shippingAddress->nickname }}

@endif {{-- Use div instead of
to avoid default italics --}}
{{ $campaign->shippingAddress->address_line_1 }}
@if ($campaign->shippingAddress->address_line_2) {{ $campaign->shippingAddress->address_line_2 }}
@endif {{ $campaign->shippingAddress->city }}, {{ $campaign->shippingAddress->state }} {{ $campaign->shippingAddress->zip_code }} {{-- Optional:
{{ $campaign->shippingAddress->country }} --}}
@else {{-- Display warning message if no address is associated --}}
{{-- Yellow warning style --}}
{{-- Heroicon: exclamation-triangle --}}

No Shipping Address associated with this campaign. Set one now?

@endif
{{-- Selected Email Template Section --}}
@if ($campaign->selectedEmailTemplate)

{{ $campaign->selectedEmailTemplate->name }}

Subject: {{ $campaign->selectedEmailTemplate->subject_template }}

@else

Default system email will be used for receipts.

@endif
{{-- Associated Products Section --}}

Associated Products

Manage Products
{{-- Display currently associated products --}} {{-- Ensure $campaign->products is loaded --}} @php $campaign->loadMissing('products'); @endphp @if ($campaign->products->count() > 0) @else

No products are currently associated with this campaign.

@endif
{{-- End Main Content Container --}} @endsection