@extends('layouts.app') {{-- Use your main layout file --}} @section('title', 'Dashboard') @section('content') {{-- Alpine component to manage view state for this page, default is 'grid' --}}
{{-- Header Row: Title, Add Buttons, View Toggle --}}

Dashboard

{{-- Action Buttons Container --}}
{{-- Add Conventional Product Button --}} + Add Conventional Product {{-- Add Amazon Business Product Button --}} + Add Amazon Business Product {{-- Add New Campaign Button/Link --}} + Add Campaign {{-- View Mode Toggle Buttons --}}
{{-- Welcome Block --}}

Welcome{{ Auth::check() ? ', ' . e(Auth::user()->name) : '' }}!

Here's a quick overview of your recent activity in the Mindful Giving app.

{{-- Stats Block --}}
{{-- Total Campaigns Stat --}}
{{-- Tag Icon --}}
Total Campaigns
{{ $totalCampaigns }}
{{-- Total Products Stat --}}
{{-- Archive Box Icon --}}
Total Products Added
{{ $totalProducts }}
{{-- API Health Check Block (Async) --}}
{{-- Icons based on apiStatus --}} {{-- Status Text --}}

Amazon Business API Status

Checking...

{{-- Main Content Grid (Campaigns & Products) --}}
{{-- Latest Campaigns Section --}}
{{-- Header --}}

Latest Campaigns

{{-- List View Container --}} {{-- Grid View Container --}}
@forelse ($latestCampaigns as $campaign) {{-- Campaign Card --}}
@if ($campaign->image_path) {{ $campaign->title }} @else
@endif

{{ $campaign->title }}

@if ($campaign->enabled) Enabled @else Disabled @endif {{ $campaign->type }}

Updated {{ $campaign->updated_at->diffForHumans() }}

@empty

No campaigns found yet.

Create one?
@endforelse
{{-- Latest Products Section --}}
{{-- Header --}}

Latest Products Added

{{-- List View Container --}} {{-- Grid View Container --}}
@forelse ($latestProducts as $product) {{-- Product Card --}}
@if ($product->image_url) {{ $product->name }} @else
@endif

{{ $product->name }}

ASIN: {{ $product->asin }} @if ($product->campaign) Campaign: {{ $product->campaign->title }} @endif
@empty

No products have been added via the search yet.

Search & Add Products?
@endforelse
{{-- End Main Content Grid --}}
{{-- End Alpine Component --}} @endsection