@extends('dashboard.layouts.master') @section('title', 'Log Detail | Admin Panel') @push('after-styles') @endpush @section('content') @can('offer.qr_logs.read')
{{-- ── Page Header ── --}}

Log Detail

Dashboard / Offer Management / QR & Reward Logs / {{ $logData->display_type }} #{{ $logData->id }}
arrow_back Back to Logs @can('offer.qr_logs.update') @if($type !== 'Correction') @endif @endcan
{{-- ── Integrity Lock Banner ── --}}
lock
Loyalty Integrity Rule: The original points record below is immutable. Any adjustment must be submitted as an exceptional correction with a mandatory justification — it will be permanently recorded in the audit log.
{{-- ── Event Information ── --}}
event_note
Event Information
@if($type === 'Redeem') @endif @if($type === 'Correction') @endif
Log ID #{{ $logData->id }}
Event Type @if($type === 'Earn') QR Scan (Earn) @elseif($type === 'Redeem') Reward (Redeem) @else Point Correction @endif
Points {{ $logData->display_points }}
Date & Time {{ \Carbon\Carbon::parse($logData->display_date)->format('d M Y, H:i:s') }}
Reward Name {{ $logData->reward_info ?? 'N/A' }}
Status @if($logData->status == 1) Valid @else Cancelled @endif
Justification {{ $logData->justification }}
Applied By {{ $logData->admin->name ?? 'N/A' }}
{{-- ── User & Business ── --}}
people
User & Business
Customer {{ $logData->user->name ?? 'N/A' }} (ID #{{ $logData->user_id }})
Email {{ $logData->user->email ?? 'N/A' }}
Business {{ $logData->business->business_name ?? 'N/A' }} (ID #{{ $logData->business_id }})
Business Email {{ $logData->business->business_email ?? 'N/A' }}
{{-- ── Corrections Applied to This Record ── --}} @if($type !== 'Correction' && count($corrections) > 0)
history
Corrections Applied to This Record ({{ count($corrections) }})
@foreach($corrections as $c)
tune
Correction #{{ $c->id }}  •  {{ \Carbon\Carbon::parse($c->created_at)->format('d M Y, H:i:s') }}  •  By: {{ $c->admin->name ?? 'N/A' }}
{{ $c->points >= 0 ? '+' : '' }}{{ $c->points }} pts — {{ $c->justification }}
@endforeach
@endif {{-- ── Full Reward Redemption History for This User ── --}} @if($type !== 'Correction')
redeem
Full Reward Redemption History — {{ $logData->user->name ?? 'User #'.$logData->user_id }}
ID Reward Name Points Used Business Date & Time
@endif
{{-- ── Point Correction Modal ── --}} @can('offer.qr_logs.update') @if($type !== 'Correction') @endif @endcan @else @endcan @endsection @push('after-scripts') @endpush