Updated: Text mentioned in the manual allotment is not visible on the order detail page
This commit is contained in:
@@ -240,7 +240,7 @@
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li>
|
||||
<a href="#" class="room_reallocate_swap" id="reallocate_room_{$data['id']}" data-room_type_name="{$data['room_type_name']}" data-toggle="modal" data-target="#mySwappigModal" data-id_htl_booking="{$data['id']}" data-room_num='{$data.room_num}' data-id_room_type='{$data.id_product}' data-cust_name='{$data.alloted_cust_name}' data-cust_email='{$data.alloted_cust_email}' data-avail_rm_swap='{$data.avail_rooms_to_swap|@json_encode}' data-avail_realloc_room_types='{$data.avail_room_types_to_realloc|@json_encode}'>
|
||||
<a href="#" class="room_reallocate_swap" id="reallocate_room_{$data['id']}" data-room_type_name="{$data['room_type_name']}" data-toggle="modal" data-target="#mySwappigModal" data-id_htl_booking="{$data['id']}" data-room_num='{$data.room_num}' data-id_room_type='{$data.id_product}' data-cust_name='{$data.alloted_cust_name}' data-cust_email='{$data.alloted_cust_email}' data-avail_rm_swap='{$data.avail_rooms_to_swap|@json_encode}' data-avail_realloc_room_types='{$data.avail_room_types_to_realloc|@json_encode}' data-allotment_type='{$data['booking_type']}' data-allotment_type_label='{if $data['booking_type'] == $ALLOTMENT_MANUAL}{l s='Manual'}{else}{l s='Auto'}{/if}' data-comment='{$data.comment}'>
|
||||
<i class="icon-refresh"></i>
|
||||
{l s='Reallocate/Swap Room'}
|
||||
</a>
|
||||
|
||||
@@ -102,6 +102,7 @@
|
||||
<th>{l s='Duration'}</th>
|
||||
<th>{l s='Documents'}</th>
|
||||
<th>{l s='Room Status'}</th>
|
||||
<th>{l s='Allotment'}</th>
|
||||
<th>{l s='Action'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -125,25 +126,28 @@
|
||||
</td>
|
||||
<td>
|
||||
{if $data['id_status'] == $hotel_order_status['STATUS_ALLOTED']['id_status']}
|
||||
{l s='Alloted'} {if $data['booking_type'] == HotelBookingDetail::ALLOTMENT_MANUAL}({l s='Manually'}){/if}
|
||||
{l s='Alloted'}
|
||||
{elseif $data['id_status'] == $hotel_order_status['STATUS_CHECKED_IN']['id_status']}
|
||||
<span class="text-danger room_status">{l s='Checked in on'} {dateFormat date=$data['check_in'] full=1}</span>
|
||||
{elseif $data['id_status'] == $hotel_order_status['STATUS_CHECKED_OUT']['id_status']}
|
||||
<span class="text-success room_status">{l s='Checked out on'} {dateFormat date=$data['check_out'] full=1}</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<td>
|
||||
{if $data['booking_type'] == $ALLOTMENT_MANUAL}
|
||||
{l s='Manual'} {if $data['comment'] != ''}<a class="manual_allotment_comment" href="#" data-id_hotel_booking_detail="{$data['id']}"><i class="icon-info-circle"></i></a>{/if}
|
||||
{else}
|
||||
{l s='Auto'}
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{if $data.is_refunded || $data.is_cancelled}
|
||||
<span class="badge badge-danger">{if $data.is_cancelled}{l s='Cancelled'}{else}{l s='Refunded'}{/if}</span>
|
||||
{else}
|
||||
<a class="open_room_status_form btn btn-default" href="#" data-id_hotel_booking_detail="{$data['id']}" data-id_order="{$data['id_order']}" data-id_status="{$data['id_status']}" data-id_room="{$data['id_room']}" data-date_from="{$data['date_from']|date_format:"%Y-%m-%d"}" data-date_to="{$data['date_to']|date_format:"%Y-%m-%d"}" data-check_in_time="{$data['check_in_time']}" data-check_out_time="{$data['check_out_time']}">
|
||||
<i class="icon-pencil"></i>
|
||||
<i class="icon-pencil"></i> {l s='Edit'}
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
{if $data['booking_type'] == HotelBookingDetail::ALLOTMENT_MANUAL && $data['comment'] != ''}
|
||||
<a class="manual_allotment_comment btn btn-default" href="#" data-id_hotel_booking_detail="{$data['id']}"><i class="icon-comment"></i></a>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
@@ -1250,10 +1254,9 @@
|
||||
{addJsDefL name='select_room_txt'}{l s='Select room' js=1}{/addJsDefL}
|
||||
{addJsDef max_child_age=$max_child_age|escape:'quotes':'UTF-8'}
|
||||
{addJsDef max_child_in_room=$max_child_in_room|escape:'quotes':'UTF-8'}
|
||||
{addJsDef ROOM_STATUS_ALLOTED=$ROOM_STATUS_ALLOTED|escape:'quotes':'UTF-8'}
|
||||
{addJsDef ROOM_STATUS_CHECKED_IN=$ROOM_STATUS_CHECKED_IN|escape:'quotes':'UTF-8'}
|
||||
{addJsDef ROOM_STATUS_CHECKED_OUT=$ROOM_STATUS_CHECKED_OUT|escape:'quotes':'UTF-8'}
|
||||
|
||||
{addJsDef ALLOTMENT_MANUAL=$ALLOTMENT_MANUAL|escape:'quotes':'UTF-8'}
|
||||
{addJsDefL name=txt_booking_document_upload_success}{l s='Document uploaded successfully.' js=1}{/addJsDefL}
|
||||
{addJsDefL name=txt_booking_document_delete_confirm}{l s='Are you sure?' js=1}{/addJsDefL}
|
||||
{addJsDefL name=txt_booking_document_delete_success}{l s='Document deleted successfully.' js=1}{/addJsDefL}
|
||||
|
||||
@@ -28,15 +28,25 @@
|
||||
</ul>
|
||||
<div class="tab-content active">
|
||||
<div role="tabpanel" class="tab-pane active" id="reallocate_room_tab">
|
||||
<div class="row">
|
||||
<dl class="list-detail col-sm-6">
|
||||
<label class="label-title">{l s='Current Room Number'}</label>
|
||||
<dd><i class="icon-bed"></i> <span class="modal_curr_room_num"></span></dd>
|
||||
</dl>
|
||||
<dl class="list-detail col-sm-6">
|
||||
<label class="label-title">{l s='Allotment type'}</label>
|
||||
<dd><span class="modal_curr_allotent_type"></span></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="row">
|
||||
<dl class="list-detail col-sm-6">
|
||||
<label class="label-title">{l s='Currently Alloted Customer'}</label>
|
||||
<dd><i class="icon-user"></i> <span class="cust_name"></span></dd>
|
||||
<dd><i class="icon-envelope"></i> <span class="cust_email"></span></dd>
|
||||
</dl>
|
||||
<dl class="list-detail col-sm-6">
|
||||
<label class="label-title">{l s='Current Room Number'}</label>
|
||||
<dd><i class="icon-bed"></i> <span class="modal_curr_room_num"></span></dd>
|
||||
<dl class="list-detail col-sm-6 allotment_comment_block">
|
||||
<label class="label-title">{l s='Allotment Comment'}</label>
|
||||
<dd><span class="modal_curr_allotment_comment"></span></dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
@@ -90,15 +100,25 @@
|
||||
</form>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="swap_room_tab">
|
||||
<div class="row">
|
||||
<dl class="list-detail col-sm-6">
|
||||
<label class="label-title">{l s='Current Room Number'}</label>
|
||||
<dd><i class="icon-bed"></i> <span class="modal_curr_room_num"></span></dd>
|
||||
</dl>
|
||||
<dl class="list-detail col-sm-6">
|
||||
<label class="label-title">{l s='Allotment type'}</label>
|
||||
<dd><span class="modal_curr_allotent_type"></span></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="row">
|
||||
<dl class="list-detail col-sm-6">
|
||||
<label class="label-title">{l s='Currently Alloted Customer'}</label>
|
||||
<dd><i class="icon-user"></i> <span class="cust_name"></span></dd>
|
||||
<dd><i class="icon-envelope"></i> <span class="cust_email"></span></dd>
|
||||
</dl>
|
||||
<dl class="list-detail col-sm-6">
|
||||
<label class="label-title">{l s='Current Room Number'}</label>
|
||||
<dd><i class="icon-bed"></i> <span class="modal_curr_room_num"></span></dd>
|
||||
<dl class="list-detail col-sm-6 allotment_comment_block">
|
||||
<label class="label-title">{l s='Allotment Comment'}</label>
|
||||
<dd><span class="modal_curr_allotment_comment"></span></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
@@ -2950,9 +2950,9 @@ class AdminOrdersControllerCore extends AdminController
|
||||
),
|
||||
'isCancelledRoom' => $isCancelledRoom,
|
||||
'orderDocuments' => $order->getDocuments(),
|
||||
'ROOM_STATUS_ALLOTED' => HotelBookingDetail::STATUS_ALLOTED,
|
||||
'ROOM_STATUS_CHECKED_IN' => HotelBookingDetail::STATUS_CHECKED_IN,
|
||||
'ROOM_STATUS_CHECKED_OUT' => HotelBookingDetail::STATUS_CHECKED_OUT,
|
||||
'ALLOTMENT_MANUAL' => HotelBookingDetail::ALLOTMENT_MANUAL,
|
||||
);
|
||||
|
||||
return parent::renderView();
|
||||
|
||||
@@ -306,11 +306,17 @@ function init()
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
// voucher modal show and close
|
||||
$('#add_voucher').unbind('click').click(function(e) {
|
||||
e.preventDefault();
|
||||
VoucherModal.show();
|
||||
});
|
||||
|
||||
$(document).on('hidden.bs.modal', '#voucher-modal', function(){
|
||||
$('#voucher-modal').remove();
|
||||
});
|
||||
// End: voucher modal show and close
|
||||
|
||||
$(document).on('change','#discount_type', function(e) {
|
||||
// Percent type
|
||||
if ($(this).val() == 1)
|
||||
@@ -342,11 +348,18 @@ function init()
|
||||
$('select[name=discount_invoice]').attr('disabled', false);
|
||||
});
|
||||
|
||||
// payment information modal show and close
|
||||
$('.open_payment_information').unbind('click').click(function(e) {
|
||||
e.preventDefault();
|
||||
OrderPaymentDetailModal.show($(this));
|
||||
});
|
||||
|
||||
$(document).on('hidden.bs.modal', '#payment-detail-modal', function(){
|
||||
$('#payment-detail-modal').remove();
|
||||
});
|
||||
// End: payment information modal show and close
|
||||
|
||||
|
||||
initRoomEvents();
|
||||
initProductEvents();
|
||||
}
|
||||
@@ -1168,15 +1181,21 @@ function initRoomEvents()
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
// order-payment-modal hide and show
|
||||
$('#add_new_payment').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
OrderPaymentModal.show();
|
||||
});
|
||||
|
||||
$(document).on('hidden.bs.modal', '#order-payment-modal', function(){
|
||||
$('#order-payment-modal').remove();
|
||||
});
|
||||
|
||||
$('#cancle_add_payment').on('click', function(e) {
|
||||
e.preventDefault();
|
||||
OrderPaymentModal.hide();
|
||||
});
|
||||
// end order-payment-modal hide and show
|
||||
}
|
||||
function addRoomRefreshTotal() {
|
||||
var quantity = parseInt($('#add_product_product_quantity').val());
|
||||
@@ -1644,6 +1663,10 @@ $(document).ready(function() {
|
||||
DocumentNoteModal.show($(this));
|
||||
});
|
||||
|
||||
$(document).on('hidden.bs.modal', '#document-note-modal', function(){
|
||||
$('#document-note-modal').remove();
|
||||
});
|
||||
|
||||
$(document).on('click', '.submitDocumentNote', function(e) {
|
||||
e.preventDefault();
|
||||
DocumentNoteModal.submit();
|
||||
@@ -1658,6 +1681,10 @@ $(document).ready(function() {
|
||||
TravellerModal.show();
|
||||
});
|
||||
|
||||
$(document).on('hidden.bs.modal', '#traveller-modal', function(){
|
||||
$('#traveller-modal').remove();
|
||||
});
|
||||
|
||||
$(document).on('click', '.submitTravellerInfo', function(e) {
|
||||
e.preventDefault();
|
||||
TravellerModal.submit();
|
||||
@@ -1698,6 +1725,10 @@ $(document).ready(function() {
|
||||
RoomStatusModal.show($(this));
|
||||
});
|
||||
|
||||
$(document).on('hidden.bs.modal', '#room-status-modal', function(){
|
||||
$('#room-status-modal').remove();
|
||||
});
|
||||
|
||||
$(document).on('click', '.submitRoomStatus', function(e) {
|
||||
e.preventDefault();
|
||||
RoomStatusModal.submit();
|
||||
@@ -1712,11 +1743,13 @@ $(document).ready(function() {
|
||||
|
||||
RoomAllotmentCommentModal.show(this);
|
||||
});
|
||||
|
||||
$(document).on('hidden.bs.modal', '#room-allotment-comment-modal', function(){
|
||||
$('#room-allotment-comment-modal').remove();
|
||||
});
|
||||
// End: RoomAllotmentCommentModal: Processes
|
||||
// ======================================
|
||||
|
||||
|
||||
|
||||
// Start: RoomReallocationModal: Processes
|
||||
// For processing room reallocation and swapping
|
||||
$(document).on('click', '.room_reallocate_swap', function(e) {
|
||||
@@ -1822,6 +1855,10 @@ $(document).ready(function() {
|
||||
CancelRoomBookingModal.show();
|
||||
});
|
||||
|
||||
$(document).on('hidden.bs.modal', '#cancel-room-booking-modal', function(){
|
||||
$('#cancel-room-booking-modal').remove();
|
||||
});
|
||||
|
||||
$(document).on('click', '.submitCancelBooking', function(e) {
|
||||
e.preventDefault();
|
||||
CancelRoomBookingModal.submit();
|
||||
@@ -2304,18 +2341,25 @@ const RoomReallocationModal = {
|
||||
success: function(result) {
|
||||
if (result.hasError == 0 && result.modalHtml) {
|
||||
$('#footer').next('.bootstrap').append(result.modalHtml);
|
||||
|
||||
$(".modal_id_htl_booking").val(roomObj.data('id_htl_booking'));
|
||||
$("input.modal_curr_room_num").val(roomObj.data('room_num'));
|
||||
$("span.modal_curr_room_num").text(roomObj.data('room_num') + ', ' + roomObj.data('room_type_name'));
|
||||
$(".cust_name").text(roomObj.data('cust_name'));
|
||||
$(".cust_email").text(roomObj.data('cust_email'));
|
||||
$(".modal_curr_allotent_type").text(roomObj.data('allotment_type_label'));
|
||||
|
||||
// reset price difference fields
|
||||
$("#reallocation_price_diff").val(0);
|
||||
$("#reallocation_price_diff_block").hide();
|
||||
$(".realloc_roomtype_change_message").hide();
|
||||
|
||||
if (roomObj.data('allotment_type') == ALLOTMENT_MANUAL) {
|
||||
$(".allotment_comment_block .modal_curr_allotment_comment").text(roomObj.data('comment'));
|
||||
$(".allotment_comment_block").show();
|
||||
} else {
|
||||
$(".allotment_comment_block").hide();
|
||||
}
|
||||
|
||||
// For Rooms Swapping
|
||||
var json_arr_rm_swp = roomObj.data('avail_rm_swap');
|
||||
if (roomObj.data('avail_rm_swap') != 'false' && json_arr_rm_swp.length != 0) {
|
||||
|
||||
Reference in New Issue
Block a user