@extends('layouts.main_dashboard.app') @php $isArabic = app()->getLocale() === 'ar'; $items = $inquiries->getCollection(); @endphp @section('title', $isArabic ? 'استفسارات أولياء الأمور' : 'Parent Inquiries') @section('page_heading', $isArabic ? 'استفسارات أولياء الأمور' : 'Parent Inquiries') @section('page_subtitle', $isArabic ? 'كل رسائل أولياء الأمور المرتبطة بمساقاتك مجمعة في شاشة مستقلة.' : 'All parent messages related to your courses gathered in one dedicated screen.') @section('skip_page_hero', true) @section('content')

{{ $isArabic ? 'المعروضة الآن' : 'Visible now' }}

{{ $items->count() }}

{{ $isArabic ? 'بانتظار الرد' : 'Awaiting reply' }}

{{ $openCount }}

{{ $isArabic ? 'آخر استفسار' : 'Latest inquiry' }}

{{ $latestInquiry?->created_at?->format('Y-m-d') ?? '—' }}

{{ $isArabic ? 'رسائل أولياء الأمور' : 'Parent messages' }}

@if($items->isEmpty())
{{ $isArabic ? 'لا توجد استفسارات من أولياء الأمور حاليًا.' : 'There are no parent inquiries right now.' }}
@else
@foreach($items as $inquiry)

{{ $inquiry->title }}

{{ filled($inquiry->teacher_reply) ? ($isArabic ? 'تم الرد' : 'Answered') : ($isArabic ? 'بانتظار الرد' : 'Awaiting reply') }}
{{ $isArabic ? 'ولي الأمر:' : 'Parent:' }} {{ $inquiry->parentUser?->name ?? '—' }} {{ $isArabic ? 'الابن:' : 'Child:' }} {{ $inquiry->student?->name ?? '—' }} {{ $isArabic ? 'المساق:' : 'Course:' }} {{ $inquiry->course?->name ?? '—' }}

{{ \Illuminate\Support\Str::limit($inquiry->message, 200) }}

{{ __('dashboard.View & Reply') }}
@endforeach
{{ $inquiries->links('pagination::simple-tailwind') }}
@endif
@endsection