diff --git a/frontend/src/PagesAdmin/RecruitmentApplicantAdminPage/RecruitmenInterviewNotesFormSchema.tsx b/frontend/src/PagesAdmin/RecruitmentApplicantAdminPage/RecruitmenInterviewNotesFormSchema.tsx new file mode 100644 index 000000000..071f7d786 --- /dev/null +++ b/frontend/src/PagesAdmin/RecruitmentApplicantAdminPage/RecruitmenInterviewNotesFormSchema.tsx @@ -0,0 +1,2 @@ +import { z } from "zod"; + diff --git a/frontend/src/PagesAdmin/RecruitmentApplicantAdminPage/RecruitmentApplicantAdminPage.tsx b/frontend/src/PagesAdmin/RecruitmentApplicantAdminPage/RecruitmentApplicantAdminPage.tsx index ee2609389..13d1b8728 100644 --- a/frontend/src/PagesAdmin/RecruitmentApplicantAdminPage/RecruitmentApplicantAdminPage.tsx +++ b/frontend/src/PagesAdmin/RecruitmentApplicantAdminPage/RecruitmentApplicantAdminPage.tsx @@ -3,11 +3,11 @@ import { useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useNavigate, useParams } from 'react-router-dom'; import { toast } from 'react-toastify'; -import { BackButton, Button, Link, Page, SamfundetLogoSpinner } from '~/Components'; +import { BackButton, Button, FormControl, FormField, FormItem, FormLabel, FormMessage, Link, Page, SamfundetLogoSpinner, Textarea, TextAreaField } from '~/Components'; import { Table } from '~/Components/Table'; import { Text } from '~/Components/Text/Text'; import { getRecruitmentApplicationsForRecruiter, withdrawRecruitmentApplicationRecruiter } from '~/api'; -import type { RecruitmentApplicationDto, RecruitmentApplicationRecruiterDto } from '~/dto'; +import type { InterviewDto, RecruitmentApplicationDto, } from '~/dto'; import { STATUS } from '~/http_status_codes'; import { KEY } from '~/i18n/constants'; import { reverse } from '~/named-urls'; @@ -15,13 +15,14 @@ import { ROUTES } from '~/routes'; import { dbT } from '~/utils'; import styles from './RecruitmentApplicantAdminPage.module.scss'; import { useMutation, useQuery } from '@tanstack/react-query'; +import { RecruitmentInterviewNotesForm } from './RecruitmentInterviewNotesForm'; + + export function RecruitmentApplicantAdminPage() { const { t } = useTranslation(); const navigate = useNavigate(); const { applicationID } = useParams(); - - const { data, isLoading, error } = useQuery({ queryKey: ['recruitmentapplicationpage', applicationID], queryFn: () => getRecruitmentApplicationsForRecruiter(applicationID as string), @@ -37,8 +38,9 @@ export function RecruitmentApplicantAdminPage() { const recruitmentApplication = data?.data.application; const applicant = data?.data.user; const otherRecruitmentApplication = data?.data.other_applications; + const interviewNotes = recruitmentApplication?.interview?.notes; - const adminWithdraw = useMutation({ + const adminWithdraw = useMutation({ mutationFn: (id: string) => { return withdrawRecruitmentApplicationRecruiter(id); }, @@ -48,6 +50,14 @@ export function RecruitmentApplicantAdminPage() { } }); + + function handleUpdateNotes(value: string) { + const updatedNotes = value; + if (recruitmentApplication?.id) { + // TODO update notes + } + } + if (isLoading) { return (