fix error

This commit is contained in:
邱博亞 2022-02-08 15:26:12 +08:00
parent 70388806c6
commit e93d34d597
3 changed files with 3 additions and 3 deletions

View File

@ -105,7 +105,7 @@ window.getDateString = function(date, format,is_chinese) {
};
var Calendar = function(dom,property_id,currentView,display_hire_event){
c = this;
var c = this;
display_hire_event = (display_hire_event == undefined ? true : display_hire_event);
this.title = $("#current_title");
this.calendar_dom = $(dom);

View File

@ -83,7 +83,7 @@ class PHire
end
def self.monthly_event(start_date,end_date,property_id,date_only=false)
events = self.where(:property_id => property_id, :recurring => false).any_of(:start_time.gte => start_date, :end_time.gte => start_date).and(:start_time.lte => end_date).asc(:start_time)
events = self.where(:property_id => property_id, :recurring => false).any_of([{:start_time.gte => start_date}, {:end_time.gte => start_date}]).and(:start_time.lte => end_date).asc(:start_time)
if date_only
events = events.where(:date.ne=>nil)
end

View File

@ -370,7 +370,7 @@ class Property
else
d_step = 0
end
bookings = bookings.any_of({:start_time.gte => etime},{:end_time.gte => etime})
bookings = bookings.any_of([{:start_time.gte => etime},{:end_time.gte => etime}])
if time_setting_id
recurring_bookings = recurring_bookings.where(:property_day_setting_id=>time_setting_id)
bookings = recurring_bookings.where(:property_day_setting_id=>time_setting_id)