Client Logo
{{-- Export to Excel button and course name --}}
Course Name: {{ $course_name }} Export to Excel
@csrf
@php $serial = 1; @endphp @foreach ($groupedComments as $moduleNo => $pages) {{-- Module Row --}} @foreach ($pages as $pageNo => $comments) {{-- Page Row --}} {{-- Comments under page --}} @foreach ($comments as $comment) {{-- Parent Comment Row --}} @endforeach @endforeach @endforeach
# Severity Date Reviewer Comments Status Update Comment
Module Name: {{ $moduleNo }}
Screen Number: {{ $pageNo }}
{{ $serial++ }} {{ $comment->severity ?? 'N/A' }} {{ date('Y-m-d', strtotime($comment->created_at)) }}
{{ $comment->reviewer->name ?? 'Unknown' }}: {{ $comment->comment ?? 'No comment available' }}
{{-- Child Comments (Replies) --}} @if($comment->allChildren && $comment->allChildren->count() > 0)
@foreach($comment->allChildren as $child)
{{ $child->reviewer->name ?? 'Unknown' }} - {{ date('M d, Y H:i', strtotime($child->created_at)) }}
{{ $child->comment }}
{{-- Nested children (if any) --}} @if($child->allChildren && $child->allChildren->count() > 0) @foreach($child->allChildren as $nestedChild)
{{ $nestedChild->reviewer->name ?? 'Unknown' }} - {{ date('M d, Y H:i', strtotime($nestedChild->created_at)) }}
{{ $nestedChild->comment }}
@endforeach @endif
@endforeach
@endif
{{ $comment->status ?? 'N/A' }}
Last Updated: {{ isset($comment->updated_at) ? date('Y-m-d H:i A', strtotime($comment->updated_at)) : 'N/A' }}
{{-- --}}