@extends('layouts.dashboard') @section('title', t('إدارة الاشتراك','Manage Subscription')) @section('page-title','💳 '.t('إدارة الاشتراك','Manage Subscription')) @section('content')
{{-- LEFT: Subscription Info --}}

📋 {{ t('تفاصيل الاشتراك','Subscription Details') }}

← {{ t('رجوع','Back') }}
{{-- Status Banner --}}
{{ ['active'=>'✅','expired'=>'⏰','suspended'=>'⛔'][$sub->status]??'•' }} {{ ['active'=>t('نشط','Active'),'expired'=>t('منتهي','Expired'),'suspended'=>t('موقوف','Suspended')][$sub->status]??$sub->status }}
{{ $sub->plan->name ?? $sub->plan_id }}
{{ t('العضو','Member') }}{{ $sub->user->name ?? '—' }}
{{ $sub->user->email ?? '' }}
{{ t('الخطة','Plan') }}{{ $sub->plan->name ?? $sub->plan_id }}
{{ t('License Key','License Key') }} {{ $sub->license_key }}
{{ t('المواقع المسموحة','Sites Allowed') }}{{ $sub->sites_allowed }}
{{ t('تاريخ الانتهاء','Expires') }} @if($sub->expires_at) @php $expired = \Carbon\Carbon::parse($sub->expires_at)->isPast(); @endphp {{ $sub->expires_at }} @if($expired) {{ t('منتهي','Expired') }}@endif @else ♾️ {{ t('مدى الحياة','Lifetime') }} @endif
{{ t('تاريخ الإنشاء','Created') }}{{ $sub->created_at->format('Y-m-d H:i') }}
{{-- Quick Actions --}}

⚡ {{ t('إجراءات سريعة','Quick Actions') }}

@if($sub->status !== 'active')
@csrf
@endif @if($sub->status === 'active')
@csrf
@endif
@csrf
@csrf
@csrf @method('DELETE')
{{-- RIGHT: Upgrade + Extend --}}
{{-- Upgrade Plan --}}

⬆️ {{ t('ترقية/تغيير الخطة','Upgrade / Change Plan') }}

@csrf
{{ t('اتركه فارغاً للحساب التلقائي','Leave empty for auto-calculation') }}
{{-- Extend Expiry --}}

📅 {{ t('تمديد الاشتراك','Extend Subscription') }}

@csrf
@foreach([7,30,90,180,365] as $d) @endforeach
{{-- Active Sites --}}

🌐 {{ t('المواقع المفعّلة','Active Sites') }}

@php $sites = \Illuminate\Support\Facades\DB::table('ms_license_sites')->where('license_key',$sub->license_key)->get(); @endphp @forelse($sites as $site)
{{ $site->site_url }}
{{ $site->plugin }} | {{ $site->last_check ?? $site->activated_at }}
@csrf
@empty

{{ t('لا يوجد مواقع مفعّلة','No active sites') }}

@endforelse
@endsection