@if ($vendorId != 0)
@if ($current_package != '[]')
@if (vendorTotalAddedListing($vendorId) >= $current_package->number_of_listing)
{{ __('You cannot add more listings for this vendor. Vendor will need to upgrade his plan') }}
@php
$can_listing_add = 2;
@endphp
@else
@php
$can_listing_add = 1;
@endphp
@endif
@else
@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
@php
$newMemb = \App\Models\Membership::query()
->where([['vendor_id', '=', $vendor_id], ['status', 0]])
->first();
@endphp
@if ($newMemb)
{{ __('Your membership is expired. Please purchase a new package / extend the current package.') }}
@endif
{{ __('Please purchase a new package to add Listing.') }}
@endif
@php
$can_listing_add = 0;
@endphp
@endif
@endif