This commit is contained in:
BoHung Chiu 2021-10-26 18:58:47 +08:00
parent 12eea8b58e
commit 2de6ba54ae
1 changed files with 1 additions and 0 deletions

View File

@ -1,6 +1,7 @@
module Admin::PropertyHiresHelper
data = File.open(File.join(File.dirname(__FILE__), '../../../config', 'list.yml')).read
$property_list = YAML::load(ERB.new(data).result(binding)).symbolize_keys
include OrbitBackendHelper
def check_for_availability(stime, etime, pid, interval=nil, recurring_end_date=nil, time_setting_id=nil)
property = Property.find(pid)
return {"success" => false, "msg" => I18n.t("property_hire.values_are_not_ok",:default=>"Values are not ok.")} if property.nil? || stime.blank? || etime.blank?