@extends('layouts.app', ['title' => __tr('Dashboard')]) @php $vendorIdOrUid = $vendorIdOrUid ?? getVendorUid(); if(!isset($vendorViewBySuperAdmin)) { $vendorViewBySuperAdmin = null; } @endphp @section('content') @if(hasCentralAccess()) @include('users.partials.header', [ 'title' => __tr('__vendorTitle__ Dashboard', [ '__vendorTitle__' => $vendorInfo['title'] ?? getVendorSettings('title') ]), 'description' => '', // 'class' => 'col-lg-7' ]) @endif
@if(hasCentralAccess()) @php $currentActivePlanDetails = getVendorCurrentActiveSubscription($vendorInfo['id']); $planDetails = vendorPlanDetails(null, null, $vendorInfo['id']); @endphp

@endif
@include('layouts.headers.cards') @if(hasVendorAccess() or $vendorViewBySuperAdmin )
@if (getVendorSettings('whatsapp_access_token_expired', null, null, $vendorIdOrUid))
{{ __tr('Your WhatsApp token seems to be expired, Generate new token, prefer creating permanent token and save.') }}
{{ __tr('Cloud API setup') }}
@elseif (!isWhatsAppBusinessAccountReady($vendorIdOrUid))
{{ __tr('You are not ready to send messages, WhatsApp Setup is Incomplete') }}
{{ __tr('Complete your WhatsApp Cloud API setup') }}
@endif @if (getAppSettings('pusher_by_vendor') and !getVendorSettings('pusher_app_id', null, null, $vendorIdOrUid))
{{ __tr('Pusher keys needs to setup for realtime communication like Chat etc., You can get it from __pusherLink__, choose channel and create the app to get the required keys.', [ '__pusherLink__' => 'pusher.com' ]) }}
{{ __tr('Pusher Configuration') }}
@endif @if(!$vendorViewBySuperAdmin) @endif
@endif @if(hasCentralAccess())
{{ __tr('User Details') }}

{{ __tr('User Title:') }}

{{$vendorInfo['title']}}

{{ __tr('Account Status:') }}

@if($vendorInfo['status']==0)

{{__tr('Inactive') }}

@else

{{configItem('status_codes',$vendorInfo['status'])}}

@endif

{{ __tr('Created On:') }}

{{formatDate($vendorUserData['created_at'])}}


{{ __tr('Admin User Name:') }}

{{$vendorUserData['first_name'] . ' ' . $vendorUserData['last_name']}}

{{ __tr('Username:') }}

{{$vendorUserData['username']}}

@if($vendorUserData['mobile_number'])

{{ __tr('Phone Number:') }}

{{$vendorUserData['mobile_number']}}

@endif

{{ __tr('Email:') }}

{{$vendorUserData['email']}}

{{ __tr('Admin User Status:') }}

@if($vendorUserData['status']==0)

{{__tr('Inactive') }}

@else

{{configItem('status_codes', $vendorUserData['status'])}}

@endif
@php $planStructure = $planDetails->plan_id ? getPaidPlans($planDetails->plan_id) : getFreePlan(); $planCharges = $planStructure['charges'][$planDetails->frequency] ?? null; @endphp {{ __tr('Current Subscribed Plan') }} @if ($planDetails->hasActivePlan())

{{ __tr('Plan Title:') }}

{{$planDetails->planTitle()}}

@if($planCharges)

{{ __tr('Current Plan Charges:') }}

{{ $planCharges['title'] ?? '' }} {{ formatAmount($planCharges['charge'], true) }}

@endif @if($currentActivePlanDetails) @if($planDetails['subscription_type']=='manual')

{{ __tr('Status:') }}

{{configItem('subscription_status',$currentActivePlanDetails['status'])}}

@elseif($planDetails['subscription_type']=='auto')

{{ __tr('Status:') }}

{{configItem('subscription_status',$currentActivePlanDetails['stripe_status'])}}

@else

{{ __tr('Status:') }}

{{__tr('Active') }}

@endif @endif

{{ __tr('Subscription Type:') }}

{{configItem('subscription_methods',$planDetails['subscription_type'])}}

@if($currentActivePlanDetails) {{-- check payment method is manual for payment method --}} @if($planDetails['subscription_type']=='manual')

{{ __tr('Payment Method:') }}

{{ $currentActivePlanDetails['__data']['manual_txn_details']['selected_payment_method'] ?? 'NA' }}

@endif

{{ __tr('Created On:') }}

{{formatDate($currentActivePlanDetails['created_at'])}}

@endif

{{ __tr('Expire On:') }}

{{ $planDetails['ends_at'] ? formatDate($planDetails['ends_at']): 'NA'}}

@else
{{ __tr('Vendor does not have any active plan.') }}
@endif
@endif
@if(isDemo() and isDemoVendorAccount() and hasVendorAccess())

{{ __tr('Demo Account') }}

{{ __tr('Contacts created here with your numbers will be deleted frequently.') }}

{{ __tr('If you want to test system with your own account. Facebook also provides Test Number which is very easy to setup and test. You can follow the steps given in Quick Start on dashboard to get started.') }}

@endif @push('head')