diff --git a/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php b/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php index 51d83993c..5198bafdd 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminHotelRoomsBookingController.php @@ -31,6 +31,8 @@ class AdminHotelRoomsBookingController extends ModuleAdminController protected $date_to; protected $booking_product; protected $occupancy; + protected $eventColors; + public function __construct() { $this->table = 'htl_booking_detail'; @@ -43,6 +45,13 @@ class AdminHotelRoomsBookingController extends ModuleAdminController $this->_conf[52] = $this->l('Room in the booking is successfully reallocated'); $this->_conf[53] = $this->l('Room in the booking is successfully swapped'); + + $this->eventColors = array( + 'available' => array('event' => '#7EC77B', 'cell' => '#D9EFD8'), + 'partially_available' => array('event' => '#FFC224', 'cell' => '#FFF3CD'), + 'booked' => array('event' => '#00AFF0', 'cell' => '#C3E1FB'), + 'unavailable' => array('event' => '#FF3838', 'cell' => '#FFC4C4'), + ); } public function init() @@ -559,13 +568,13 @@ class AdminHotelRoomsBookingController extends ModuleAdminController $eventData['date_format'] = Tools::displayDate($cal_date_from); $stats = $eventData['stats']; if ($stats['num_avail'] > 0) { - $cellBgColor = '#D9EFD8'; + $cellBgColor = $this->eventColors['available']['cell']; } elseif ($stats['num_part_avai'] > 0) { - $cellBgColor = '#FFF3CD'; + $cellBgColor = $this->eventColors['partially_available']['cell']; } elseif ($stats['num_booked'] == $stats['total_rooms'] && $stats['total_rooms'] != 0) { - $cellBgColor = '#C3E1FB'; + $cellBgColor = $this->eventColors['booked']['cell']; } else { - $cellBgColor = '#FFC4C4'; + $cellBgColor = $this->eventColors['unavailable']['cell']; } $events[strtotime($bookingParams['date_from'])] = array( 'is_notification' => 1, @@ -581,16 +590,16 @@ class AdminHotelRoomsBookingController extends ModuleAdminController $bookingParams['date_to'] = $searchDateTo; if ($bookingData = $objBookingDetail->getBookingData($bookingParams)) { if ($bookingData['stats']['num_avail']) { - $eventColor = '#7EC77B'; + $eventColor = $this->eventColors['available']['event']; $title = sprintf($this->l('%s Available Rooms'), $bookingData['stats']['num_avail']); } elseif ($bookingData['stats']['num_part_avai']) { - $eventColor = '#FFC224'; + $eventColor = $this->eventColors['partially_available']['event']; $title = sprintf($this->l('%s Partially Available Rooms'), $bookingData['stats']['num_part_avai']); } elseif ($bookingData['stats']['num_booked'] == $bookingData['stats']['total_rooms'] && $bookingData['stats']['total_rooms'] != 0 && $bookingData['stats']['num_unavail'] == 0) { - $eventColor = '#00AFF0'; + $eventColor = $this->eventColors['booked']['event']; $title = sprintf($this->l('%s Available Rooms'), $bookingData['stats']['num_avail']); } else { - $eventColor = '#FF3838'; + $eventColor = $this->eventColors['unavailable']['event']; $title = sprintf($this->l('%s Available Rooms'), $bookingData['stats']['num_avail']); } $bookingData['date_from_format'] = Tools::displayDate($searchDateFrom); @@ -600,7 +609,6 @@ class AdminHotelRoomsBookingController extends ModuleAdminController 'title' => $title, 'start' => date('Y-m-d', strtotime($searchDateFrom)), 'end' => date('Y-m-d', strtotime($searchDateTo)), - 'classNames' => array('search-result-event'), 'data' => $bookingData ); } diff --git a/modules/hotelreservationsystem/views/css/HotelReservationAdmin.css b/modules/hotelreservationsystem/views/css/HotelReservationAdmin.css index 80cfa3cd7..a43a72814 100644 --- a/modules/hotelreservationsystem/views/css/HotelReservationAdmin.css +++ b/modules/hotelreservationsystem/views/css/HotelReservationAdmin.css @@ -549,15 +549,20 @@ p.room_cat_data /* book now full calender */ -.fc .fc-daygrid-day.fc-day-today { - background-color: #E3E7F3 !important; -} .fc-daygrid-day-top { justify-content: space-between;} .fc a.fc-daygrid-day-number { color: #333; font-size: 14px; text-decoration: none;} + .fc .fc-daygrid-day.fc-day-today a.fc-daygrid-day-number { + background-color: #FC3D39; + color: #FFFFFF; + line-height: 1; + border-radius: 50%; + padding: 4px; + margin: 2px 2px 0px 0px; + } .fc-daygrid-day-top .day-info { font-size: 15px; diff --git a/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js b/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js index 03c3c3b63..e52d8e4c5 100644 --- a/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js +++ b/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js @@ -45,7 +45,7 @@ $(document).ready(function() { }, eventContent: function(info) { - if (info.event.classNames.indexOf('search-result-event') !== -1) { + if (!info.event.extendedProps.is_notification) { return { html: '