fix error
This commit is contained in:
parent
70388806c6
commit
e93d34d597
|
@ -105,7 +105,7 @@ window.getDateString = function(date, format,is_chinese) {
|
||||||
};
|
};
|
||||||
var Calendar = function(dom,property_id,currentView,display_hire_event){
|
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);
|
display_hire_event = (display_hire_event == undefined ? true : display_hire_event);
|
||||||
this.title = $("#current_title");
|
this.title = $("#current_title");
|
||||||
this.calendar_dom = $(dom);
|
this.calendar_dom = $(dom);
|
||||||
|
|
|
@ -83,7 +83,7 @@ class PHire
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.monthly_event(start_date,end_date,property_id,date_only=false)
|
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
|
if date_only
|
||||||
events = events.where(:date.ne=>nil)
|
events = events.where(:date.ne=>nil)
|
||||||
end
|
end
|
||||||
|
|
|
@ -370,7 +370,7 @@ class Property
|
||||||
else
|
else
|
||||||
d_step = 0
|
d_step = 0
|
||||||
end
|
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
|
if time_setting_id
|
||||||
recurring_bookings = recurring_bookings.where(:property_day_setting_id=>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)
|
bookings = recurring_bookings.where(:property_day_setting_id=>time_setting_id)
|
||||||
|
|
Loading…
Reference in New Issue