@extends('layouts.app', ['title' => __tr('Dashboard')]) @php $vendorIdOrUid = $vendorIdOrUid ?? getVendorUid(); if(!isset($vendorViewBySuperAdmin)) { $vendorViewBySuperAdmin = null; } @endphp @section('content') {{-- Use a more modern header section with a gradient background --}} @if(hasCentralAccess()) @include('users.partials.header', [ 'title' => __tr('', ['__vendorTitle__' => $vendorInfo['title'] ?? getVendorSettings('title')]), 'description' => '' ]) @else @include('users.partials.header', [ 'title' => __tr('Hi __userFullName__,', ['__userFullName__' => getUserAuthInfo('profile.first_name')]), 'description' => 'Welcome back! Here\'s a quick overview of your dashboard.' ]) @endif @php $isExtendedLicence = (getAppSettings('product_registration', 'licence') === 'dee257a8c3a2656b7d7fbe9a91dd8c7c41d90dc9'); $UserVendorInfo = getUserAuthInfo(); @endphp
{{-- Added mt--7 for overlap effect --}} {{-- Breadcrumb for Central Access --}} @if(hasCentralAccess()) @php $currentActivePlanDetails = getVendorCurrentActiveSubscription($vendorInfo['id']); $planDetails = vendorPlanDetails(null, null, $vendorInfo['id']); @endphp

{{__tr('__vendorTitle__', ['__vendorTitle__' => $vendorInfo['title'] ?? getVendorSettings('title')])}} Dashboard

@endif {{-- Header Cards --}} @include('layouts.headers.cards') {{-- Alerts Section with a unified, cleaner look --}} @if(hasVendorAccess() || $vendorViewBySuperAdmin)
{{-- WhatsApp Token Expired --}} @if (getVendorSettings('whatsapp_access_token_expired', null, null, $vendorIdOrUid))
{{ __tr('WhatsApp Token Expired') }}

{{ __tr('Your WhatsApp token seems to be expired. Please generate a new, permanent token and save it to continue sending messages.') }}

{{ __tr('Cloud API setup') }}
@elseif(!isWhatsAppBusinessAccountReady($vendorIdOrUid))
{{ __tr('WhatsApp Setup is Incomplete') }}

{{ __tr('You are not ready to send messages. Please complete the WhatsApp setup process to get started.') }}

{{ __tr('Complete your WhatsApp Cloud API setup') }}
@endif {{-- Pusher Setup Warning --}} @if (getAppSettings('pusher_by_vendor') && !getVendorSettings('pusher_app_id', null, null, $vendorIdOrUid))
{{ __tr('Realtime Communication Not Configured') }}

{!! __tr('Pusher keys need to be set for realtime features like Chat. You can get them from __pusherLink__.', [ '__pusherLink__' => 'pusher.com' ]) !!}

{{ __tr('Pusher Configuration') }}
@endif
{{-- Quick Start Section with a more visual, step-by-step approach --}} @if(!$vendorViewBySuperAdmin)

{{ __tr('Quick Start Guide') }}

1
{{ __tr('Login to Facebook') }}

{{ __tr('Start by logging into your Facebook account to link it with your business setup.') }}

2
{{ __tr('Complete WhatsApp Cloud API Setup') }}

{!! __tr('Follow the steps in the __cloudApiSetupLink__ to connect your WhatsApp Business Account.', [ '__cloudApiSetupLink__' => ''. __tr('WhatsApp Cloud API Setup').'' ]) !!}

3
{{ __tr('Sync WhatsApp Templates') }}

{!! __tr('Manage and sync your official WhatsApp templates at __manageTemplatesLink__.', [ '__manageTemplatesLink__' => ''. __tr('Manage WhatsApp Templates').'' ]) !!}

4
{{ __tr('Create Contact Groups') }}

{!! __tr('Organize your contacts efficiently by creating groups using __manageGroupsLink__.', [ '__manageGroupsLink__' => ''. __tr('Manage Groups').'' ]) !!}

5
{{ __tr('Add & Upload Contacts') }}

{!! __tr('Create individual contacts or upload an Excel file at __manageContactsLink__.', [ '__manageContactsLink__' => ''. __tr('Manage Contacts').'' ]) !!}

6
{{ __tr('Create & Schedule Campaigns') }}

{!! __tr('Build and schedule your messaging campaigns to reach your audience at __manageCampaignsLink__.', [ '__manageCampaignsLink__' => ''. __tr('Manage Campaigns').'' ]) !!}

