diff --git a/admin/themes/default/sass/controllers/_order.sass b/admin/themes/default/sass/controllers/_order.sass index 57b6189f6..246660d86 100644 --- a/admin/themes/default/sass/controllers/_order.sass +++ b/admin/themes/default/sass/controllers/_order.sass @@ -26,7 +26,23 @@ img max-height: 55px max-width: 55px +.loading_overlay + display: none + position: fixed + left: 0 + top: 0 + height: 100% + width: 100% + background-color: rgba(0, 0, 0, 0.5) + z-index: 100000 + .loading-img + position: absolute + top: 50% + left: 0 + right: 0 + margin: 0 auto + .room_status_info_form .room_status - white-space: normal \ No newline at end of file + white-space: normal diff --git a/admin/themes/default/template/controllers/orders/_product_line.tpl b/admin/themes/default/template/controllers/orders/_product_line.tpl index a6297373a..97aa339ba 100644 --- a/admin/themes/default/template/controllers/orders/_product_line.tpl +++ b/admin/themes/default/template/controllers/orders/_product_line.tpl @@ -259,7 +259,7 @@ -
+
+ + {* loader before loading data *} +
+ +
@@ -1620,7 +1663,11 @@ {strip} - {addJsDefL name=no_rm_avail_txt}{l s='No rooms available.' js=1}{/addJsDefL} + {addJsDefL name=no_rm_avail_txt}{l s='No room available.' js=1}{/addJsDefL} + {addJsDefL name=no_realloc_rm_avail_txt}{l s='No room available for reallocation.' js=1}{/addJsDefL} + {addJsDefL name=no_realloc_rm_type_avail_txt}{l s='No room type available for reallocation.' js=1}{/addJsDefL} + {addJsDefL name=no_swap_rm_avail_txt}{l s='No room available for swap.' js=1}{/addJsDefL} + {addJsDefL name=slct_rm_type_err}{l s='Please select a room type first.' js=1}{/addJsDefL} {addJsDefL name=slct_rm_err}{l s='Please select a room first.' js=1}{/addJsDefL} {addJsDefL name=txtExtraDemandSucc}{l s='Updated Successfully' js=1}{/addJsDefL} {addJsDefL name=atleastSelectTxt}{l s='Select at least one facility to update.' js=1}{/addJsDefL} @@ -1641,6 +1688,7 @@ {addJsDefL name='years_txt'}{l s='years' js=1}{/addJsDefL} {addJsDefL name='all_children_txt'}{l s='All Children' js=1}{/addJsDefL} {addJsDefL name='invalid_occupancy_txt'}{l s='Invalid occupancy(adults/children) found.' js=1}{/addJsDefL} + {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'} {addJsDefL name='undo_cancellation_success'}{l s='Booking cancellation undo process is done successfully.' js=1}{/addJsDefL} @@ -1792,41 +1840,6 @@ } }); - function updateAdditionalServices(element) - { - var id_room_type_service_product_order_detail = $(element).data('id_room_type_service_product_order_detail'); - var qty = $(element).val(); - if ($.isNumeric(qty)) { - $.ajax({ - type: 'POST', - headers: { - "cache-control": "no-cache" - }, - url: "{$link->getAdminLink('AdminOrders')|addslashes}", - dataType: 'JSON', - cache: false, - data: { - id_room_type_service_product_order_detail: id_room_type_service_product_order_detail, - qty: qty, - action: 'updateRoomAdditionalServices', - ajax: true - }, - success: function(jsonData) { - if (!jsonData.hasError) { - if (jsonData.service_panel) { - $('#room_type_service_product_desc').replaceWith(jsonData.service_panel); - } - showSuccessMessage(txtExtraDemandSucc); - } else { - showErrorMessage(jsonData.errors); - - } - } - }); - } - - } - $(document).on('submit', '#add_room_services_form', function(e) { e.preventDefault(); var form_data = new FormData(this); @@ -1990,65 +2003,153 @@ $('#mySwappigModal').on('hidden.bs.modal', function (e) { - $(".modal_id_order").val(''); - $(".modal_date_from").val(''); - $(".modal_date_to").val(''); - $(".modal_id_room").val(''); + $(".modal_id_htl_booking").val(''); $(".modal_curr_room_num").val(''); $(".cust_name").text(''); $(".cust_email").text(''); $(".swp_rm_opts").remove(); + $(".realloc_rm_type_opts").remove(); $(".realloc_rm_opts").remove(); }); $('#mySwappigModal').on('shown.bs.modal', function (e) { - $(".modal_id_order").val(e.relatedTarget.dataset.id_order); - $(".modal_date_from").val(e.relatedTarget.dataset.date_from); - $(".modal_date_to").val(e.relatedTarget.dataset.date_to); - $(".modal_id_room").val(e.relatedTarget.dataset.id_room); - $(".modal_curr_room_num").val(e.relatedTarget.dataset.room_num); + $(".loading_overlay").show(); + + $(".modal_id_htl_booking").val(e.relatedTarget.dataset.id_htl_booking); + $(".modal_curr_room_num").val(e.relatedTarget.dataset.room_num + ', ' + e.relatedTarget.dataset.room_type_name); $(".cust_name").text(e.relatedTarget.dataset.cust_name); $(".cust_email").text(e.relatedTarget.dataset.cust_email); - // For Rooms Swapping - if (e.relatedTarget.dataset.avail_rm_swap != 'false') { - var json_arr_rm_swp = JSON.parse(e.relatedTarget.dataset.avail_rm_swap); + // reset price difference fields + $("#reallocation_price_diff").val(0); + $("#reallocation_price_diff_block").hide(); + $(".realloc_roomtype_change_message").hide(); - html = ''; $.each(json_arr_rm_swp, function(key,val) { - html += ''; + html += ''; }); html += ''; + + $("#swap_allocated_rooms").removeAttr('disabled'); $(".swap_avail_rooms_container").empty().append(html); } else { - $(".swap_avail_rooms_container").empty().text(no_rm_avail_txt); + $(".swap_avail_rooms_container").empty().text(no_swap_rm_avail_txt).addClass('text-danger'); + $("#swap_allocated_rooms").attr('disabled', 'disabled'); } // For Rooms Reallocation - if (e.relatedTarget.dataset.avail_rm_realloc != 'false') { - var json_arr_rm_realloc = JSON.parse(e.relatedTarget.dataset.avail_rm_realloc); - - html = ''; + $.each(json_arr_realloc_room_types, function(key, room_type) { + roomsTypesHtml += "'; +function setRoomsForReallocation(roomsAvailable) +{ + if (typeof(roomsAvailable) != 'undefined' && roomsAvailable.length) { + var roomsHtml = ''; - html = ''; - if (e.relatedTarget.dataset.avail_rm_realloc) { - var json_arr_rm_realloc = JSON.parse(e.relatedTarget.dataset.avail_rm_realloc); - $.each(json_arr_rm_realloc, function(key, val) { - html += ''; - }); - } - if (html != '') { - $("#realloc_avail_rooms").append(html); - } - }); -}); \ No newline at end of file + $(".realloc_avail_rooms_container").empty().append(roomsHtml); + } else { + $(".realloc_avail_rooms_container").empty().text(no_realloc_rm_avail_txt); + } +} diff --git a/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/booking-rooms.tpl b/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/booking-rooms.tpl index f21269ea5..fc3a4776b 100644 --- a/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/booking-rooms.tpl +++ b/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/booking-rooms.tpl @@ -220,7 +220,7 @@ {if $rm_dtl_v['booking_type'] == HotelBookingDetail::ALLOTMENT_AUTO} - {else} @@ -259,4 +259,4 @@ {/foreach} - \ No newline at end of file + diff --git a/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/view.tpl b/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/view.tpl index 4c54fdddd..82c2df3fb 100644 --- a/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/view.tpl +++ b/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/view.tpl @@ -216,94 +216,134 @@