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

feat: add same positions for gagn #1655

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

magsyg
Copy link
Contributor

@magsyg magsyg commented Dec 23, 2024

Just a small fix needed for on applicant and gang manage as done in samf3

@magsyg magsyg self-assigned this Dec 23, 2024
@@ -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(
Copy link
Member

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

Copy link
Contributor Author

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

Copy link
Contributor

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(
Copy link
Contributor

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')
Copy link
Contributor

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?

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