@extends('dashboard.layouts.master') @section('title', 'Dashboard Overview') @php $isAffiliater = isAffiliater(); @endphp @section('content')
@if($isAffiliater)

Welcome to Zuwa Cosmetics

Welcome back! Here's what's happening with your affiliation.

@else

Dashboard Overview

Welcome back! Here's what's happening with your platform.

@endif

Total Users

{{ $userCount }}

+{{ $newUsersThisMonth }} this month
@if(!isAffiliater())

Total Products

{{ $productCount ?? 0 }}

Manage Products

Total Message Credits Used

{{ number_format($totalCreditsUsed, 2) }}

Across all messages
@endif

Total Pending Orders

{{ $pendingOrders ?? 0 }}

View pending orders

New Users

{{ $newUsersThisMonth }}

This month
@if(!isAffiliater())

Total Sales Amount

{{ number_format($totalSalesAmount, 2) }}

All time sales

Pending Sales Amount

{{ number_format($pendingSalesAmount, 2) }}

Awaiting processing

Processing Sales Amount

{{ number_format($processingSalesAmount, 2) }}

Being processed

Delivered Sales Amount

{{ number_format($deliveredSalesAmount, 2) }}

Successfully delivered

Cancelled Sales Amount

{{ number_format($cancelledSalesAmount, 2) }}

Orders rejected
@endif
@if(isAffiliater())

Total Earnings

{{ $totalEarnings ?? 0 }}

View Earnings

Approved Earnings

{{ $approvedEarnings }}

Pending Earnings

{{ $pendingEarnings }}

@php $referralCode = auth()->user()->ref_code; @endphp

Your Referral Tools

Share your referral code and link to earn more!

Any links at {{ config('app.name') }} that include this code will credit you with the referral.
Share this link to earn commissions on referred sales.
@endif @if(!isAffiliater())
@endif
@endsection