Fix js errors on admin book now page
This commit is contained in:
@@ -9501,7 +9501,6 @@ var FullCalendar = (function (exports) {
|
||||
});
|
||||
return (createElement(ContentHook, { hookProps: hookProps, content: options.dayCellContent, defaultContent: props.defaultContent }, props.children));
|
||||
};
|
||||
console.log(DayCellContent);
|
||||
return DayCellContent;
|
||||
}(BaseComponent));
|
||||
function refineDayCellHookProps(raw) {
|
||||
|
||||
@@ -466,6 +466,19 @@ class AdminHotelRoomsBookingController extends ModuleAdminController
|
||||
$bookingParams['date_from'] = $cal_date_from;
|
||||
$bookingParams['date_to'] = $cal_date_to;
|
||||
$eventData = $objBookingDetail->getBookingData($bookingParams);
|
||||
if (!$eventData) {
|
||||
$eventData['stats'] = array(
|
||||
'total_room_type' => 0,
|
||||
'total_rooms' => 0,
|
||||
'max_avail_occupancy' => 0,
|
||||
'num_unavail' => 0,
|
||||
'num_cart' => 0,
|
||||
'num_booked' => 0,
|
||||
'num_avail' => 0,
|
||||
'num_part_avai' => 0,
|
||||
);
|
||||
}
|
||||
|
||||
$eventData['date_format'] = Tools::displayDate($cal_date_from);
|
||||
$events[strtotime($bookingParams['date_from'])] = array(
|
||||
'is_notification' => 1,
|
||||
|
||||
@@ -49,7 +49,7 @@ $(document).ready(function() {
|
||||
$(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) {
|
||||
} 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');
|
||||
} else {
|
||||
$(info.el).closest('td').find('.day-info svg circle').attr('fill', '#FF3838');
|
||||
|
||||
Reference in New Issue
Block a user