@if(config('ticaga.design') == 'modern') @foreach($responses as $response) @if($response->employee_response == '0') @if($response->is_note == '2')
SY
System @customDateTime($response->response_created)

{!! Str::of($response->content)->inlinemarkdown(['html_input' => 'strip', 'allow_unsafe_links' => false,]) !!}

@else
@if($response->profile_photo_path != '') {{ $response->name }} @else email))).".png?default=monsterid"; @endphp" alt="{{ $response->name }}"/> @endif
@if($response->user_id != '0') {{ $response->name }} @else {{ $response->public_name }} @endif @if($response->original_ticket_id) From #{{ $response->original_ticket_code ?? $response->original_ticket_id }} @endif @customDateTime($response->response_created)

{!! Str::of($response->content)->inlinemarkdown(['html_input' => 'strip', 'allow_unsafe_links' => false,]) !!}

{{-- Attachments --}} @if($response->attachments && $response->attachments->count() > 0)
@foreach($response->attachments as $attachment) @if($attachment->isImage()) {{-- Image attachment - show inline --}}
{{ $attachment->original_filename }}
{{ $attachment->original_filename }} ({{ \App\Services\AttachmentService::formatBytes($attachment->size) }})
@else {{-- Non-image attachment - show download link --}} {{ $attachment->original_filename }} ({{ \App\Services\AttachmentService::formatBytes($attachment->size) }}) @endif @endforeach
@endif @hasanyrole('superadmin|employee|admin') {{ $response->ip_address }}@if(!$ticket->organize->isTicket()) - {{ __('Type') }}: {{ $ticket->organize->label() }}@endif @endhasanyrole
@endif @else @if($response->is_note == '2')
SY
System @customDateTime($response->response_created)

{!! Str::of($response->content)->inlinemarkdown(['html_input' => 'strip', 'allow_unsafe_links' => false,]) !!}

@elseif($response->is_note != '1')
@if($response->profile_photo_path != '') {{ $response->name }} @else email))).".png?default=monsterid"; @endphp" alt="{{ $response->response_name }}"/> @endif
@if($response->name) {{ $response->response_name }} @endif @if($response->original_ticket_id) From #{{ $response->original_ticket_code ?? $response->original_ticket_id }} @endif @customDateTime($response->response_created)

{!! Str::of($response->content)->inlinemarkdown(['html_input' => 'strip', 'allow_unsafe_links' => false,]) !!}

{{-- Attachments --}} @if($response->attachments && $response->attachments->count() > 0)
@foreach($response->attachments as $attachment) @if($attachment->isImage()) {{-- Image attachment - show inline --}}
{{ $attachment->original_filename }}
{{ $attachment->original_filename }} ({{ \App\Services\AttachmentService::formatBytes($attachment->size) }})
@else {{-- Non-image attachment - show download link --}} {{ $attachment->original_filename }} ({{ \App\Services\AttachmentService::formatBytes($attachment->size) }}) @endif @endforeach
@endif @hasanyrole('superadmin|employee|admin') {{ $response->ip_address }} @endhasanyrole
@elseif($response->is_note == '1' && !Auth::guest() && Auth::user()->hasAnyRole('superadmin', 'admin', 'employee'))
@if($response->profile_photo_path != '') {{ $response->name }} @else email))).".png?default=monsterid"; @endphp" alt="{{ $response->name }}"/> @endif
@if($response->name) {{ $response->name }} @endif @if($response->original_ticket_id) From #{{ $response->original_ticket_code ?? $response->original_ticket_id }} @endif @customDateTime($response->response_created)

{!! Str::of($response->content)->inlinemarkdown(['html_input' => 'strip', 'allow_unsafe_links' => false,]) !!}

