some issues fixed

This commit is contained in:
Harry Bomrah 2018-01-03 12:46:00 +08:00
parent 65a5a1302a
commit 7a68ae8e75
1 changed files with 6 additions and 2 deletions

View File

@ -140,7 +140,11 @@ class RecruitmentsController < PseudoSessionController
def show_candidate(params)
rp = RecruitProfile.where(:uid => params[:uid]).first
profile = rp.profile
phone = !profile.country_code.nil? ? "+" + profile.country_code + " - " + profile.phone_number : profile.phone_number
if (profile.country_code.nil? || profile.country_code == "") && (profile.phone_number.nil? || profile.phone_number == "")
phone = t("recruitment.not_available")
else
phone = !profile.country_code.nil? ? "+" + profile.country_code + " - " + profile.phone_number : profile.phone_number
end
skills = profile.skills.collect{|skill| {"skill-name" => skill}} if !profile.skills.empty?
infos = []
["autobiography", "resume_content", "recommendation1_info", "recommendation2_info"].each do |t|
@ -180,7 +184,7 @@ class RecruitmentsController < PseudoSessionController
"language-title" => t("recruitment.language_title"),
"language" => profile.languages,
"workingtime-title" => t("recruitment.workingtime_title"),
"workingtime" => t("recruitment.working_time.#{profile.working_time}")
"workingtime" => (!profile.working_time.nil? && profile.working_time != "" ? t("recruitment.working_time.#{profile.working_time}") : t("recruitment.not_available")),
}
}
end