@extends('layouts.app') @section('title', $module->title) @section('content')

{{ $module->title }}

{{ $module->content_type }}

Tahmini süre: {{ $module->estimated_time }} dk • Zorunluluk: {{ $module->required_for_role }}

@if($module->content_type === 'code')
{{ $module->content_body }}
@elseif($module->content_type === 'checklist')
    @foreach(preg_split('/\r?\n/', $module->content_body) as $line) @if(trim($line) !== '')
  • {{ $line }}
  • @endif @endforeach
@else
{{ $module->content_body }}
@endif @if($user->isAdmin()) {{-- Admin için tamamlanan kullanıcıların listesi --}} @php $completedUsers = $module->users; @endphp @if($completedUsers->count() > 0)

Tamamlayan Kullanıcılar ({{ $completedUsers->count() }})

@foreach($completedUsers as $completedUser)
{{ strtoupper(substr($completedUser->name, 0, 1)) }}

{{ $completedUser->name }}

{{ $completedUser->email }}

Tamamlandı

{{ optional($completedUser->pivot->completion_date)->format('d.m.Y H:i') ?? '-' }}

@endforeach
@else

Henüz bu modülü tamamlayan kullanıcı bulunmuyor.

@endif @else {{-- Normal kullanıcı için kendi durumu --}} @php $pivot = optional($module->users->first())->pivot; @endphp @if(!($pivot?->is_completed))
@csrf
@else
Tamamlandı: {{ optional($pivot->completion_date)->format('d.m.Y H:i') }}
@endif @endif
@endsection