{{-- Attachments --}} @if($response->attachments && $response->attachments->count() > 0)
@foreach($response->attachments as $attachment) @if($attachment->isImage()) {{-- Image attachment - show inline --}}
{{ $attachment->original_filename }}
{{ $attachment->original_filename }} ({{ \App\Services\AttachmentService::formatBytes($attachment->size) }})
@else {{-- Non-image attachment - show download link --}} {{ $attachment->original_filename }} ({{ \App\Services\AttachmentService::formatBytes($attachment->size) }}) @endif @endforeach
@endif @hasanyrole('superadmin|employee|admin') {{ $response->ip_address }} @endhasanyrole
@endif @endif @endforeach @else @foreach($responses as $response) @php $isSystemMessage = (string) $response->is_note === '2'; $isEmployeeResponse = (string) $response->employee_response === '1'; $isPrivateNote = (string) $response->is_note === '1'; $responseCardClasses = $isSystemMessage ? 'border border-l-4 text-white' : ($isPrivateNote ? 'border-yellow-200 border-l-4 border-l-yellow-400 bg-yellow-50 text-black dark:bg-yellow-950/40 dark:border-yellow-900/60 dark:text-yellow-200' : ($isEmployeeResponse ? 'border-neutral-300 border-l-4 bg-slate-50 text-gray-900 dark:bg-gray-900 dark:border-slate-700 dark:text-white' : 'border-neutral-300 border-l-4 border-l-neutral-300 bg-gray-50 text-gray-900 dark:bg-gray-900 dark:border-neutral-700 dark:text-white')); $employeeAccentStyle = (!$isSystemMessage && !$isPrivateNote && $isEmployeeResponse) ? 'border-color: rgba(var(--color-primary-rgb, 99, 102, 241), 0.28); border-left-color: var(--color-primary, #6366f1); background-color: rgba(var(--color-primary-rgb, 99, 102, 241), 0.06);' : ''; $systemMessageStyle = $isSystemMessage ? 'background-color: var(--color-primary, #6366f1); border-color: var(--color-primary, #6366f1); border-left-color: var(--color-primary, #6366f1); color: #ffffff;' : ''; $responseHeaderBorder = ''; @endphp
@php $systemDisplayName = 'Astrid'; if ($isSystemMessage) { $customer = null; $displayName = $systemDisplayName; $role = ''; $avatar = null; } else { $customer = \App\Models\User::find($response->user_id); $customerRole = $customer?->roles->pluck('name')[0] ?? ''; if ($customerRole === 'superadmin') { $role = 'Senior Management'; } elseif ($customerRole === 'admin') { $role = 'Management'; } elseif ($customerRole === 'employee') { $role = 'Employee'; } elseif ($customerRole === 'customer') { $role = 'Customer'; } elseif ($isEmployeeResponse) { $role = 'Employee'; } else { $role = 'Guest'; } if(!Auth::guest() && $customer && !empty($customer->profile_photo_path)) { $avatar = asset('storage/' . $customer->profile_photo_path); } else { $avatarEmail = $customer->email ?? $response->email ?? $ticket->public_email; $avatar = "https://gravatar.com/avatar/". hash('sha256', strtolower(trim($avatarEmail))).".png?default=monsterid"; } if($response->user_id != '0') { $displayName = $customer->name ?? $response->name ?? 'Guest'; } else { $displayName = $isEmployeeResponse ? ($response->name ?: ($ticket->public_name ?? 'Employee')) : ($ticket->public_name ?? 'Guest'); } } $isCurrentViewer = !Auth::guest() && $customer && Auth::id() === $customer->id; @endphp @if($isSystemMessage)
AS
@else @endif
@if(!$isSystemMessage && $response->user_id != '0') {{ $displayName }} @else {{ $displayName }} @endif @if($isCurrentViewer) @endif @if($isSystemMessage)
@elseif($isPrivateNote)
@else
@if(!$response->organize->isTicket()) via {{ $response->organize->label() }} @endif
@endif
@customDateTime($response->response_created)

{!! Str::of($response->content)->inlinemarkdown(['html_input' => 'strip', 'allow_unsafe_links' => false,]) !!}

{{-- Attachments --}} @if($response->attachments && $response->attachments->count() > 0)
@foreach($response->attachments as $attachment) @if($attachment->isImage())
{{ $attachment->original_filename }}
{{ $attachment->original_filename }} ({{ \App\Services\AttachmentService::formatBytes($attachment->size) }})
@else {{ $attachment->original_filename }} ({{ \App\Services\AttachmentService::formatBytes($attachment->size) }}) @endif @endforeach
@endif
@endforeach @endif