added academics and some other changes to recruitments

This commit is contained in:
Harry Bomrah 2018-01-12 02:51:30 +08:00
parent 280fb5407e
commit 7168ba662f
4 changed files with 19 additions and 16 deletions

View File

@ -145,6 +145,7 @@ class RecruitmentsController < PseudoSessionController
else else
phone = !profile.country_code.nil? ? "+" + profile.country_code + " - " + profile.phone_number : profile.phone_number phone = !profile.country_code.nil? ? "+" + profile.country_code + " - " + profile.phone_number : profile.phone_number
end end
skills = []
skills = profile.skills.collect{|skill| {"skill-name" => skill}} if !profile.skills.empty? skills = profile.skills.collect{|skill| {"skill-name" => skill}} if !profile.skills.empty?
infos = [] infos = []
["autobiography", "resume_content"].each do |t| ["autobiography", "resume_content"].each do |t|
@ -165,14 +166,30 @@ class RecruitmentsController < PseudoSessionController
} }
end end
academics = []
profile.employee_academics.each do |aca|
if !aca.end_date.nil?
period = aca.start_date.strftime("%Y/%m/%d") + " ~ " + aca.end_date.strftime("%Y/%m/%d")
else
period = aca.start_date.strftime("%Y/%m/%d") + " ~ current"
end
academics << {
"title" => (t("recruitment.academic_type.#{aca.academic_type}") + " " + t("recruitment.in") + " " + aca.degree_name),
"period" => period,
"note" => aca.note
}
end
if profile.experience_years == 0 && profile.experience_months == 0 if profile.experience_years == 0 && profile.experience_months == 0
experience = t("recruitment.fresher") experience = t("recruitment.fresher")
else else
experience = (profile.experience_years.to_s rescue "0") + " year(s) " + (profile.experience_months.to_s rescue "0") + " month(s)" experience = (profile.experience_years.to_s rescue "0") + " year(s) " + (profile.experience_months.to_s rescue "0") + " month(s)"
end end
{ {
"skills" => skills, "skills" => skills,
"infos" => infos, "infos" => infos,
"academics" => academics,
"recommendations" => recommendations, "recommendations" => recommendations,
"data" => { "data" => {
"name" => rp.name, "name" => rp.name,

View File

@ -140,22 +140,6 @@
</div> </div>
</div> </div>
<!-- Recommendation 1-->
<div class="form-group">
<%= fe.label :recommendation1_info, t("recruitment.recommendation1_info"), :class => "col-sm-2 control-label" %>
<div class="col-sm-5">
<%= fe.text_area :recommendation1_info, :rows => 5, :class => "form-control", :placeholder => t("recruitment.recommendation_name_contact") %>
</div>
</div>
<!-- Recommendation 2-->
<div class="form-group">
<%= fe.label :recommendation2_info, t("recruitment.recommendation2_info"), :class => "col-sm-2 control-label" %>
<div class="col-sm-5">
<%= fe.text_area :recommendation2_info, :rows => 5, :class => "form-control", :placeholder => t("recruitment.recommendation_name_contact") %>
</div>
</div>
<!-- Resume --> <!-- Resume -->
<% if !@profile.employee_profile.resume.nil? && !@profile.employee_profile.resume.url.nil? %> <% if !@profile.employee_profile.resume.nil? && !@profile.employee_profile.resume.url.nil? %>
<div class="form-group"> <div class="form-group">

View File

@ -2,6 +2,7 @@ en:
module_name: module_name:
recruitment: Recruitment recruitment: Recruitment
recruitment: recruitment:
in: in
min_qualification: Min Qualification min_qualification: Min Qualification
referral_already_recommended: Sorry! You already have written a recommendation for this user. referral_already_recommended: Sorry! You already have written a recommendation for this user.
name: Name name: Name

View File

@ -2,6 +2,7 @@ zh_tw:
module_name: module_name:
recruitment: 招募 recruitment: 招募
recruitment: recruitment:
in: in
min_qualification: Min Qualification min_qualification: Min Qualification
referral_already_recommended: Sorry! You already have written a recommendation for this user. referral_already_recommended: Sorry! You already have written a recommendation for this user.
name: Name name: Name