-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: add same positions for gagn #1655
base: master
Are you sure you want to change the base?
Conversation
@@ -1240,11 +1240,15 @@ class RecruitmentApplicationForRecruitersView(APIView): | |||
|
|||
def get(self, request: Request, application_id: str) -> Response: | |||
application = get_object_or_404(RecruitmentApplication, id=application_id) | |||
same_gang_applications = RecruitmentApplication.objects.filter( |
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.
Kan vi ikke bare gjøre dette i frontend heller? Alle andre søknader er tilgjengelig i other_applications
. I frontend kan vi bruke denne og bare filtrere etter gjeng
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.
Mer praktisk å holde slik filtrering i backend en frontend, vil sette minst mulig komputasjon i frontend. Gjør det bedre senere, gjør det bedre for posting i dette tilfellet som kommer senere
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.
Jeg er enig i at vi man heller burde filtrer dette i backend, men da trenger vi selvfølgelig ikke sende med
other_applications
i applications
objektet.
@@ -1240,11 +1240,15 @@ class RecruitmentApplicationForRecruitersView(APIView): | |||
|
|||
def get(self, request: Request, application_id: str) -> Response: | |||
application = get_object_or_404(RecruitmentApplication, id=application_id) | |||
same_gang_applications = RecruitmentApplication.objects.filter( |
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.
Jeg er enig i at vi man heller burde filtrer dette i backend, men da trenger vi selvfølgelig ikke sende med
other_applications
i applications
objektet.
@@ -1240,11 +1240,15 @@ class RecruitmentApplicationForRecruitersView(APIView): | |||
|
|||
def get(self, request: Request, application_id: str) -> Response: | |||
application = get_object_or_404(RecruitmentApplication, id=application_id) | |||
same_gang_applications = RecruitmentApplication.objects.filter( | |||
user=application.user, recruitment=application.recruitment, recruitment_position__gang=application.recruitment_position.resolve_gang() | |||
).order_by('applicant_priority') | |||
other_applications = RecruitmentApplication.objects.filter(user=application.user, recruitment=application.recruitment).order_by('applicant_priority') |
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.
Da kan vel dette endres slik at det ikke inneholder søkander i denne gjengen?
Just a small fix needed for on applicant and gang manage as done in samf3