@version(2) @load('./css/booking.css') @load('./lang') @php /* 상태 이름은 미리 풀어 둔다. 템플릿 출력식에서 동적 속성을 쓰면 컴파일이 깨진다 */ $hr_status = (string)$booking->status; $hr_names = [ 'hold' => $lang->hb_status_hold, 'pending' => $lang->hb_status_pending, 'confirmed' => $lang->hb_status_confirmed, 'cancelled' => $lang->hb_status_cancelled, 'noshow' => $lang->hb_status_noshow, 'done' => $lang->hb_status_done, 'expired' => $lang->hb_status_expired, ]; $hr_name = $hr_names[$hr_status] ?? $hr_status; $hr_ok = $hr_status === 'confirmed' || $hr_status === 'done'; $hr_wait = $hr_status === 'hold' || $hr_status === 'pending'; $hr_when = ''; if (!empty($booking->service_date)) { $hr_d = (string)$booking->service_date; $hr_when = zdate($hr_d . '000000', $lang->hb_date_format); if (!empty($booking->start_datetime) && strlen((string)$booking->start_datetime) >= 12) { $hr_when .= ' ' . substr((string)$booking->start_datetime, 8, 2) . ':' . substr((string)$booking->start_datetime, 10, 2); } } elseif ($slot) { $hr_when = zdate($slot->slot_date . '000000', $lang->hb_date_format) . ' ' . $slot->start_time; } @endphp
{{ $hr_ok ? 'CONFIRMED' : ($hr_wait ? 'PENDING' : 'CLOSED') }}

{{ $hr_name }}

{{ $booking->booking_code }}

@if ($resource)
{{ $lang->hb_service }}
{{ $resource->title }}
@endif @if ($hr_when)
{{ $lang->hb_when }}
{{ $hr_when }}
@endif
{{ $lang->hb_name }}
{{ $booking->booker_name }}
@if ((int)$booking->amount > 0)
{{ $lang->hb_price }}
{{ number_format((int)$booking->amount) }}
@endif
@if ($hr_ok)

{{ $lang->hb_result_note }}

@endif
{{ $lang->hb_back_to_list }} {{ $lang->hb_my_bookings }}