| # | Booking No @if ($sortField === 'no') @else @endif | Date @if ($sortField === 'date') @else @endif | Type @if ($sortField === 'type') @else @endif | Status @if ($sortField === 'status') @else @endif | Agent Name | Member Name | Qty @if ($sortField === 'qty') @else @endif | Gross @if ($sortField === 'gross') @else @endif | Discount | Discount % | Nett @if ($sortField === 'nett') @else @endif | Paid | Promo No | Credit | Commission | Action |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $bookings->firstItem() + $key }} | {{ $booking->no }} | @if ($booking->date) {{ \Carbon\Carbon::parse($booking->date)->format('j F Y') }} @else - @endif | @php $typeTitle = [ 'W' => 'Walk In', 'O' => 'Online', ]; @endphp {{ ucfirst($typeTitle[$booking->type] ?? '-') }} |
@php
$statusColors = [
'D' => 'warning',
'N' => 'primary',
'C' => 'danger',
'S' => 'success',
];
$statusTitle = [
'D' => 'Draft',
'N' => 'None',
'C' => 'Cancelled',
'S' => 'Show Up',
];
$statusColor = $statusColors[$booking->status] ?? 'secondary';
@endphp
{{ ucfirst($statusTitle[$booking->status] ?? '-') }}
@if ($booking->status == 'N')
@endif
|
@php $agentName = null; if (!empty($booking->agent_code)) { $agent = DB::table('Luv2_agent')->where('code', $booking->agent_code)->first(); $agentName = $agent ? $agent->name : '-'; } @endphp {{ $agentName ?? '-' }} | @php $memberName = null; if (!empty($booking->member_code)) { $member = DB::table('Luv2_member') ->where('code', $booking->member_code) ->first(); $memberName = $member ? $member->name : '-'; } @endphp {{ $memberName ?? '-' }} | {{ number_format($booking->qty, 0) }} | {{ number_format($booking->gross, 0) }} | {{ number_format($booking->disc, 0) }} | {{ number_format($booking->discp, 2) }}% | {{ number_format($booking->nett, 0) }} | {{ number_format($booking->paid, 0) }} | {{ $booking->promo_no ?? '-' }} | @php $credit = DB::table('Luv2_booking_payment') ->where('no', $booking->no) ->where('type', 'C') ->first(); @endphp @if ($credit) {{ number_format($credit->amount, 0) }} @else - @endif | {{ number_format(($booking->comm * $booking->nett) / 100, 0) }} | @if ($booking->status == 'N') @endif |
| No booking data found | ||||||||||||||||
Booking No: {{ $bookingToCancel->no }}
Date: {{ $bookingToCancel->date ? \Carbon\Carbon::parse($bookingToCancel->date)->format('j F Y') : '-' }}
Status: {{ ucfirst($bookingToCancel->status) }}
Member: {{ $bookingToCancel->member_code ?? '-' }}
Total Paid: Rp {{ number_format($bookingToCancel->paid, 0) }}
Payment Method: {{ ucfirst($bookingToCancel->payment ?? '-') }}
No payment details found for this booking.
@endifBooking No: {{ $bookingToShowUp->no }}
Date: {{ $bookingToShowUp->date ? \Carbon\Carbon::parse($bookingToShowUp->date)->format('j F Y') : '-' }}
Current Status: None
Member: {{ $bookingToShowUp->member_code ?? '-' }}
Total Paid: Rp {{ number_format($bookingToShowUp->paid, 0) }}
Payment Method: {{ ucfirst($bookingToShowUp->payment ?? '-') }}
From: None
To: Show Up
This action will update the booking status and log the change in the system.
|
Date/Time
|
Action
|
User
|
Description
|
IP Address
|
User Agent
|
Changes
|
|---|---|---|---|---|---|---|
| @if(isset($logObj->created_at) && $logObj->created_at) {{ \Carbon\Carbon::parse($logObj->created_at)->format('d/m/Y H:i:s') }} @else - @endif | @php $logAction = $logObj->action ?? 'unknown'; $actionClass = match($logAction) { 'booking_created' => 'bg-success', 'booking_updated' => 'bg-info', 'booking_cancelled' => 'bg-danger', 'payment_updated' => 'bg-warning', 'show_up' => 'bg-primary', default => 'bg-secondary' }; @endphp {{ ucfirst(str_replace(['_', 'database_'], [' ', ''], $logAction)) }} | {{ $logObj->user_name ?? 'System' }} | {{ $logObj->description ?? '-' }} | {{ $logObj->ip_address ?? '-' }} | @if(isset($logObj->user_agent) && $logObj->user_agent) @php $userAgent = $logObj->user_agent; // Extract browser info from user agent $browserInfo = ''; if (strpos($userAgent, 'Chrome') !== false) { $browserInfo = 'Chrome'; } elseif (strpos($userAgent, 'Firefox') !== false) { $browserInfo = 'Firefox'; } elseif (strpos($userAgent, 'Safari') !== false) { $browserInfo = 'Safari'; } elseif (strpos($userAgent, 'Edge') !== false) { $browserInfo = 'Edge'; } else { $browserInfo = 'Other'; } // Truncate long user agent strings $displayAgent = strlen($userAgent) > 50 ? substr($userAgent, 0, 50) . '...' : $userAgent; @endphp {{ $browserInfo }} {{ $displayAgent }} @else - @endif |
@if(isset($logObj->field_name) && $logObj->field_name && (isset($logObj->old_value) && $logObj->old_value || isset($logObj->new_value) && $logObj->new_value))
{{ ucfirst(str_replace('_', ' ', $logObj->field_name)) }}
@if(isset($logObj->old_value) && $logObj->old_value && isset($logObj->new_value) && $logObj->new_value)
Before
@php
$oldValueFormatted = is_array($logObj->old_value) || is_object($logObj->old_value)
? json_encode($logObj->old_value, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)
: ($logObj->old_value ?? '-');
@endphp
@if(is_array($logObj->old_value) || is_object($logObj->old_value))
@else
{{ $oldValueFormatted }}
@endif
After
@php
$newValueFormatted = is_array($logObj->new_value) || is_object($logObj->new_value)
? json_encode($logObj->new_value, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)
: ($logObj->new_value ?? '-');
@endphp
@if(is_array($logObj->new_value) || is_object($logObj->new_value))
@else
{{ $newValueFormatted }}
@endif
Added
@php
$newValueFormatted = is_array($logObj->new_value) || is_object($logObj->new_value)
? json_encode($logObj->new_value, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)
: ($logObj->new_value ?? '-');
@endphp
@if(is_array($logObj->new_value) || is_object($logObj->new_value))
@else
{{ $newValueFormatted }}
@endif
Removed
@php
$oldValueFormatted = is_array($logObj->old_value) || is_object($logObj->old_value)
? json_encode($logObj->old_value, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)
: ($logObj->old_value ?? '-');
@endphp
@if(is_array($logObj->old_value) || is_object($logObj->old_value))
@else
{{ $oldValueFormatted }}
@endif
|
No activities have been logged for this booking yet.
Logs will appear here when actions are performed on this booking.
| # | Name | Medical Record | Code |
|---|---|---|---|
| {{ $i + 1 }} |
{{ $person->name ?? 'Unnamed' }}
|
@if (!empty($person->medical))
@php
$medicalData = is_string($person->medical)
? json_decode($person->medical, true)
: $person->medical;
@endphp
@if ($medicalData && is_array($medicalData))
@foreach ($medicalData as $condition)
@php
$medicalLabels = [
'no_medical' => [
'label' => 'No Medical Conditions',
'icon' => 'bi-check-circle',
'color' => 'success',
],
'heart_condition' => [
'label' => 'Heart Condition',
'icon' => 'bi-heart-pulse',
'color' => 'danger',
],
'asthma' => [
'label' => 'Asthma',
'icon' => 'bi-lungs',
'color' => 'warning',
],
'epilepsy' => [
'label' => 'Epilepsy',
'icon' => 'bi-brain',
'color' => 'info',
],
'broken_bones' => [
'label' => 'Previous Broken Bones',
'icon' => 'bi-bone',
'color' => 'secondary',
],
'dislocated_joints' => [
'label' => 'Dislocated Joints',
'icon' => 'bi-hand-index',
'color' => 'secondary',
],
'diabetes' => [
'label' => 'Diabetes',
'icon' => 'bi-droplet',
'color' => 'warning',
],
'water_contact_lenses' => [
'label' => 'Water Contact Lenses',
'icon' => 'bi-eye',
'color' => 'info',
],
'hearing_impairment' => [
'label' => 'Hearing Impairment',
'icon' => 'bi-ear',
'color' => 'info',
],
'pregnant' => [
'label' => 'Pregnant',
'icon' => 'bi-gender-female',
'color' => 'primary',
],
];
$info = $medicalLabels[$condition] ?? [
'label' => $condition,
'icon' => 'bi-exclamation-triangle',
'color' => 'warning',
];
@endphp
{{ $info['label'] }}
@endforeach
@else
{{ $person->medical }}
@endif
@else
No Record
@endif
|
{{ $person->code ?? '-' }}
|
No payment history found for this booking.