@foreach($packages as $package) @php $packageAllModules = array_merge( $package->modules->pluck('name')->toArray(), $package->additional_features ? json_decode($package->additional_features, true) : [] ); @endphp

{{ $package->package_name }}

@if ($package->package_type == \App\Enums\PackageType::LIFETIME) {{ global_currency_format($package->price, $package->currency_id) }} {{ __('modules.package.payOnce') }} @elseif($monthlyPackages->count() > 0) {{ global_currency_format($package->monthly_price, $package->currency_id) }} {{ __('modules.package.payMonthly') }} @endif

@if($package->package_type == \App\Enums\PackageType::STANDARD && !is_null($package->annual_price) && $annualPackages->count() > 0)

{{ global_currency_format($package->annual_price, $package->currency_id) }} {{ __('modules.package.payAnnually') }}

@endif
@lang('landing.getStarted')
@foreach($modules as $moduleName) @php $isEnabled = in_array($moduleName, $packageAllModules); $showLimit = false; $limitValue = null; // Check if this module should show limit count if ($isEnabled) { if ($moduleName === 'Menu Item') { $showLimit = true; $limitValue = $package->menu_items_limit; } elseif ($moduleName === 'Order') { $showLimit = true; $limitValue = $package->order_limit; } elseif ($moduleName === 'Staff') { $showLimit = true; $limitValue = $package->staff_limit; } } @endphp
{{ __('permissions.modules.'.$moduleName) }} @if ($showLimit && $limitValue !== null) @if ($limitValue == -1) (Unlimited) @else @if ($moduleName === 'Order') ({{ number_format($limitValue) }} per day) @else ({{ number_format($limitValue) }}) @endif @endif @endif
@if (!$showLimit) @if($isEnabled) @else @endif @endif
@endforeach
@endforeach