@ -54,7 +54,7 @@ module Admin
|
||||
private
|
||||
|
||||
def candidate_params
|
||||
params.require(:candidate).permit(:name, :email, :experience, :quiz_id)
|
||||
params.require(:candidate).permit(:name, :email, :experience, :quiz_id, :project)
|
||||
end
|
||||
|
||||
def collect_quizzes
|
||||
|
@ -14,6 +14,7 @@ class Candidate < ApplicationRecord
|
||||
validates :recruiter_id, presence: true
|
||||
validates :name, presence: true
|
||||
validates :experience, presence: true
|
||||
validates :project, presence: true
|
||||
validates :email, uniqueness: true, presence: true, email_format: true
|
||||
validates :test_hash, uniqueness: true, presence: true
|
||||
|
||||
|
@ -16,6 +16,11 @@
|
||||
<%= form.select :experience, experience_options(candidate.experience), include_blank: false %>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= form.label :project, "Client or project" %>
|
||||
<%= form.text_field :project %>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<%= form.label :quiz_id, "Quiz" %>
|
||||
<%= form.select :quiz_id, quiz_options(quizzes, candidate.quiz_id), include_blank: (quizzes.size > 1) %>
|
||||
|
@ -7,6 +7,7 @@
|
||||
<tr>
|
||||
<th>Test ID</th>
|
||||
<th>Experience</th>
|
||||
<th>Client/Project</th>
|
||||
<th>Recruiter</th>
|
||||
<th>Submitted on</th>
|
||||
<th>Interview?</th>
|
||||
@ -16,6 +17,7 @@
|
||||
<tr>
|
||||
<td><%= link_to candidate.test_hash, admin_result_path(candidate.test_hash) %></td>
|
||||
<td><%= candidate.experience %> years</td>
|
||||
<td><%= candidate.project %></td>
|
||||
<td><%= mail_to(candidate.recruiter.email) %></td>
|
||||
<td><%= candidate.completed_at.strftime('%D') unless candidate.completed_at.nil? %></td>
|
||||
<td><%= candidate.interview? %></td>
|
||||
|
@ -9,6 +9,7 @@
|
||||
<div>
|
||||
<strong>Test ID:</strong> <%= @candidate.test_hash %><br />
|
||||
<strong>Years of Experience:</strong> <%= @candidate.experience %><br />
|
||||
<strong>Client/Project:</strong> <%= @candidate.project %><br />
|
||||
<strong>Recruiter Email:</strong> <%= mail_to @candidate.recruiter.name, @candidate.recruiter.email %><br />
|
||||
</div>
|
||||
|
||||
|
@ -7,8 +7,9 @@
|
||||
<strong>Candidate email:</strong> <%= @candidate.email %><br />
|
||||
<strong>Candidate ID:</strong> <%= @candidate.test_hash %><br />
|
||||
<strong>Years of experience:</strong> <%= @candidate.experience %> Years<br />
|
||||
<strong>Client/Project:</strong> <%= @candidate.project %><br />
|
||||
</p>
|
||||
|
||||
<p>You will be notified when the candidate has finished taking the test.</p>
|
||||
</columns>
|
||||
</row>
|
||||
</row>
|
||||
|
@ -6,5 +6,6 @@ Candidate name: <%= @candidate.name %>
|
||||
Candidate email: <%= @candidate.email %>
|
||||
Candidate ID: <%= @candidate.test_hash %>
|
||||
Years of experience: <%= @candidate.experience %> Years
|
||||
Client/Project: <%= @candidate.project %>
|
||||
|
||||
You will be notified when the candidate has finished taking the test.
|
||||
|
@ -1,6 +1,9 @@
|
||||
<row>
|
||||
<columns class="email-body">
|
||||
<p>Candidate <strong><%= @candidate.test_hash %></strong> has completed the Skills Assessment Test.</p>
|
||||
<p>
|
||||
Candidate <strong><%= @candidate.test_hash %></strong> has completed the
|
||||
Skills Assessment Test for client/project <%= @candidate.project %>.
|
||||
</p>
|
||||
<p>You can view the results here: <%= link_to nil, admin_result_url(@candidate.test_hash) %>.</p>
|
||||
</columns>
|
||||
</row>
|
||||
|
@ -1,5 +1,5 @@
|
||||
PERFICIENT/digital SKILLS ASSESSMENT RESULTS
|
||||
|
||||
Candidate <%= @candidate.test_hash %> has completed the Skills Assessment Test.
|
||||
Candidate <%= @candidate.test_hash %> has completed the Skills Assessment Test for client/project <%= @candidate.project %>.
|
||||
|
||||
You can view the results here: <%= admin_result_url(@candidate.test_hash) %>.
|
||||
|
Reference in New Issue
Block a user