@extends('layout.base') @section('css') @endsection @section('content') @php $user = Auth::user(); @endphp

ACCOMMODATION FORM

{{ $reservation->hotel_name }}
{{ $reservation->hotel_address }}
{{ $reservation->hotel_website }}

Federation {{ $reservation->booked_by_name }}
Contact Person {{ $reservation->booked_by_name }} Phone {{ $reservation->phone_number }}
Email {{ $reservation->booked_by_email }}
@csrf @php $reservationIndex = 0; // Untuk tracking indeks dalam loop @endphp @foreach ($reservationDetails as $detail)
@php $isDoubleRoom = str_contains(strtolower($detail->room_type_name), 'double'); $hasMealOptions = $detail->meals == 1; @endphp

Room Name: {{ $detail->room_name }}

@if ($isDoubleRoom) @endif @if ($hasMealOptions) @endif {{-- --}} @php $qty = $detail->quantity; if ($isDoubleRoom) $qty = floor($qty / 2); @endphp @for ($i = 0; $i < $qty; $i++) @php // Ambil data akreditasi sesuai urutan $reservationAccreditation = $reservationAccreditations[$reservationIndex] ?? null; $selectedAccreditation = $reservationAccreditation ? $reservationAccreditation->accreditation_id : null; $selectedSharingWith = $reservationAccreditation ? $reservationAccreditation->sharing_with : null; @endphp @if ($isDoubleRoom) @endif @if ($hasMealOptions) @endif {{-- --}} @php $reservationIndex++; // Tambahkan index untuk baris berikutnya @endphp @endfor
Checkin day Checkout day Room Type # of nights Full NameSharing room withWithGender
{{ $detail->room_type_name }} {{ \Carbon\Carbon::parse($detail->start_date)->diffInDays(\Carbon\Carbon::parse($detail->end_date)) }} @php $gender = strtoupper( $accreditations->where('id', $selectedAccreditation)->first()->gender ?? '', ); $formattedGender = $gender === 'MALE' ? 'M' : ($gender === 'FEMALE' ? 'F' : ''); @endphp
@endforeach
Special requirements
Place and Date Seal of the NF NF Authorized Signature
Jakarta, {{ date('d F Y') }}
{{ $reservation->booked_by_name }}
@if($user->role == 'superadmin' && $status == 'final') @elseif($status != 'final' && $user->role != 'superadmin') @endif
@endsection @section('scripts') @if (session("error")) @endif @endsection