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

1610 implement put for interview notes #1651

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

nemisis84
Copy link
Contributor

@nemisis84 nemisis84 commented Dec 21, 2024

Admins can take notes for candidates. Stored in field "notes" in object Interview. There are only possible to take notes when an interview is made. An interview is made once a time for the interview is set. In the future we could explore making the interview once an application is made or at another point of time.

@nemisis84 nemisis84 self-assigned this Dec 21, 2024
@nemisis84 nemisis84 changed the title Test123123123 1610 implement put for interview notes Dec 21, 2024
@@ -1060,6 +1060,7 @@ class RecruitmentApplicationForRecruiterSerializer(serializers.ModelSerializer):
recruitment_position = RecruitmentPositionForApplicantSerializer()
recruiter_priority = serializers.CharField(source='get_recruiter_priority_display')
interview_time = serializers.SerializerMethodField(method_name='get_interview_time', read_only=True)
interview = InterviewSerializer(read_only=True)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We needed to add the interview object to the serializer. Could potentially limit this to only id and notes.

interview.notes = update_serializer.validated_data['notes']
interview.save()
return Response(status=status.HTTP_200_OK)
return Response(update_serializer.errors, status=status.HTTP_400_BAD_REQUEST)
Copy link
Contributor Author

@nemisis84 nemisis84 Dec 21, 2024

Choose a reason for hiding this comment

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

I did not include any data in the successful response as the user already has the live changes.

@@ -84,6 +87,11 @@ export function RecruitmentApplicantAdminPage() {
</Text>
<Text>{recruitmentApplication?.application_text}</Text>
</div>
{interviewId && (
Copy link
Contributor Author

@nemisis84 nemisis84 Dec 21, 2024

Choose a reason for hiding this comment

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

If interviewId excist then show this div

// TODO: Update notes using a put request
console.log(value);
}
const handleNotesChange = (newNotes: string) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Helper method to check if any changes was made. If no changes was made, but onBlur was triggered, we don't need to send a put request

@nemisis84 nemisis84 marked this pull request as ready for review December 21, 2024 17:07
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.

1 participant