@extends('admin._layout') @section('title', 'العيادات') @push('head') @endpush @php $statusMeta = [ 'active' => ['label' => 'نشطة', 'color' => 'success', 'icon' => 'check'], 'trial' => ['label' => 'تجريبية', 'color' => 'warning', 'icon' => 'hourglass'], 'suspended' => ['label' => 'موقوفة', 'color' => 'danger', 'icon' => 'ban'], 'expired' => ['label' => 'منتهية', 'color' => 'secondary', 'icon' => 'calendar-x'], 'pending' => ['label' => 'معلّقة', 'color' => 'info', 'icon' => 'clock'], ]; $current = request('status'); $sort = request('sort', 'latest'); @endphp @section('content')
@if(request('q') || request('status')) جرّب تغيير الفلاتر أو عرض كل العيادات. @else ابدأ بإضافة أول عيادة. @endif
@if(! (request('q') || request('status'))) إنشاء عيادة جديدة @endif| العيادة | الباقة | الحالة | المتبقي | الأطباء | المرضى | تاريخ الإنشاء | الإجراءات |
|---|---|---|---|---|---|---|---|
|
{{ $initials ?: '?' }}
{{ $c->name }}
{{ $c->owner_email }}
@if($c->currency)
@php $ccyMeta = \App\Support\Currency::meta($c->currency); @endphp
· {{ $ccyMeta['flag'] }} {{ $c->currency }}
@endif
@if($c->phone)
{{ $c->phone }}
@endif
|
@if($plan)
@php
$clinicCcy = strtoupper($c->currency ?? 'SAR');
$planPrice = $plan->priceFor($clinicCcy);
$shownCcy = $planPrice > 0 ? $clinicCcy : strtoupper($plan->currency);
if ($planPrice <= 0) {
$planPrice = (float) $plan->price;
}
@endphp
{{ $plan->name }}
{{ number_format($planPrice, 0) }} {{ $shownCcy }}
/ {{ $plan->duration_days }} يوم
@else
— بدون باقة
@endif
|
{{ $sm['label'] }} | @if($daysLeft !== null) {{ $daysLeft }} يوم @else — @endif |
@if($m['reachable'] ?? false)
{{ $m['doctors'] ?? 0 }}
@if($plan && $plan->max_doctors) / {{ $plan->max_doctors }} @endif
@if($docPct !== null){{ $docPct }}%@endif
@if($plan && $plan->max_doctors)
|
@if($m['reachable'] ?? false)
{{ number_format($m['patients'] ?? 0) }}
@if($plan && $plan->max_patients) / {{ number_format($plan->max_patients) }} @endif
@if($patPct !== null){{ $patPct }}%@endif
@if($plan && $plan->max_patients)
|
{{ $c->created_at->translatedFormat('j M Y') }}
{{ $c->created_at->diffForHumans() }}
|