From cb4065aef7b111ceaebcec0762b15c851e08af3e Mon Sep 17 00:00:00 2001 From: wmcheng Date: Fri, 14 Jun 2019 01:26:53 +0800 Subject: [PATCH 1/5] Update property_hires_controller.rb show issue --- app/controllers/property_hires_controller.rb | 26 +++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/app/controllers/property_hires_controller.rb b/app/controllers/property_hires_controller.rb index ddc31cf..cf69536 100644 --- a/app/controllers/property_hires_controller.rb +++ b/app/controllers/property_hires_controller.rb @@ -79,7 +79,7 @@ class PropertyHiresController < ApplicationController "header" => t("property_hire.can_be_hired"), "value" => (property.can_be_hired ? "Yes" : "No") } - if !property_hire.purchase_date.blank? + if !property_hire.purchase_date.to_s.blank? data << { "header" => t("property_hire.purchase_date"), "value" => property.purchase_date.strftime("%Y-%m-%d") @@ -90,34 +90,36 @@ class PropertyHiresController < ApplicationController else owners = property.owner_profiles.collect{|mp| mp.name}.join(",") end - if !property_hire.owners.blank? + if !owners.blank? data << { "header" => t("property_hire.owners"), "value" => owners } end - if !property_hire.owner_email.blank? + if !property.owner_email.blank? data << { - "header" => t("property_hire.owner_email"), + "header" => t("property_hire.owner_email"), "value" => property.owner_email } end - if !property_hire.owner_phone.blank? + if !property.owner_phone.blank? data << { - "header" => t("property_hire.owner_phone"), + "header" => t("property_hire.owner_phone"), "value" => property.owner_phone } end - if !property_hire.price.blank? + if !property.price.blank? data << { - "header" => t("property_hire.price"), + "header" => t("property_hire.price"), "value" => property.price } + end + if !property.get_location_name.blank? + data << { + "header" => t("property_hire.location"), + "value" => property.get_location_name + } end - data << { - "header" => t("property_hire.location"), - "value" => property.get_location_name - } actions = [] if property.can_be_hired actions << { From 3f7d0445390d6e87de2706ee073a2b9ec7bc3700 Mon Sep 17 00:00:00 2001 From: wmcheng Date: Fri, 14 Jun 2019 01:33:44 +0800 Subject: [PATCH 2/5] Update property_hires_controller.rb --- app/controllers/property_hires_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/property_hires_controller.rb b/app/controllers/property_hires_controller.rb index cf69536..60dba3f 100644 --- a/app/controllers/property_hires_controller.rb +++ b/app/controllers/property_hires_controller.rb @@ -69,7 +69,7 @@ class PropertyHiresController < ApplicationController "value" => property.note } end - if !property_hire.property_number.blank? + if !property.property_number.blank? data << { "header" => t("property_hire.property_number"), "value" => property.property_number @@ -79,7 +79,7 @@ class PropertyHiresController < ApplicationController "header" => t("property_hire.can_be_hired"), "value" => (property.can_be_hired ? "Yes" : "No") } - if !property_hire.purchase_date.to_s.blank? + if !property.purchase_date.to_s.blank? data << { "header" => t("property_hire.purchase_date"), "value" => property.purchase_date.strftime("%Y-%m-%d") From 0dc32eb76ef78ab71b3aa871b057e5859bba8e02 Mon Sep 17 00:00:00 2001 From: wmcheng Date: Mon, 1 Jul 2019 12:12:11 +0800 Subject: [PATCH 3/5] Update p_hire.rb per_name --- app/models/p_hire.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/p_hire.rb b/app/models/p_hire.rb index 30f8ba1..53f157e 100644 --- a/app/models/p_hire.rb +++ b/app/models/p_hire.rb @@ -23,6 +23,7 @@ class PHire { :id => self.id.to_s, :title => self.reason_for_hire, + :hiring_person_name => self.hiring_person_name, :note => self.note_for_hire || "", :start => self.start_time.rfc822, :end => self.end_time.rfc822, From 29da2e93429455c03bf7ae12ce537e3135bb606d Mon Sep 17 00:00:00 2001 From: wmcheng Date: Mon, 1 Jul 2019 12:14:28 +0800 Subject: [PATCH 4/5] Update hire_name --- app/assets/javascripts/property_hire_calendar_frontend.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/property_hire_calendar_frontend.js b/app/assets/javascripts/property_hire_calendar_frontend.js index 8fb74a1..8f314f6 100644 --- a/app/assets/javascripts/property_hire_calendar_frontend.js +++ b/app/assets/javascripts/property_hire_calendar_frontend.js @@ -153,7 +153,7 @@ var EventDialog = function(calendar,event){ '

' + _event.title + '

' + '' + '' + '