@extends('vendors.layout') @php Config::set('app.timezone', App\Models\BasicSettings\Basic::first()->timezone); @endphp @section('styles') @endsection @php $vendor = Auth::guard('vendor')->user(); $package = \App\Http\Helpers\VendorPermissionHelper::currentPackagePermission($vendor->id); @endphp @section('content') @if (is_null($package)) @php $pendingMemb = \App\Models\Membership::query() ->where([['vendor_id', '=', $vendor->id], ['status', 0]]) ->whereYear('start_date', '<>', '9999') ->orderBy('id', 'DESC') ->first(); $pendingPackage = isset($pendingMemb) ? \App\Models\Package::query()->findOrFail($pendingMemb->package_id) : null; @endphp @if ($pendingPackage)
{{ __('You have requested a package which needs an action (Approval / Rejection) by Admin. You will be notified via mail once an action is taken.') }}
{{ __('Pending Package') . ':' }} {{ $pendingPackage->title }} {{ $pendingPackage->term }} {{ __('Decision Pending') }}
@else
{{ __('Please purchase a new package / extend the current package.') }}
@endif @else
@if ($package_count >= 2 && $next_membership) @if ($next_membership->status == 0) {{ __('You have requested a package which needs an action (Approval / Rejection) by Admin. You will be notified via mail once an action is taken.') }}
@elseif ($next_membership->status == 1) {{ __('You have another package to activate after the current package expires. You cannot purchase / extend any package, until the next package is activated') }}
@endif @endif {{ __('Current Package') . ':' }} {{ $current_package->title }} {{ $current_package->term }} @if ($current_membership->is_trial == 1) ({{ __('Expire Date') . ':' }} {{ Carbon\Carbon::parse($current_membership->expire_date)->format('M-d-Y') }}) {{ __('Trial') }} @else ({{ __('Expire Date') . ':' }} {{ $current_package->term === 'lifetime' ? 'Lifetime' : Carbon\Carbon::parse($current_membership->expire_date)->format('M-d-Y') }}) @endif @if ($package_count >= 2 && $next_package)
{{ __('Next Package To Activate') . ':' }} {{ $next_package->title }} {{ $next_package->term }} @if ($current_package->term != 'lifetime' && $current_membership->is_trial != 1) ( {{ __('Activation Date') . ':' }} {{ Carbon\Carbon::parse($next_membership->start_date)->format('M-d-Y') }}, {{ __('Expire Date') . ':' }} {{ $next_package->term === 'lifetime' ? 'Lifetime' : Carbon\Carbon::parse($next_membership->expire_date)->format('M-d-Y') }}) @endif @if ($next_membership->status == 0) {{ __('Decision Pending') }} @endif
@endif
@endif
@foreach ($packages as $key => $package)

{{ $package->title }}

@if (isset($current_package->id) && $current_package->id === $package->id)

{{ __('Current') }}

@endif @if ($package_count >= 2) @if ($next_package) @if ($next_package->id == $package->id)

{{ __('Next') }}

@endif @endif @endif @if ($package->recommended == 1) {{ __('Recommended') }} @endif
{{ $package->price == 0 ? 'Free' : format_price($package->price) }} /{{ $package->term }}
  • {{ __('Total Services') }} {{ $package->number_of_service_add === 999999 ? '(' . __('Unlimited') . ')' : '(' . $package->number_of_service_add . ')' }}
  • {{ __('Images/Service') }} {{ $package->number_of_service_image === 999999 ? '(' . __('Unlimited') . ')' : '(' . $package->number_of_service_image . ')' }}
  • {{ __('Appointments') }} {{ $package->number_of_appointment === 999999 ? '(' . __('Unlimited') . ')' : '(' . $package->number_of_appointment . ')' }}
  • {{ __('Staffs') }} {{ $package->staff_limit === 999999 ? '(' . __('Unlimited') . ')' : '(' . $package->staff_limit . ')' }}
  • @if ($package->support_ticket_status == 1)
  • {{ __('Support Tickets') }}
  • @else
  • {{ __('Support Tickets') }}
  • @endif @if ($package->zoom_meeting_status == 1)
  • {{ __('Zoom Meeting') }}
  • @else
  • {{ __('Zoom Meeting') }}
  • @endif @if (!is_null($package->custom_features)) @php $features = explode("\n", $package->custom_features); @endphp @if (count($features) > 0) @foreach ($features as $key => $value)
  • {{ $value }}
  • @endforeach @endif @endif
@php $hasPendingMemb = \App\Http\Helpers\VendorPermissionHelper::hasPendingMembership(Auth::id()); @endphp @if ($package_count < 2 && !$hasPendingMemb)
@if (isset($current_package->id) && $current_package->id === $package->id) @if ($package->term != 'lifetime' || $current_membership->is_trial == 1) {{ __('Extend') }} @endif @else {{ __('Buy Now') }} @endif
@endif
@endforeach
@endsection