@php $firstLog = $channelLogs->first(); $totalCount = $channelLogs->count(); $successCount = $channelLogs->where('status', 'SUCCESS')->count(); $failedCount = $channelLogs->where('status', 'FAILED')->count(); @endphp
BATCH ID {{ $batchId }}
발생 일시: {{ optional($firstLog->created_at)->format('Y-m-d H:i:s') }} @if($firstLog && $firstLog->template_code) {{ $firstLog->template_code }} @endif
채널 트랜잭션: {{ $totalCount }}건 요청 {{ $successCount }}건 성공 @if($failedCount > 0) {{ $failedCount }}건 실패 @endif
@foreach ($channelLogs as $index => $log) @php $type = strtoupper($log->type ?? $log->channel ?? 'SMS'); $status = $log->status ?? 'SUCCESS'; $typeIcon = match($type) { 'ALIMTALK' => 'fa-solid fa-comment text-warning', 'EMAIL' => 'fa-solid fa-envelope text-info', 'WEB' => 'fa-solid fa-bell text-primary', default => 'fa-solid fa-comment-sms text-success', }; $statusBadge = match($status) { 'SUCCESS' => 'bg-success-subtle text-success border-success-subtle', 'FAILED' => 'bg-danger-subtle text-danger border-danger-subtle', default => 'bg-secondary-subtle text-secondary border-secondary-subtle', }; @endphp
#{{ $index + 1 }} {{ $type }} {{ $status === 'SUCCESS' ? '발송 완료' : ($status === 'FAILED' ? '발송 실패' : '대기/진행중') }}
전송: {{ optional($log->created_at)->format('H:i:s') }}
수신자 및 발송처
@if(!empty($log->response_code)) @endif
수신인 {{ $log->receiver_name ?? '고객' }}
연락처/계정 {{ $log->receiver_phone ?? $log->receiver_email ?? ('회원 ID: ' . ($log->user_id ?? '-')) }}
수신 대상 {{ $log->target === 'user' ? '일반회원' : ($log->target === 'shop' ? '뷰티샵' : '최고관리자') }}
응답코드 {{ $log->response_code }}
전송 메시지 내용
@if(!empty($log->title))
{{ $log->title }}
@endif
{{ $log->content ?: '(전송 본문 없음)' }}
통신사 / 중계사 응답 결과
@if($status === 'FAILED' || !empty($log->error_message))
[에러 응답] {{ $log->error_message ?? $log->response_message ?? '통신 실패' }}
@else
{{ $log->response_message ?: '정상 접수 및 수신 단말기 전달 완료 (HTTP 200)' }}
@endif @if(!empty($log->payload))
Raw Payload 보기
{{ is_array($log->payload) ? json_encode($log->payload, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) : $log->payload }}
@endif
@endforeach