-
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
1610 implement put for interview notes #1651
base: master
Are you sure you want to change the base?
Conversation
@@ -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) |
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 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) |
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 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 && ( |
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.
If interviewId excist then show this div
// TODO: Update notes using a put request | ||
console.log(value); | ||
} | ||
const handleNotesChange = (newNotes: string) => { |
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.
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
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.