-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply with cheddar feature #210
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comments
end | ||
|
||
def generate_csv | ||
return true unless current_user&.admin? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How come we have the & operator here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are right. we should remove it.
app/helpers/user_account_helper.rb
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To avoid to pollute the views ... it sets the css of the current tab to the right color
app/models/application_criterion.rb
Outdated
# == Class Methods ======================================================== | ||
def questions | ||
# hh = [] | ||
# hh << form_structure.map { |section| section } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what are the hh's doing here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That commented section should be removed.
job.application_criteria = PERSONAL_FIELDS.merge(PROFILE_FIELDS).merge(DETAILS_FIELDS).merge(ADDITIONAL_FIELDS) | ||
# job.application_criteria = PERSONAL_FIELDS.merge(PROFILE_FIELDS).merge(DETAILS_FIELDS).merge(ADDITIONAL_FIELDS) | ||
# job.save | ||
job.build_application_criterion(form_structure: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much neater
app/models/job_application.rb
Outdated
@@ -16,6 +16,7 @@ class JobApplication < ApplicationRecord | |||
|
|||
has_one_attached :cover_letter | |||
has_one_attached :resume | |||
has_one :application_criterion, through: :job |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this work with the user having many jobs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Also job_application && application_criteria have job_id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
app/models/question.rb
Outdated
@@ -1,19 +1,24 @@ | |||
# frozen_string_literal: true | |||
|
|||
class ApplicationCriteria | |||
class Question |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you help me understand more why it is valuable to have both a question model and also an ApplicationCriteria model?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the container is ApplicationCriteria ... It has many questions but Question doesn't necessarily need persistence in Database ... so we have a Poro object that allows us to have properties like required?
app/queries/saved_searches_query.rb
Outdated
private | ||
|
||
def associations | ||
# %i[requirement company locations countries roles applicant_tracking_system] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this sitting here for later?
@jobs = OpportunitiesFetcher.call(Job.all, @params) | ||
end | ||
|
||
def filename |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the best way of retrieving the filename?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no sure to be honest. It was my solution to fix the cloudinary issue i encounter ...
The diff between the cloudinary gem & Active Storage was ".csv"
@jobs.length | ||
end | ||
|
||
def job_last_updated_at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to do this because we don't always save the jobs sorted by their last updated at time i take it
@@ -23,7 +23,7 @@ | |||
</div> | |||
<div class="group bg-zinc-800 dark:bg-white/2.5"> | |||
<div class="relative"> | |||
<%= render 'json_output', transformed_data: transformed_data(job_application) %> | |||
<%= render 'json_output', job_application:, questions: job_application.application_criterion.questions %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ApplicationCriterion is slightly bothersome - is there a way we can get around this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could setup custom inflection rules to handle this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure to follow you here ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the association, can we change @job_application.job.application_question_set to @job_application.application_question_set?
app/models/application_question.rb
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll have to create a master list of types somewhere to standardize the terminology w/r/t the different types of input fields. Is there a standard list we can reference? Or if we have to create one, where should it live?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
types should be an enum.
I wanted to have a bit more experience with 2 or 3 ATS to set that as an enum and create the corresponding validators.
No description provided.