@php use App\Enums\Subscription\SubscriptionPlanKeyEnum; use App\Enums\Payment\PaymentTypeEnum; @endphp @extends('layouts.seller.app', ['page' => $menuSeller['subscriptions']['active'] ?? "", 'sub_page' => $menuSeller['subscriptions']['route']['plans']['sub_active'] ?? null]) @section('title', __('labels.subscription_plan_details')) @php $limitMap = $plan->limits?->pluck('value','key')->toArray() ?? []; $currency = $systemSettings['currencySymbol'] ?? ($subscriptionSettings['currencySymbol'] ?? '$'); @endphp @section('seller-content')
{{ $plan->name }}
{{ $plan->is_free ? __('labels.free') : $currency . number_format((float)($plan->price ?? 0), 2) }}
{{ __('labels.duration') }}: {{ $plan->duration_type === 'unlimited' ? __('labels.unlimited') : (($plan->duration_days ?? 0).' '.__('labels.days')) }}
@if($plan->is_default) {{ __('labels.default_plan') }} @endif {{--@dd($eligible)--}} @foreach ($eligible['details'] as $key => $item) @php $used = $item['used']; $limit = $item['limit']; $ok = $item['ok']; $percent = $limit > 0 ? round(($used / $limit) * 100) : 0; $barClass = $percent >= 90 ? 'bg-danger' : ($percent >= 70 ? 'bg-warning' : ''); $label = ucwords(str_replace('_', ' ', $key)); @endphp
{{ $percent }}% Complete
@endforeach @if(($eligible['eligible'] ?? false) && $buyPermission)
@csrf
@elseif(!($eligible['eligible'] ?? false)) @endif @if(($eligible['eligible'] ?? false) && !$buyPermission) @endif

{{ __('labels.plan_configurations') }}

{{$plan->description}}

@foreach(SubscriptionPlanKeyEnum::values() as $key) @endforeach
{{ __('labels.configuration') }} {{ __('labels.value') }}
{{ \Illuminate\Support\Str::replace('_',' ', $key) }} {{ $limitMap[$key] ?? __('labels.unlimited') }}
@endsection