added experience
This commit is contained in:
parent
7168ba662f
commit
5be0e54280
|
@ -168,18 +168,23 @@ class RecruitmentsController < PseudoSessionController
|
||||||
|
|
||||||
academics = []
|
academics = []
|
||||||
profile.employee_academics.each do |aca|
|
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 << {
|
academics << {
|
||||||
"title" => (t("recruitment.academic_type.#{aca.academic_type}") + " " + t("recruitment.in") + " " + aca.degree_name),
|
"title" => (t("recruitment.academic_type.#{aca.academic_type}") + " " + t("recruitment.in") + " " + aca.degree_name),
|
||||||
"period" => period,
|
"period" => aca.period,
|
||||||
"note" => aca.note
|
"note" => aca.note
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
experiences = []
|
||||||
|
profile.employee_experiences.asc(:end_date).each do |exp|
|
||||||
|
experiences << {
|
||||||
|
"job-title" => exp.job_title,
|
||||||
|
"company-name" => exp.company_name,
|
||||||
|
"period" => exp.period,
|
||||||
|
"responsibilities" => exp.responsibilities
|
||||||
|
}
|
||||||
|
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
|
||||||
|
@ -190,6 +195,7 @@ class RecruitmentsController < PseudoSessionController
|
||||||
"skills" => skills,
|
"skills" => skills,
|
||||||
"infos" => infos,
|
"infos" => infos,
|
||||||
"academics" => academics,
|
"academics" => academics,
|
||||||
|
"experiences" => experiences,
|
||||||
"recommendations" => recommendations,
|
"recommendations" => recommendations,
|
||||||
"data" => {
|
"data" => {
|
||||||
"name" => rp.name,
|
"name" => rp.name,
|
||||||
|
|
|
@ -9,4 +9,14 @@ class EmployeeAcademic
|
||||||
field :note, localize: true
|
field :note, localize: true
|
||||||
|
|
||||||
belongs_to :employee_profile
|
belongs_to :employee_profile
|
||||||
|
|
||||||
|
def period
|
||||||
|
if !self.end_date.nil?
|
||||||
|
period = self.start_date.strftime("%Y/%m/%d") + " ~ " + self.end_date.strftime("%Y/%m/%d")
|
||||||
|
else
|
||||||
|
period = self.start_date.strftime("%Y/%m/%d") + " ~ current"
|
||||||
|
end
|
||||||
|
period
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
|
@ -10,5 +10,13 @@ class EmployeeExperience
|
||||||
|
|
||||||
belongs_to :employee_profile
|
belongs_to :employee_profile
|
||||||
|
|
||||||
|
def period
|
||||||
|
if !self.end_date.nil?
|
||||||
|
period = self.start_date.strftime("%Y/%m/%d") + " ~ " + self.end_date.strftime("%Y/%m/%d")
|
||||||
|
else
|
||||||
|
period = self.start_date.strftime("%Y/%m/%d") + " ~ current"
|
||||||
|
end
|
||||||
|
period
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
Loading…
Reference in New Issue