@endif @endif {{-- Vendor Details & Plan section with a two-column, card-based layout --}} @if(hasCentralAccess())
{{-- total groups --}}
{{ __tr('Total Groups') }}
{{-- total contacts --}}
{{ __tr('Total Contacts') }}
{{-- /total contacts --}} {{-- total totalCampaigns --}}
{{ __tr('Total Campaigns') }}
{{-- /total totalCampaigns --}} {{-- total totalTemplates --}}
{{ __tr('Total Templates') }}
{{-- /total totalTemplates --}} {{-- total totalBotReplies --}}
{{ __tr('Total Bot Replies') }}
{{-- /total totalBotReplies --}} {{-- total active team member --}}
{{ __tr('Active Team Members') }}
{{-- /total active team member --}} {{-- manage campaigns --}}
{{ __tr('Messages in Queue') }}
{{-- /manage campaigns --}} {{-- Messaging Processed--}}
{{ __tr('Messages Processed') }}
{{-- /Messaging Processed --}}
{{-- Put this where your existing block is (Blade) --}}
{{-- Vendor details --}}

{{ __tr('Vendor Details') }}

{{ __tr('Login') }}
  • {{ __tr('Vendor Title:') }} {{ $vendorInfo['title'] ?? getVendorSettings('title') }}
  • {{ __tr('Account Status:') }} {{ $vendorInfo['status']==0 ? __tr('Inactive') : configItem('status_codes',$vendorInfo['status']) }}
  • {{ __tr('Created On:') }} {{ formatDate($vendorUserData['created_at']) }}
{{-- Admin User --}}

{{ __tr('Admin User') }}

  • {{ __tr('Name:') }} {{ maskForDemo($vendorUserData['first_name'].' '.$vendorUserData['last_name']) }}
  • {{ __tr('Username:') }} {{ maskForDemo($vendorUserData['username']) }}
  • @if($vendorUserData['mobile_number'])
  • {{ __tr('Phone:') }} {{ maskForDemo($vendorUserData['mobile_number']) }}
  • @endif
  • {{ __tr('Email:') }} {{ maskForDemo($vendorUserData['email']) }}
  • {{ __tr('Status:') }} {{ $vendorUserData['status']==0 ? __tr('Inactive') : configItem('status_codes', $vendorUserData['status']) }}
{{-- Current Subscribed Plan --}}
@php $planStructure = $planDetails->plan_id ? getPaidPlans($planDetails->plan_id) : getFreePlan(); $planCharges = $planStructure['charges'][$planDetails->frequency] ?? null; @endphp

{{ __tr('Subscribed Plan') }}

@if ($planDetails->hasActivePlan())
  • {{ __tr('Plan Title:') }} {{ $planDetails->planTitle() }}
  • @if($planCharges)
  • {{ __tr('Current Plan Charges:') }} {{ $planCharges['title'] ?? '' }} {{ formatAmount($planCharges['charge'], true) }}
  • @endif
  • {{ __tr('Status:') }} {{ $planDetails['subscription_type']=='manual' ? configItem('subscription_status',$currentActivePlanDetails['status']) : ($planDetails['subscription_type']=='auto' ? configItem('subscription_status',$currentActivePlanDetails['stripe_status']) : __tr('Active')) }}
  • {{ __tr('Subscription Type:') }} {{ configItem('subscription_methods',$planDetails['subscription_type'])}}
  • {{ __tr('Expire On:') }} {{ $planDetails['ends_at'] ? formatDate($planDetails['ends_at']) : 'NA' }}
@else
{{ __tr('Vendor does not have any active plan.') }}
@endif
{{-- Button at the bottom --}} @if ($isExtendedLicence) @endif
{{-- Plan Features --}}

{{ __tr('Plan Features') }}

@if(!empty($planStructure['features']))
    @foreach ($planStructure['features'] as $feature)
  • {{ $feature['description'] }} @if (isset($feature['limit']) && $feature['limit'] >= 0) {{ $feature['limit'] }} {{ $feature['limit_duration_title'] ?? '' }} @elseif (isset($feature['limit']) && $feature['limit'] < 0) {{ __tr('Unlimited') }} @endif
  • @endforeach
@else
{{ __tr('No features available.') }}
@endif
@endif
@if ($isExtendedLicence)
{{ __tr('It will cancel all the existing active subscriptions and create a new subscription') }}
@foreach (getPaidPlans() as $paidPlanKey => $paidPlan) @foreach ($paidPlan['charges'] as $planChargeKey => $planCharge) @endforeach @endforeach
@else
{{ __tr('Extended licence required to enable manage subscription') }}
@endif
{{-- Demo Vendor Alerts --}} @if(isThisDemoVendorAccountAccess())

{{ __tr('Demo Account') }}

{{ __tr('Contacts created here with your numbers will be deleted frequently. Add your number to allow for test.') }}

{{ __tr('You can use Facebook Test Number to test system easily.') }}

{{ __tr('Add Numbers for Test') }}
@include('vendors.demo-instructions') @endif @push('head')