@extends('layouts.superadmin') @section('title', 'تعديل اللايفات غير المؤكدة') @section('page-title', 'تعديل اللايفات غير المؤكدة') @section('content') @php $badge = [ 'scheduled' => ['label'=>'مجدول','cls'=>'border-slate-700 bg-slate-800 text-slate-200'], 'pending_proof' => ['label'=>'بانتظار إثبات','cls'=>'border-sky-500/30 bg-sky-500/15 text-sky-200'], 'pending_excuse' => ['label'=>'بانتظار عذر','cls'=>'border-amber-500/30 bg-amber-500/15 text-amber-200'], 'proof_rejected' => ['label'=>'رفض الإثبات','cls'=>'border-rose-500/30 bg-rose-500/15 text-rose-200'], 'excuse_rejected'=> ['label'=>'رفض العذر','cls'=>'border-rose-500/30 bg-rose-500/15 text-rose-200'], ]; $initialView = request('view','table'); if (!in_array($initialView,['table','cards'])) { $initialView = 'table'; } @endphp
{{-- هيدر --}}

تعديل اللايفات غير المؤكدة

من هنا يمكن للإدارة تعديل الوقت و المدة بالساعات و ملاحظات اللايف فقط، لجميع اللايفات التي ما زالت في حالة غير مؤكدة، مع تسجيل كل تعديل في سجل اللايفات.

الفترة {{ $from }} → {{ $to }}
عدد اللايفات المعروضة {{ $streams->total() }}
تنبيه لا يمكن من هنا تغيير الحالة أو النقاط، فقط الوقت والساعات والملاحظات.
{{-- فلاتر --}}
{{-- KPIs --}}

الإجمالي

{{ $kpis['total'] ?? 0 }}

scheduled

{{ $kpis['scheduled'] ?? 0 }}

pending_proof

{{ $kpis['pending_proof'] ?? 0 }}

pending_excuse

{{ $kpis['pending_excuse'] ?? 0 }}

rejected

{{ $kpis['rejected'] ?? 0 }}

{{-- جدول/كروت اللايفات --}}

قائمة اللايفات غير المؤكدة

يمكنك عرض اللايفات كـ جدول لمراجعة سريعة، أو كـ كروت مريحة على الهاتف. التعديل من خلال زر "تعديل" يفتح بانيل جانبي.

{{-- جدول --}}
@forelse($streams as $s) @php $memberName = $s->user?->name ?? $s->user?->username ?? ('#'.$s->user_id); $planned = round(((int)($s->duration_hours ?? 0) * 60 + (int)($s->duration_minutes ?? 0))/60, 2); $noteFull = (string)($s->description ?? ''); $notePreview = \Illuminate\Support\Str::limit( trim(preg_replace('/\s+/', ' ', strip_tags($noteFull))), 80 ); $noteB64 = base64_encode($noteFull); // ✅ ADD: كشف ProActive (حسب الـ description أو slot_label) $isProactive = str_contains($noteFull, '[PROACTIVE_SCHEDULE_ID=') || (strcasecmp((string)($s->slot_label ?? ''), 'ProActive') === 0); @endphp {{-- ✅ إضافة بسيطة: data-time-raw عشان نقدر نطلع HH:MM ونحدّث --}} @empty @endforelse
ID العضو التاريخ الوقت الحالة النوع الساعات الملاحظات تعديل
#{{ $s->id }} {{ $memberName }} {{ (string)$s->scheduled_date }}{{ (string)$s->scheduled_time }} @php $b = $badge[$s->status] ?? ['label'=>$s->status,'cls'=>'border-slate-700 bg-slate-800 text-slate-200']; @endphp {{ $b['label'] }} {{ $s->type }} {{ $planned }} س {{ $notePreview ?: '—' }}
لا توجد لايفات غير مؤكدة ضمن الفلاتر الحالية.
@if($streams->hasPages())
{{ $streams->links() }}
@endif
{{-- كروت --}}
@forelse($streams as $s) @php $memberName = $s->user?->name ?? $s->user?->username ?? ('#'.$s->user_id); $planned = round(((int)($s->duration_hours ?? 0) * 60 + (int)($s->duration_minutes ?? 0))/60, 2); $noteFull = (string)($s->description ?? ''); $notePreview = \Illuminate\Support\Str::limit( trim(preg_replace('/\s+/', ' ', strip_tags($noteFull))), 80 ); $noteB64 = base64_encode($noteFull); $b = $badge[$s->status] ?? ['label'=>$s->status,'cls'=>'border-slate-700 bg-slate-800 text-slate-200']; // ✅ ADD: كشف ProActive (حسب الـ description أو slot_label) $isProactive = str_contains($noteFull, '[PROACTIVE_SCHEDULE_ID=') || (strcasecmp((string)($s->slot_label ?? ''), 'ProActive') === 0); @endphp
العضو {{ $memberName }} {{ (string)$s->scheduled_date }} • {{ (string)$s->scheduled_time }}
{{ $b['label'] }}
نوع: {{ $s->type }} @if($s->is_sahra) • سهرة @endif
الساعات المخططة: {{ $planned }} س
@if($notePreview) {{ $notePreview }} @else لا يوجد ملاحظات. @endif
@empty
لا توجد لايفات غير مؤكدة ضمن الفلاتر الحالية.
@endforelse
@if($streams->hasPages())
{{ $streams->links() }}
@endif
{{-- فوتر توضيحي --}}
هذه الأداة مخصّصة لصيانة ساعات وملاحظات اللايفات غير المؤكدة فقط، ولا يُسمح من خلالها بتغيير الحالة أو النقاط. أي تعديل يتم حفظه في سجل اللايفات لمرجعية الإدارة العليا.
{{-- Drawer تعديل --}} {{-- Toast --}}
{{-- ✅ ADD: Modal ملحمي لـ ProActive (منع التعديل من هنا) --}} @endsection