Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
magsyg committed Nov 5, 2024
1 parent a966dc8 commit 6a849dd
Showing 1 changed file with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { TimeDisplay } from '~/Components';
import { CrudButtons } from '~/Components/CrudButtons/CrudButtons';
Expand All @@ -13,7 +14,6 @@ import { ROUTES } from '~/routes';
import { Link } from '../Link';
import { SetInterviewManuallyModal } from '../SetInterviewManually';
import styles from './RecruitmentApplicantsStatus.module.scss';
import { useEffect, useState } from 'react';

type RecruitmentApplicantsStatusProps = {
applicants: RecruitmentApplicationDto[];
Expand Down Expand Up @@ -42,22 +42,25 @@ export function RecruitmentApplicantsStatus({
const { t } = useTranslation();
const navigate = useCustomNavigate();


const [priorityOptions, setPriorityOptions] = useState<DropdownOption<number>[]>([])
const [statusOptions, setStatusOptions] = useState<DropdownOption<number>[]>([])

const [priorityOptions, setPriorityOptions] = useState<DropdownOption<number>[]>([]);
const [statusOptions, setStatusOptions] = useState<DropdownOption<number>[]>([]);

useEffect(() => {
//recruiter_priority: [number, string][];
//recruiter_status: [number, string][];
getRecruitmentApplicationStateChoices().then((response) => {
setPriorityOptions(response.data.recruiter_priority.map(priority => {return {label: priority[1], value: priority[0]}} ))
setStatusOptions(response.data.recruiter_status.map(status => {return {label: status[1], value: status[0]}} ))

})

},

[])
setPriorityOptions(
response.data.recruiter_priority.map((priority) => {
return { label: priority[1], value: priority[0] };
}),
);
setStatusOptions(
response.data.recruiter_status.map((status) => {
return { label: status[1], value: status[0] };
}),
);
});
}, []);

const tableColumns = [
{ content: t(KEY.recruitment_applicant), sortable: true, hideSortButton: false },
Expand Down

0 comments on commit 6a849dd

Please sign in to comment.