Update booking calendar UI design
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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('<a class="day-info">'+svg+'</a>');
|
||||
},
|
||||
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;
|
||||
|
||||
@@ -63,23 +63,4 @@
|
||||
<hr class="hr_style" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-6 indi_cont clearfix">
|
||||
<span class="color_indicate bg-green"></span>
|
||||
<span class="indi_label">{l s='Available Rooms' mod='hotelreservationsystem'}</span>
|
||||
</div>
|
||||
<div class="col-sm-6 indi_cont clearfix">
|
||||
<span class="color_indicate bg-yellow"></span>
|
||||
<span class="indi_label">{l s='Partially Available' mod='hotelreservationsystem'}</span>
|
||||
</div>
|
||||
<div class="col-sm-6 indi_cont clearfix">
|
||||
<span class="color_indicate bg-red"></span>
|
||||
<span class="indi_label">{l s='Unavailable Rooms' mod='hotelreservationsystem'}</span>
|
||||
</div>
|
||||
<div class="col-sm-6 indi_cont clearfix">
|
||||
<span class="color_indicate bg-blue"></span>
|
||||
<span class="indi_label">{l s='Booked Rooms' mod='hotelreservationsystem'}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -194,6 +194,24 @@
|
||||
{if !isset($booking_product) || (isset($booking_product) && $booking_product == 1)}
|
||||
<div id='fullcalendar'></div>
|
||||
{hook h='displayAdminRoomsBookingCalendarAfter'}
|
||||
<div class="row calendar-legend">
|
||||
<div class="indi_cont clearfix">
|
||||
<span class="color_indicate bg-green"></span>
|
||||
<span class="indi_label">{l s='Available Rooms' mod='hotelreservationsystem'}</span>
|
||||
</div>
|
||||
<div class="indi_cont clearfix">
|
||||
<span class="color_indicate bg-yellow"></span>
|
||||
<span class="indi_label">{l s='Partially Available' mod='hotelreservationsystem'}</span>
|
||||
</div>
|
||||
<div class="indi_cont clearfix">
|
||||
<span class="color_indicate bg-red"></span>
|
||||
<span class="indi_label">{l s='Unavailable Rooms' mod='hotelreservationsystem'}</span>
|
||||
</div>
|
||||
<div class="indi_cont clearfix">
|
||||
<span class="color_indicate bg-blue"></span>
|
||||
<span class="indi_label">{l s='Booked Rooms' mod='hotelreservationsystem'}</span>
|
||||
</div>
|
||||
</div>
|
||||
{else}
|
||||
<div class="panel-body">
|
||||
{include file="./_partials/service-products.tpl"}
|
||||
@@ -253,6 +271,3 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<template id="svg-icon">
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" r="8"/><path d="M8.06536 3C8.30937 3 8.51561 3.07032 8.6841 3.21097C8.85839 3.34693 8.94553 3.51336 8.94553 3.71027C8.94553 3.90717 8.85839 4.07595 8.6841 4.2166C8.51561 4.35724 8.30937 4.42757 8.06536 4.42757C7.82135 4.42757 7.6122 4.35724 7.43791 4.2166C7.26362 4.07595 7.17647 3.90717 7.17647 3.71027C7.17647 3.51336 7.26071 3.34693 7.42919 3.21097C7.60349 3.07032 7.81554 3 8.06536 3ZM8.78867 6.3685V11.5443C8.78867 11.9475 8.82353 12.2171 8.89325 12.353C8.96877 12.4843 9.07625 12.5827 9.21569 12.6484C9.36093 12.714 9.62237 12.7468 10 12.7468V13H6.122V12.7468C6.51126 12.7468 6.77269 12.7164 6.90632 12.6554C7.03994 12.5945 7.14452 12.4937 7.22004 12.353C7.30138 12.2124 7.34205 11.9428 7.34205 11.5443V9.06188C7.34205 8.36334 7.3159 7.91092 7.26362 7.70464C7.22295 7.55462 7.15904 7.45148 7.0719 7.39522C6.98475 7.33427 6.86565 7.3038 6.7146 7.3038C6.55192 7.3038 6.35439 7.33896 6.122 7.40928L6 7.15612L8.40523 6.3685H8.78867Z" fill="white"/></svg>
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user