@extends('layouts.master_backend') @section('content') @php $allBookedRooms = getAllBookedRooms(); @endphp
{{ Form::open(array('url'=>route('save-swap-room'),'id'=>"swap-room-form", 'class'=>"form-horizontal form-label-left")) }} {{Form::hidden('id',$reservation_id,['id'=>'base_price'])}}

{{lang_trans('txt_heading_booked_rooms')}}

@if($booked_rooms) @foreach($booked_rooms as $key=>$roomId) @php $roomInfo = getRoomById($roomId); $radioBtnValue = $roomInfo->room_type_id.'~'.$roomId; @endphp
@endforeach @endif

{{lang_trans('txt_heading_select_room_for_swap')}}

@php $collapseInFirstCat = 'no'; @endphp @foreach($roomtypes_list as $k=>$roomType) @php $i = 0; if($collapseInFirstCat == 'yes'){ $collapseInFirstCat = ''; } if($roomType->rooms && $roomType->rooms->count() && $collapseInFirstCat == 'no'){ foreach($roomType->rooms as $key=>$room){ if(!in_array($room->id, $allBookedRooms)){ $collapseInFirstCat = 'yes'; } } } @endphp
@if($roomType->rooms && $roomType->rooms->count()) @foreach($roomType->rooms as $key=>$room) @if(!in_array($room->id, $allBookedRooms)) @php $i++; $radioBtnValue = $room->room_type_id.'~'.$room->id; @endphp @endif @endforeach @else @endif
{{lang_trans('txt_sno')}} {{lang_trans('txt_select')}} {{lang_trans('txt_room_num')}}
{{$i}} {{Form::radio('new_room',$radioBtnValue,false,['class'=>"custom-radio", "id"=>"new_room_".$room->id])}} {{$room->room_no}}
{{lang_trans('txt_no_rooms')}}
@endforeach
{{ Form::close() }}
@endsection