@extends('layouts.superadmin') @section('title','أرشيف الرسائل — ProSanta') @section('content') @php use Illuminate\Support\Str; $fromVal = request('from', isset($from) ? (is_string($from) ? $from : $from->toDateString()) : now()->subDays(14)->toDateString()); $toVal = request('to', isset($to) ? (is_string($to) ? $to : $to->toDateString()) : now()->toDateString()); $qVal = request('q', ''); @endphp
{{-- HERO --}}
ProSanta • إدارة الأرشيفات • SuperAdmin

أرشيف الرسائل للإدارة

هنا تظهر الرسائل التي تم أرشفتها (من المرسل أو المستلم). تستطيع استعراضها، التدقيق عليها، أو إلغاء الأرشفة عند الحاجة.

النتائج: {{ method_exists($messages,'total') ? number_format($messages->total()) : number_format($messages->count()) }} أرشيف
{{-- FILTER --}}
فلترة الأرشيف
بحث + فترة
إعادة ضبط
{{-- FLASH --}} @if(session('success'))
{{ session('success') }}
@endif {{-- TABLE --}}

سجل الأرشيف

إلغاء الأرشفة يعيد الرسالة لعرضها الطبيعي.

كل الرسائل
@forelse($messages as $m) @php $archType = '—'; if((int)($m->archived_by_receiver ?? 0) === 1 && (int)($m->archived_by_sender ?? 0) === 1) { $archType = 'للجميع'; } elseif((int)($m->archived_by_receiver ?? 0) === 1) { $archType = 'وارد'; } elseif((int)($m->archived_by_sender ?? 0) === 1) { $archType = 'صادر'; } @endphp @empty @endforelse
# من إلى الموضوع مقتطف نوع الأرشفة التاريخ إجراء
#{{ $m->id }}
{{ $m->sender->name ?? ('User#'.$m->sender_id) }}
{{ $m->sender->email ?? '' }}
{{ $m->receiver->name ?? ('User#'.$m->receiver_id) }}
{{ $m->receiver->email ?? '' }}
{{ $m->subject ?? '(بدون موضوع)' }}
{{ Str::limit($m->body ?? '', 110) }} {{ $archType }} {{ optional($m->created_at)->format('Y-m-d H:i') }}
عرض {{-- ✅ Route صحيح 100% --}}
@csrf
لا توجد رسائل مؤرشفة ضمن هذه الفلاتر.
@if(method_exists($messages,'links'))
{{ $messages->links() }}
@endif
{{-- Epic HR --}}
أرشيف الرسائل
@endsection