diff --git a/modules/hotelreservationsystem/views/css/HotelReservationAdmin.css b/modules/hotelreservationsystem/views/css/HotelReservationAdmin.css index a207087a6..9cc9c00ef 100644 --- a/modules/hotelreservationsystem/views/css/HotelReservationAdmin.css +++ b/modules/hotelreservationsystem/views/css/HotelReservationAdmin.css @@ -249,10 +249,10 @@ p.room_cat_data .indi_cont { - margin: 10px 0px; + display: flex; + align-items: center; } - .cart-table-thead { border-bottom: 1px solid #555!important; @@ -607,6 +607,61 @@ body.adminhotelroomsbooking .ui-tooltip { padding: 10px; box-shadow: 0px 0px 15px 0px #00000026; } +#fullcalendar .fc-daygrid-day-events { + height: 0 ; + min-height: 0; + overflow: visible; +} +#fullcalendar .fc-event.search-result-event { + background-color: #FFFFFF; + border-top: none; + border-right: none; + border-bottom: none; + border-left-width: 5px; + border-left-style: solid; + border-radius: 3px; + box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.05); + margin: 1px 4px; + padding: 2px 8px; + line-height: 1.4; + display: flex; + align-items: center; + overflow: hidden; +} +#fullcalendar .fc-event.search-result-event .fc-event-title { + font-size: 14px; + font-weight: 400; + color: #333333; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + padding: 1px; +} +#fullcalendar .fc-event.search-result-event .search-bar-count { + font-weight: 600; +} +#fullcalendar .fc-event.search-result-event:not(.fc-event-start) { + border-left: none; + padding-left: 13px; + margin-left: 0; + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +#fullcalendar .fc-event.search-result-event:not(.fc-event-end) { + margin-right: 0; + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +#fullcalendar .fc-event.search-result-event:not(.fc-event-start) .fc-event-main { + visibility: hidden; +} +.calendar-legend { + display: flex; + justify-content: space-evenly; + align-items: center; + flex-wrap: nowrap; + padding-top: 14px; +} #room-reallocation-modal .modal-footer { padding: 15px 0px 0px 0px diff --git a/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js b/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js index 225f08bd2..d823316b7 100644 --- a/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js +++ b/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js @@ -51,16 +51,19 @@ $(document).ready(function() { }, eventDidMount: function(info) { if (info.event.extendedProps.is_notification) { - if (info.event.extendedProps.data.stats.num_avail > 0) { - $(info.el).closest('td').find('.day-info svg circle').attr('fill', '#7EC77B'); - } else if (info.event.extendedProps.data.stats.num_part_avai > 0) { - $(info.el).closest('td').find('.day-info svg circle').attr('fill', '#FFC224'); - } else if ((info.event.extendedProps.data.stats.num_booked == info.event.extendedProps.data.stats.total_rooms) && info.event.extendedProps.data.stats.total_rooms != 0) { - $(info.el).closest('td').find('.day-info svg circle').attr('fill', '#00AFF0'); + var $cell = $(info.el).closest('td'); + var stats = info.event.extendedProps.data.stats; + var bgColor; + if (stats.num_avail > 0) { + bgColor = '#D9EFD8'; + } else if (stats.num_part_avai > 0) { + bgColor = '#FFF3CD'; + } else if (stats.num_booked == stats.total_rooms && stats.total_rooms != 0) { + bgColor = '#C3E1FB'; } else { - $(info.el).closest('td').find('.day-info svg circle').attr('fill', '#FF3838'); + bgColor = '#FFC4C4'; } - $(info.el).closest('td').find('.day-info').tooltip({ + $cell.tooltip({ content: function() { $('#date-stats-tooltop .tip_date').text(info.event.extendedProps.data.date_format); @@ -73,7 +76,7 @@ $(document).ready(function() { }); return $('#date-stats-tooltop').html(); }, - items: "div", + items: "td", trigger : 'hover', show: { delay: 100, @@ -91,6 +94,12 @@ $(document).ready(function() { return false; } + // suppress cell tooltip when hovering the search result bar + if ($(event.originalEvent.target).closest('.search-result-event').length) { + ui.tooltip.remove(); + return false; + } + var $id = $(ui.tooltip).attr('id'); // close any lingering tooltips @@ -113,7 +122,10 @@ $(document).ready(function() { }); } }); - info.event.remove(); + info.event.remove(); + setTimeout(function() { + $cell.find('.fc-daygrid-day-frame').css('background-color', bgColor); + }, 0); } else { $(info.el).tooltip({ content: function() @@ -174,11 +186,6 @@ $(document).ready(function() { }); } }, - dayCellDidMount: (arg) => { - - let svg = $('#svg-icon').html(); - $(arg.el).find('.fc-daygrid-day-top').append(''+svg+''); - }, datesSet: function(arg) { if($('.fc-event').tooltip()) { $('.fc-event').tooltip('destroy'); @@ -189,7 +196,7 @@ $(document).ready(function() { } function removeInitializedTooltips() { - $('#fullcalendar a.day-info, #fullcalendar .fc-daygrid-event').each(function () { + $('#fullcalendar td.fc-daygrid-day, #fullcalendar .fc-daygrid-event').each(function () { if ($(this).data('ui-tooltip')) { $(this).tooltip('destroy'); } @@ -753,6 +760,7 @@ $(document).ready(function() { e.preventDefault(); var booking_occupancy_wrapper = $(this).closest('.booking_occupancy_wrapper'); + var max_child_in_room = $(booking_occupancy_wrapper).find('.max_children').val(); var occupancy_block = ''; var roomBlockIndex = parseInt($(booking_occupancy_wrapper).find(".occupancy_info_block").last().attr('occ_block_index')); roomBlockIndex += 1; diff --git a/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/search-stats.tpl b/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/search-stats.tpl index 11690bc24..44b27250f 100644 --- a/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/search-stats.tpl +++ b/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/search-stats.tpl @@ -63,23 +63,4 @@