@extends('layouts.superadmin') @section('title','مذكرات ويوميات إيمان — غرفة إيمان الملكاوي') @section('content') @php use Illuminate\Support\Str; $decode = function ($json) { if (!$json) return []; $arr = json_decode($json, true); return is_array($arr) ? $arr : []; }; $fmtDate = function ($dt) { if (!$dt) return '—'; try { return \Carbon\Carbon::parse($dt)->format('Y-m-d H:i'); } catch (\Throwable $e) { return (string)$dt; } }; @endphp
{{-- HERO --}}
يوميات + أفكار + تذكير + AI مساعد

مذكرات ويوميات إيمان

اكتبي الحدث + شعورك + الدرس… وكل يوميّة تنفتح بدراور تفاصيل مع فحص إملاء بسيط.
الفترة: {{ $from }} → {{ $to }}
{{-- FLASH --}} @if(session('success'))
{{ session('success') }}
@endif @if($errors->any())
في أخطاء:
    @foreach($errors->all() as $e)
  • {{ $e }}
  • @endforeach
@endif {{-- STATS + AI CENTER --}}
عدد اليوميات
{{ $stats['total'] ?? 0 }}
مع Tags
{{ $stats['with_tags'] ?? 0 }}
تنبيهات إملاء
{{ $stats['with_spell_issues'] ?? 0 }}
AI Guidance Center
{{ $ai['headline'] ?? 'مركز الإرشادات' }}
@foreach(($ai['tips'] ?? []) as $tip)
{{ $tip }}
@endforeach
فحص الإملاء: {{ $ai['spelling_note'] ?? '' }}
{{-- LIST --}} @if($viewMode === 'table')
جدول اليوميات
@forelse($entries as $e) @php $e = is_array($e) ? (object)$e : $e; $tags = $decode($e->tags ?? null); $spell = $decode($e->spell_report ?? null); $hasSpell = is_array($spell) && !empty($spell); @endphp @empty @endforelse
العنوان الوقت المزاج Tags إملاء
{{ $e->entry_title }} {{ $fmtDate($e->entry_at ?? $e->created_at ?? null) }} {{ $e->mood ?? '—' }} {{ is_array($tags) ? count($tags) : 0 }} @if($hasSpell) تنبيهات @else ممتاز @endif
لا يوجد يوميات بعد.
@else
@forelse($entries as $e) @php $e = is_array($e) ? (object)$e : $e; $tags = $decode($e->tags ?? null); $spell = $decode($e->spell_report ?? null); $hasSpell = is_array($spell) && !empty($spell); @endphp {{-- نفس template المستخدم بالجدول --}} @empty
لا يوجد يوميات بعد.
@endforelse
@endif {{-- LOGS --}}
السجلات (آخر 80)
@forelse($logs as $l) @php $l = is_array($l) ? (object)$l : $l; @endphp @empty @endforelse
الوقت الإجراء Entry ID Actor IP
{{ $l->created_at ?? '—' }} {{ $l->action ?? '—' }} {{ $l->entry_id ?? '—' }} {{ $l->actor_id ?? '—' }} {{ $l->ip ?? '—' }}
لا يوجد سجلات.
{{-- CREATE MODAL --}} {{-- DETAILS DRAWER --}}
@endsection