diff --git a/js/fullcalendar/main.js b/js/fullcalendar/main.js index 2ad9d49a2..b3a60643c 100644 --- a/js/fullcalendar/main.js +++ b/js/fullcalendar/main.js @@ -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) { diff --git a/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php b/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php index 3030aadc6..340c92cca 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php @@ -466,6 +466,19 @@ public function ajaxProcessGetCalenderData() $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, diff --git a/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js b/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js index 233b65b4a..5650f469d 100644 --- a/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js +++ b/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js @@ -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');