@extends('layouts.superadmin') @section('title', 'خريطة التأثير (EES)') @section('page-title', 'خريطة التأثير (Influence Mapping)') @section('content')
{{-- Header --}}

خريطة التأثير

بنحسب “التأثير” عبر صفحات مشتركة: نفس اليوم، نفس الصفحة، أكثر من شخص من الإدارة.

{{-- View Toggle --}}
@php $isCards = request('view','table') === 'cards'; @endphp جدول كروت
{{-- Summary --}}
أشخاص ظاهرين (ضمن الفلاتر)
{{ (int)($summary['total_staff'] ?? 0) }}
متوسط Influence
{{ (int)($summary['avg_score'] ?? 0) }}
Score = Reach×2 + UniquePages×3 + Time/60
متوسط Reach
{{ (int)($summary['avg_reach'] ?? 0) }}
متوسط صفحات مشتركة
{{ (int)($summary['avg_pages'] ?? 0) }}
{{-- Filters --}}
مثلاً 3: بدنا 3 أشخاص لنعتبر الصفحة “مشتركة”.
إعادة ضبط الفكرة: نفس اليوم + نفس الصفحة + أكثر من شخص ⇒ “نقطة تأثير”.
@php $isCards = request('view','table') === 'cards'; @endphp {{-- MAIN TABLE / CARDS --}} @if($isCards)
@forelse($rows as $row) @php $mins = (int) floor(((int)$row->shared_time)/60); $score = (int) round($row->influence_score ?? 0); @endphp
{{ $row->name ?? ('#'.$row->id) }}
{{ $row->username }} • {{ $row->membership_status }}
{{ $score }}
Reach
{{ (int)$row->shared_reach }}
صفحات
{{ (int)$row->unique_shared_pages }}
وقت
{{ $mins }}m
آخر يوم تأثير: {{ $row->last_day ?? '—' }}
@empty
لا يوجد نتائج ضمن الفلاتر.
@endforelse
{{ $rows->links() }}
@else

جدول التأثير

الترتيب حسب Influence Score.

عدد النتائج: {{ $rows->total() }}
@forelse($rows as $row) @php $mins = (int) floor(((int)$row->shared_time)/60); @endphp @empty @endforelse
الشخص الرتبة Score Reach صفحات مشتركة Hits وقت (د) آخر يوم
{{ $row->name ?? ('#'.$row->id) }} {{ $row->username }}
{{ $row->membership_status }} {{ (int) round($row->influence_score ?? 0) }} {{ (int)$row->shared_reach }} {{ (int)$row->unique_shared_pages }} {{ (int)$row->shared_hits }} {{ $mins }} {{ $row->last_day ?? '—' }}
لا يوجد نتائج ضمن الفلاتر.
{{ $rows->links() }}
@endif {{-- Hot Pages --}}

Hot Pages (الأكثر تجميعًا للإدارة)

أكثر صفحات عملت “تقاطعات” بين عدة أشخاص إداريين.

@forelse($topPages as $p) @php $mins = (int) floor(((int)$p->time_sec)/60); @endphp @empty @endforelse
Page Days Reach Sum Rows Time (m)
{{ $p->page_url }} {{ (int)$p->days_count }} {{ (int)$p->reach_sum }} {{ (int)$p->user_day_rows }} {{ $mins }}
لا يوجد بيانات كافية.
هذا مش “مين أشهر” — هذا “مين بيخلق تقاطع” على نفس الصفحات ضمن نفس اليوم.
@endsection