Skip to content
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

Merged
merged 24 commits into from
Jul 16, 2024
Merged

Conversation

patanj101
Copy link
Collaborator

No description provided.

@patanj101 patanj101 requested a review from Ches-ctrl July 9, 2024 07:25
Copy link
Owner

@Ches-ctrl Ches-ctrl left a 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?
Copy link
Owner

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?

Copy link
Collaborator Author

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.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do?

Copy link
Collaborator Author

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

# == Class Methods ========================================================
def questions
# hh = []
# hh << form_structure.map { |section| section }
Copy link
Owner

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?

Copy link
Collaborator Author

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: {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much neater

@@ -16,6 +16,7 @@ class JobApplication < ApplicationRecord

has_one_attached :cover_letter
has_one_attached :resume
has_one :application_criterion, through: :job
Copy link
Owner

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?

Copy link
Collaborator Author

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

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Can you check?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

a user has many job_applications ... but a job application belongs to one job (only) and a job has 1 application_criterion only ... I see it as an inner join ...

just a shortcut instead of doing job_application.job.application_criterion ...

@@ -1,19 +1,24 @@
# frozen_string_literal: true

class ApplicationCriteria
class Question
Copy link
Owner

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?

Copy link
Collaborator Author

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?

private

def associations
# %i[requirement company locations countries roles applicant_tracking_system]
Copy link
Owner

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
Copy link
Owner

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?

Copy link
Collaborator Author

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
Copy link
Owner

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 %>
Copy link
Owner

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?

Copy link
Owner

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

Copy link
Collaborator Author

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 ...

Copy link
Collaborator

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?

Copy link
Collaborator

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?

Copy link
Collaborator Author

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.

@daniel-sussman daniel-sussman merged commit bb1fbc3 into main Jul 16, 2024
7 checks passed
@daniel-sussman daniel-sussman deleted the 2024-07-04/apply_with_cheddar branch July 16, 2024 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants