mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[FIX] Resize Reservation Issue
This commit is contained in:
@@ -598,6 +598,8 @@ HotelCalendar.prototype = {
|
|||||||
|
|
||||||
//==== ROOMS
|
//==== ROOMS
|
||||||
_filterRooms: function() {
|
_filterRooms: function() {
|
||||||
|
// Two-Step filter: Scrollbar mistake
|
||||||
|
// 1. Filter rooms
|
||||||
for (var r of this.options.rooms) {
|
for (var r of this.options.rooms) {
|
||||||
r._active = this._in_domain(r, this._domains[HotelCalendar.DOMAIN.ROOMS]);
|
r._active = this._in_domain(r, this._domains[HotelCalendar.DOMAIN.ROOMS]);
|
||||||
if (r._active) {
|
if (r._active) {
|
||||||
@@ -605,14 +607,21 @@ HotelCalendar.prototype = {
|
|||||||
} else {
|
} else {
|
||||||
r._html.classList.add('hcal-hidden');
|
r._html.classList.add('hcal-hidden');
|
||||||
}
|
}
|
||||||
if (r.id in this._reservationsMap) {
|
|
||||||
for (var reserv of this._reservationsMap[r.id]) {
|
|
||||||
this._updateReservation(reserv, !r._active);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this._calcViewHeight();
|
this._calcViewHeight();
|
||||||
|
|
||||||
|
// 2. Update Reservations
|
||||||
|
_.defer(function(self){
|
||||||
|
for (var r of self.options.rooms) {
|
||||||
|
var isHidden = r._html.classList.contains('hcal-hidden');
|
||||||
|
if (r.id in self._reservationsMap) {
|
||||||
|
for (var reserv of self._reservationsMap[r.id]) {
|
||||||
|
self._updateReservation(reserv, isHidden);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, this);
|
||||||
//_.defer(function(){ this._updateReservationOccupation() }.bind(this));
|
//_.defer(function(){ this._updateReservationOccupation() }.bind(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user