@extends('layouts.app') @section('title', 'استبيانات رضا الموظفين') @section('content')
{{ \App\Models\Survey::count() }}
إجمالي الاستبيانات
{{ \App\Models\Survey::where('status','active')->count() }}
نشطة
{{ \App\Models\SurveyResponse::count() }}
إجمالي الاستجابات
{{ number_format(\App\Models\SurveyAnswer::whereNotNull('answer_rating')->avg('answer_rating') ?? 0, 1) }}
متوسط التقييم
@forelse($surveys as $survey) @empty @endforelse
الاستبيان النوع الاستجابات الفترة الحالة الإجراءات
{{ $survey->title }} @if($survey->is_anonymous) (سري) @endif @php $types = ['satisfaction'=>'رضا','engagement'=>'مشاركة','pulse'=>'نبض','exit'=>'مغادرة','custom'=>'مخصص']; @endphp {{ $types[$survey->type] ?? $survey->type }} {{ $survey->responses_count }} {{ $survey->start_date?->format('m/d') ?? '—' }} → {{ $survey->end_date?->format('m/d') ?? '—' }} @php $sm = ['draft'=>'status-draft','active'=>'status-active','closed'=>'status-expired','archived'=>'status-expired']; $sl = ['draft'=>'مسودة','active'=>'نشط','closed'=>'مغلق','archived'=>'مؤرشف']; @endphp {{ $sl[$survey->status] ?? $survey->status }}
@if($survey->status === 'active') @endif @if($survey->status === 'draft')
@csrf
@endif @if($survey->status === 'active')
@csrf
@endif
لا توجد استبيانات
{{ $surveys->links() }}
@endsection