diff --git a/frontend/src/Components/RecruitmentWithoutInterviewTable/RecruitmentWithoutInterviewTable.tsx b/frontend/src/Components/RecruitmentWithoutInterviewTable/RecruitmentWithoutInterviewTable.tsx index 3925b2e87..a414c3bc0 100644 --- a/frontend/src/Components/RecruitmentWithoutInterviewTable/RecruitmentWithoutInterviewTable.tsx +++ b/frontend/src/Components/RecruitmentWithoutInterviewTable/RecruitmentWithoutInterviewTable.tsx @@ -3,6 +3,7 @@ import { useTranslation } from 'react-i18next'; import { Table } from '~/Components/Table'; import type { RecruitmentUserDto } from '~/dto'; import { KEY } from '~/i18n/constants'; +import { reverse } from '~/named-urls'; import { ROUTES } from '~/routes'; import { dbT } from '~/utils'; import { InputField } from '../InputField'; @@ -24,7 +25,7 @@ export function RecruitmentWithoutInterviewTable({ applicants }: RecruitmentWith { content: t(KEY.common_phonenumber), sortable: true }, { content: t(KEY.recruitment_applicant_top_position), sortable: true }, { content: t(KEY.recruitment_number_of_applications), sortable: true }, - { content: t(KEY.common_processed), sortable: true }, + { content: t(KEY.recruitment_interview_planned), sortable: true }, ]; function filterUsers(): RecruitmentUserDto[] { @@ -54,7 +55,19 @@ export function RecruitmentWithoutInterviewTable({ applicants }: RecruitmentWith return [ { value: `${user.first_name} ${user.last_name}`, - content: {`${user.first_name} ${user.last_name}`}, + content: ( + + {user.first_name} {user.last_name} + + ), }, user.email, user.phone_number, @@ -64,7 +77,8 @@ export function RecruitmentWithoutInterviewTable({ applicants }: RecruitmentWith value: user.applications_without_interview ? user.applications_without_interview.length : 0, content: ( ), diff --git a/frontend/src/Components/RecruitmentWithoutInterviewTable/components/WithoutInterviewList.tsx b/frontend/src/Components/RecruitmentWithoutInterviewTable/components/WithoutInterviewList.tsx index 3d41bd7a3..e9a3234aa 100644 --- a/frontend/src/Components/RecruitmentWithoutInterviewTable/components/WithoutInterviewList.tsx +++ b/frontend/src/Components/RecruitmentWithoutInterviewTable/components/WithoutInterviewList.tsx @@ -1,7 +1,8 @@ +import { Icon } from '@iconify/react'; import { useTranslation } from 'react-i18next'; -import { Link } from '~/Components'; +import { Link, Text } from '~/Components'; import { Table } from '~/Components/Table'; -import type { RecruitmentApplicationDto } from '~/dto'; +import type { RecruitmentApplicationDto, RecruitmentUserDto } from '~/dto'; import { KEY } from '~/i18n/constants'; import { reverse } from '~/named-urls'; import { ROUTES } from '~/routes'; @@ -10,17 +11,23 @@ import styles from './WithoutInterview.module.scss'; type WithoutInterviewListProps = { applications: RecruitmentApplicationDto[]; + user: RecruitmentUserDto; + applicationsWithoutInterview: RecruitmentApplicationDto[]; }; -export function WithoutInterviewList({ applications }: WithoutInterviewListProps) { +export function WithoutInterviewList({ applications, user, applicationsWithoutInterview }: WithoutInterviewListProps) { const { t } = useTranslation(); const tableColumns = [ { content: t(KEY.recruitment_position), sortable: true }, + + { content: t(KEY.recruitment_interview_planned), sortable: true }, { content: t(KEY.recruitment_priority), sortable: true }, ]; function applicationToRow(application: RecruitmentApplicationDto) { + const hasInterview = !applicationsWithoutInterview.some((app) => app.id === application.id); + return { cells: [ { @@ -28,9 +35,11 @@ export function WithoutInterviewList({ applications }: WithoutInterviewListProps content: ( @@ -38,12 +47,29 @@ export function WithoutInterviewList({ applications }: WithoutInterviewListProps ), }, + + { + value: hasInterview ? 1 : 0, + content: ( + + ), + }, application.applicant_priority, ], }; } + return (
+ + {user.first_name} {user.last_name} + applicationToRow(application))} /> ); diff --git a/frontend/src/Components/RecruitmentWithoutInterviewTable/components/WithoutInterviewModal.tsx b/frontend/src/Components/RecruitmentWithoutInterviewTable/components/WithoutInterviewModal.tsx index 2318b9e60..db9fc67a8 100644 --- a/frontend/src/Components/RecruitmentWithoutInterviewTable/components/WithoutInterviewModal.tsx +++ b/frontend/src/Components/RecruitmentWithoutInterviewTable/components/WithoutInterviewModal.tsx @@ -1,21 +1,26 @@ import { useState } from 'react'; import { Button, IconButton, Modal } from '~/Components'; -import type { RecruitmentApplicationDto } from '~/dto'; +import type { RecruitmentApplicationDto, RecruitmentUserDto } from '~/dto'; import styles from './WithoutInterview.module.scss'; import { WithoutInterviewList } from './WithoutInterviewList'; type WithoutInterviewModalProps = { + user: RecruitmentUserDto; applications: RecruitmentApplicationDto[]; - applications_without_interview: RecruitmentApplicationDto[]; + applicationsWithoutInterview: RecruitmentApplicationDto[]; }; -export function WithoutInterviewModal({ applications, applications_without_interview }: WithoutInterviewModalProps) { +export function WithoutInterviewModal({ + applications, + applicationsWithoutInterview, + user, +}: WithoutInterviewModalProps) { const [withoutInterviewModal, setWithoutInterviewModal] = useState(false); return ( <> - setWithoutInterviewModal(false)} /> - + + ); diff --git a/frontend/src/Pages/ContributorsPage/components/Contributor/Contributor.tsx b/frontend/src/Pages/ContributorsPage/ContributorItem.tsx similarity index 90% rename from frontend/src/Pages/ContributorsPage/components/Contributor/Contributor.tsx rename to frontend/src/Pages/ContributorsPage/ContributorItem.tsx index 78dde9035..7348c371e 100644 --- a/frontend/src/Pages/ContributorsPage/components/Contributor/Contributor.tsx +++ b/frontend/src/Pages/ContributorsPage/ContributorItem.tsx @@ -7,18 +7,7 @@ import darkAvatar from '~/assets/contributors/default_dark.svg'; import { THEME } from '~/constants'; import { useGlobalContext } from '~/context/GlobalContextProvider'; import { KEY } from '~/i18n/constants'; - -export type Contributor = { - name: string; - from: string; - to?: string; - github?: string; - picture?: string; - websjef?: { - from: string; - to: string; - }; -}; +import type { Contributor } from './types'; type Props = { contributor: Contributor; diff --git a/frontend/src/Pages/ContributorsPage/ContributorsPage.tsx b/frontend/src/Pages/ContributorsPage/ContributorsPage.tsx index 2d090cc5f..df8645322 100644 --- a/frontend/src/Pages/ContributorsPage/ContributorsPage.tsx +++ b/frontend/src/Pages/ContributorsPage/ContributorsPage.tsx @@ -6,19 +6,14 @@ import robines from '~/assets/contributors/robines.jpg'; import snorre98 from '~/assets/contributors/snorre98.jpg'; import sygard from '~/assets/contributors/sygard.jpg'; import { KEY } from '~/i18n/constants'; +import { ContributorItem } from './ContributorItem'; import styles from './ContributorsPage.module.scss'; -import { type Contributor, ContributorItem } from './components'; +import type { Contributor } from './types'; // biome-ignore format: array should not be formatted const CONTRIBUTORS: Contributor[] = [ // H17 - { - name: 'Kevin Kristiansen', - github: 'KevinKristiansen', - from: 'H17', - to: 'V20', - websjef: { from: 'V18', to: 'H18' }, - }, + { name: 'Kevin Kristiansen', github: 'KevinKristiansen', from: 'H17', to: 'V20', websjef: { from: 'V18', to: 'H18' } }, // H19 { name: 'Emil Telstad', github: 'emilte', from: 'H19' }, { name: 'Sigve Røkenes', github: 'evgiz', from: 'H19', to: 'H23', websjef: { from: 'H20', to: 'V21' } }, @@ -39,15 +34,9 @@ const CONTRIBUTORS: Contributor[] = [ { name: 'Eirik Hoem', github: 'eiriksho', from: 'H22', to: 'V23' }, { name: 'Simen Seeberg-Rommetveit', github: 'simensee', from: 'H22' }, // V23 - { - name: 'Robin Espinosa Jelle', - github: 'robines', - from: 'V23', - picture: robines, - websjef: { from: 'H23', to: 'V24' }, - }, + { name: 'Robin Espinosa Jelle', github: 'robines', from: 'V23', picture: robines, websjef: { from: 'H23', to: 'V24' } }, { name: 'Johanne Grønlien Gjedrem', github: 'johannegg', from: 'V23' }, - { name: 'Tinius Presterud', github: 'tiniuspre', from: 'V23' }, + { name: 'Tinius Presterud', github: 'tiniuspre', from: 'V23', to: 'V24' }, // H23 { name: 'Amalie Johansen Vik', github: 'amaliejvik', from: 'H23', picture: amaliejvik }, { name: 'Marion Lystad', github: 'marionlys', from: 'H23' }, diff --git a/frontend/src/Pages/ContributorsPage/components/Contributor/index.ts b/frontend/src/Pages/ContributorsPage/components/Contributor/index.ts deleted file mode 100644 index 688926668..000000000 --- a/frontend/src/Pages/ContributorsPage/components/Contributor/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type Contributor, ContributorItem } from './Contributor'; diff --git a/frontend/src/Pages/ContributorsPage/components/index.ts b/frontend/src/Pages/ContributorsPage/components/index.ts deleted file mode 100644 index 688926668..000000000 --- a/frontend/src/Pages/ContributorsPage/components/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { type Contributor, ContributorItem } from './Contributor'; diff --git a/frontend/src/Pages/ContributorsPage/types.ts b/frontend/src/Pages/ContributorsPage/types.ts new file mode 100644 index 000000000..69350b0f6 --- /dev/null +++ b/frontend/src/Pages/ContributorsPage/types.ts @@ -0,0 +1,11 @@ +export type Contributor = { + name: string; + from: string; + to?: string; + github?: string; + picture?: string; + websjef?: { + from: string; + to: string; + }; +}; diff --git a/frontend/src/Pages/OrganizationRecruitmentPage/Components/GangPosition/GangPosition.tsx b/frontend/src/Pages/OrganizationRecruitmentPage/Components/GangPosition/GangPosition.tsx index 0b0a32026..e22c843c0 100644 --- a/frontend/src/Pages/OrganizationRecruitmentPage/Components/GangPosition/GangPosition.tsx +++ b/frontend/src/Pages/OrganizationRecruitmentPage/Components/GangPosition/GangPosition.tsx @@ -37,7 +37,7 @@ export function GangPosition({ type, recruitmentPositions }: GangItemProps) { diff --git a/frontend/src/Pages/OrganizationRecruitmentPage/Components/GangPositionDropdown/GangPositionDropdown.tsx b/frontend/src/Pages/OrganizationRecruitmentPage/Components/GangPositionDropdown/GangPositionDropdown.tsx index 21743ab80..931798285 100644 --- a/frontend/src/Pages/OrganizationRecruitmentPage/Components/GangPositionDropdown/GangPositionDropdown.tsx +++ b/frontend/src/Pages/OrganizationRecruitmentPage/Components/GangPositionDropdown/GangPositionDropdown.tsx @@ -7,12 +7,13 @@ import styles from './GangPositionDropdown.module.scss'; type GangItemProps = { type: GangTypeDto; + recruitmentId?: string; recruitmentPositions?: RecruitmentPositionDto[]; }; //TODO: DO IN ISSUE #1121, only get gang types recruiting from backend // TODO: so the filtering should be done from the backend -export function GangPositionDropdown({ type, recruitmentPositions }: GangItemProps) { +export function GangPositionDropdown({ type, recruitmentPositions, recruitmentId }: GangItemProps) { const filteredGangs = type.gangs .map((gang) => { const filteredPositions = recruitmentPositions?.filter((pos) => pos.gang.id === gang.id); @@ -30,7 +31,7 @@ export function GangPositionDropdown({ type, recruitmentPositions }: GangItemPro @@ -39,7 +40,7 @@ export function GangPositionDropdown({ type, recruitmentPositions }: GangItemPro diff --git a/frontend/src/Pages/OrganizationRecruitmentPage/Components/GangTypeContainer/GangTypeContainer.tsx b/frontend/src/Pages/OrganizationRecruitmentPage/Components/GangTypeContainer/GangTypeContainer.tsx index 9c32c12cb..ccfdf7185 100644 --- a/frontend/src/Pages/OrganizationRecruitmentPage/Components/GangTypeContainer/GangTypeContainer.tsx +++ b/frontend/src/Pages/OrganizationRecruitmentPage/Components/GangTypeContainer/GangTypeContainer.tsx @@ -1,19 +1,17 @@ import { useEffect, useState } from 'react'; +import { useParams } from 'react-router-dom'; import { SamfundetLogoSpinner } from '~/Components'; import { getGangList, getRecruitmentPositions } from '~/api'; import type { GangTypeDto, RecruitmentPositionDto } from '~/dto'; import { GangPositionDropdown } from '../GangPositionDropdown'; -type GangTypeContainerProps = { - recruitmentId: string; -}; - -export function GangTypeContainer({ recruitmentId = '-1' }: GangTypeContainerProps) { +export function GangTypeContainer() { const [recruitmentPositions, setRecruitmentPositions] = useState(); const [recruitingGangTypes, setRecruitingGangs] = useState(); const [loading, setLoading] = useState(true); - + const { recruitmentId } = useParams(); useEffect(() => { + if (!recruitmentId) return; Promise.all([getRecruitmentPositions(recruitmentId), getGangList()]) .then(([recruitmentRes, gangsRes]) => { setRecruitmentPositions(recruitmentRes.data); @@ -31,7 +29,12 @@ export function GangTypeContainer({ recruitmentId = '-1' }: GangTypeContainerPro ) : ( <> {recruitingGangTypes?.map((gangType) => ( - + ))} ); diff --git a/frontend/src/Pages/OrganizationRecruitmentPage/Components/PositionsTable/PositionsTable.tsx b/frontend/src/Pages/OrganizationRecruitmentPage/Components/PositionsTable/PositionsTable.tsx index 1daf2862f..eb0eaf61c 100644 --- a/frontend/src/Pages/OrganizationRecruitmentPage/Components/PositionsTable/PositionsTable.tsx +++ b/frontend/src/Pages/OrganizationRecruitmentPage/Components/PositionsTable/PositionsTable.tsx @@ -21,15 +21,15 @@ export function PositionsTable({ currentSelectedGang, setLoading, loading }: Pos const [positions, setPositions] = useState([]); const navigate = useNavigate(); const { t } = useTranslation(); - const recruitmentId = useParams(); + const { recruitmentId } = useParams(); const { organizationTheme } = useOrganizationContext(); useEffect(() => { - if (!currentSelectedGang || !recruitmentId.recruitmentId) { + if (!currentSelectedGang || !recruitmentId) { return; } setLoading(true); - getRecruitmentPositionsGangForApplicant(recruitmentId.recruitmentId, currentSelectedGang.id) + getRecruitmentPositionsGangForApplicant(recruitmentId, currentSelectedGang.id) .then((response) => { setPositions(response.data); setLoading(false); @@ -48,7 +48,7 @@ export function PositionsTable({ currentSelectedGang, setLoading, loading }: Pos const tableData = positions.map((item) => { const positionPageURL = reverse({ pattern: ROUTES.frontend.recruitment_application, - urlParams: { positionId: item.id, gangId: item.id }, + urlParams: { positionId: item.id, recruitmentId: recruitmentId }, }); return { cells: [ diff --git a/frontend/src/Pages/OrganizationRecruitmentPage/OrganizationRecruitmentPage.tsx b/frontend/src/Pages/OrganizationRecruitmentPage/OrganizationRecruitmentPage.tsx index 8d2479493..eb0b49c75 100644 --- a/frontend/src/Pages/OrganizationRecruitmentPage/OrganizationRecruitmentPage.tsx +++ b/frontend/src/Pages/OrganizationRecruitmentPage/OrganizationRecruitmentPage.tsx @@ -113,8 +113,7 @@ export function OrganizationRecruitmentPage() { Placeholder for tag-autocomplete search {/*^^^ issue #1275 */} - {recruitmentId && - (viewAllPositions ? : )} + {recruitmentId && (viewAllPositions ? : )} {recruitment?.separate_positions && recruitment.separate_positions.length > 0 && ( )} diff --git a/frontend/src/Pages/RecruitmentApplicationFormPage/RecruitmentApplicationFormPage.tsx b/frontend/src/Pages/RecruitmentApplicationFormPage/RecruitmentApplicationFormPage.tsx index e28efb093..fe6f0d720 100644 --- a/frontend/src/Pages/RecruitmentApplicationFormPage/RecruitmentApplicationFormPage.tsx +++ b/frontend/src/Pages/RecruitmentApplicationFormPage/RecruitmentApplicationFormPage.tsx @@ -40,7 +40,7 @@ export function RecruitmentApplicationFormPage() { const [loading, setLoading] = useState(true); - const { positionId } = useParams(); + const { positionId, recruitmentId } = useParams(); useTitle(recruitmentPosition ? (dbT(recruitmentPosition, 'name') as string) : ''); @@ -175,7 +175,7 @@ export function RecruitmentApplicationFormPage() { navigate({ url: reverse({ pattern: ROUTES.frontend.recruitment_application, - urlParams: { positionId: pos.id, gangId: pos.gang.id }, + urlParams: { positionId: pos.id, recruitmentId: recruitmentId }, }), }); }} diff --git a/frontend/src/Pages/RecruitmentApplicationsOverviewPage/RecruitmentApplicationsOverviewPage.tsx b/frontend/src/Pages/RecruitmentApplicationsOverviewPage/RecruitmentApplicationsOverviewPage.tsx index d36979d25..c6d3cebc3 100644 --- a/frontend/src/Pages/RecruitmentApplicationsOverviewPage/RecruitmentApplicationsOverviewPage.tsx +++ b/frontend/src/Pages/RecruitmentApplicationsOverviewPage/RecruitmentApplicationsOverviewPage.tsx @@ -70,7 +70,7 @@ export function RecruitmentApplicationsOverviewPage() { pattern: ROUTES.frontend.recruitment_application, urlParams: { positionId: application.recruitment_position.id, - gangId: application.recruitment_position.gang.id, + recruitmentId: recruitmentId, }, })} className={styles.position_name} @@ -131,7 +131,7 @@ export function RecruitmentApplicationsOverviewPage() { pattern: ROUTES.frontend.recruitment_application, urlParams: { positionId: application.recruitment_position.id, - gangId: application.recruitment_position.gang.id, + recruitmentId: recruitmentId, }, })} className={styles.withdrawnLink} diff --git a/frontend/src/PagesAdmin/RecruitmentFormAdminPage/RecruitmentFormAdminPage.tsx b/frontend/src/PagesAdmin/RecruitmentFormAdminPage/RecruitmentFormAdminPage.tsx index 86b02bc6b..32432db3b 100644 --- a/frontend/src/PagesAdmin/RecruitmentFormAdminPage/RecruitmentFormAdminPage.tsx +++ b/frontend/src/PagesAdmin/RecruitmentFormAdminPage/RecruitmentFormAdminPage.tsx @@ -17,6 +17,7 @@ import { NumberInput, } from '~/Components'; import type { DropdownOption } from '~/Components/Dropdown/Dropdown'; +import { FormDescription } from '~/Components/Forms/Form'; import { getOrganizations, postRecruitment, putRecruitment } from '~/api'; import type { OrganizationDto, RecruitmentDto } from '~/dto'; import { useTitle } from '~/hooks'; @@ -238,7 +239,8 @@ export function RecruitmentFormAdminPage() { name="promo_media" render={({ field }) => ( - {`${t(KEY.recruitment_promo_media)}`} + {t(KEY.recruitment_promo_media)} + {t(KEY.promo_media_description)} diff --git a/frontend/src/PagesAdmin/RecruitmentFormAdminPage/recruitmentSchema.ts b/frontend/src/PagesAdmin/RecruitmentFormAdminPage/recruitmentSchema.ts index 671cbfa13..7ae4146a1 100644 --- a/frontend/src/PagesAdmin/RecruitmentFormAdminPage/recruitmentSchema.ts +++ b/frontend/src/PagesAdmin/RecruitmentFormAdminPage/recruitmentSchema.ts @@ -64,11 +64,11 @@ export const recruitmentSchema = z .refine( (data) => { const promoMedia = data.promo_media; - const regex = /(youtu.*be.*)\/(watch\?v=|embed\/|v|shorts|)(.*?((?=[&#?])|$))/; + const regex = /^(https?:\/\/)?(www\.)?(youtu.*be.*)\/(watch\?v=|embed\/|v|shorts|)(.*?((?=[&#?])|$))/; return promoMedia.match(regex) || promoMedia.length === 11 || promoMedia === ''; }, { - message: 'Fucky whucky youtube link', + message: i18next.t(KEY.promo_media_invalid), path: ['promo_media'], }, ); diff --git a/frontend/src/PagesAdmin/RecruitmentGangAdminPage/RecruitmentGangAdminPage.tsx b/frontend/src/PagesAdmin/RecruitmentGangAdminPage/RecruitmentGangAdminPage.tsx index b44137a47..936037ebd 100644 --- a/frontend/src/PagesAdmin/RecruitmentGangAdminPage/RecruitmentGangAdminPage.tsx +++ b/frontend/src/PagesAdmin/RecruitmentGangAdminPage/RecruitmentGangAdminPage.tsx @@ -99,6 +99,7 @@ export function RecruitmentGangAdminPage() { pattern: ROUTES.frontend.recruitment_application, urlParams: { positionId: recruitmentPosition.id, + recruitmentId: recruitmentId, }, }), ); diff --git a/frontend/src/PagesAdmin/RecruitmentGangAllApplicantsAdminPage/RecruitmentGangAllApplicantsAdminPage.tsx b/frontend/src/PagesAdmin/RecruitmentGangAllApplicantsAdminPage/RecruitmentGangAllApplicantsAdminPage.tsx index 1dfb3a1dd..e35d79a0f 100644 --- a/frontend/src/PagesAdmin/RecruitmentGangAllApplicantsAdminPage/RecruitmentGangAllApplicantsAdminPage.tsx +++ b/frontend/src/PagesAdmin/RecruitmentGangAllApplicantsAdminPage/RecruitmentGangAllApplicantsAdminPage.tsx @@ -12,6 +12,7 @@ import { STATUS } from '~/http_status_codes'; import { KEY } from '~/i18n/constants'; import { reverse } from '~/named-urls'; import { ROUTES } from '~/routes'; +import { RecruitmentPriorityChoicesMapping, RecruitmentStatusChoicesMapping } from '~/types'; import { dbT } from '~/utils'; import { AdminPageLayout } from '../AdminPageLayout/AdminPageLayout'; import styles from './RecruitmentGangAllApplicantsAdminPage.module.scss'; @@ -64,7 +65,6 @@ export function RecruitmentGangAllApplicantsAdminPage() { setRecruitment(resp.data); }) .catch((data) => { - // TODO add error pop up message? if (data.request.status === STATUS.HTTP_404_NOT_FOUND) { navigate({ url: ROUTES.frontend.admin_recruitment }); } @@ -81,6 +81,7 @@ export function RecruitmentGangAllApplicantsAdminPage() { { content: t(KEY.recruitment_position), sortable: true }, { content: t(KEY.recruitment_interview_time), sortable: true }, { content: t(KEY.recruitment_interview_location), sortable: true }, + { content: t(KEY.recruitment_recruiter_priority), sortable: true }, { content: t(KEY.recruitment_recruiter_status), sortable: true }, ]; @@ -106,7 +107,12 @@ export function RecruitmentGangAllApplicantsAdminPage() { { content: {dbT(application.recruitment_position, 'name')} }, application.interview?.interview_time, application.interview?.interview_location, - application.recruiter_status, + application.recruiter_priority !== undefined + ? RecruitmentPriorityChoicesMapping[application.recruiter_priority] + : 'N/A', + application.recruiter_status !== undefined + ? RecruitmentStatusChoicesMapping[application.recruiter_status] + : 'N/A', ], }; }); diff --git a/frontend/src/PagesAdmin/RecruitmentRecruiterDashboardPage/RecruitmentRecruiterDashboardPage.tsx b/frontend/src/PagesAdmin/RecruitmentRecruiterDashboardPage/RecruitmentRecruiterDashboardPage.tsx index 3afb7fb29..a1e5f76d1 100644 --- a/frontend/src/PagesAdmin/RecruitmentRecruiterDashboardPage/RecruitmentRecruiterDashboardPage.tsx +++ b/frontend/src/PagesAdmin/RecruitmentRecruiterDashboardPage/RecruitmentRecruiterDashboardPage.tsx @@ -93,6 +93,7 @@ export function RecruitmentRecruiterDashboardPage() { pattern: ROUTES.frontend.recruitment_application, urlParams: { positionId: application.recruitment_position.id, + recruitmentId: recruitmentId, }, })} > diff --git a/frontend/src/dto.ts b/frontend/src/dto.ts index 4cd54cb1c..3a538bd24 100644 --- a/frontend/src/dto.ts +++ b/frontend/src/dto.ts @@ -505,7 +505,7 @@ export type RecruitmentApplicationDto = { recruitment: number; user: UserDto; applicant_priority: number; - recruiter_priority?: number | string; + recruiter_priority?: number; recruiter_status?: number; applicant_state?: number; created_at: string; diff --git a/frontend/src/i18n/constants.ts b/frontend/src/i18n/constants.ts index e48befa8e..a237bf674 100644 --- a/frontend/src/i18n/constants.ts +++ b/frontend/src/i18n/constants.ts @@ -280,6 +280,7 @@ export const KEY = { recruitment_interviewer: 'recruitment_interviewer', recruitment_interviewers: 'recruitment_interviewers', recruitment_interviews: 'recruitment_interviews', + recruitment_interview_planned: 'recruitment_interview_planned', recruitment_no_interviews: 'recruitment_no_interviews', recruitment_interview_set: 'recruitment_interview_set', recruitment_interview_groups: 'recruitment_interview_groups', @@ -471,6 +472,8 @@ export const KEY = { notfoundpage_contact_prompt: 'notfoundpage_contact_prompt', saksdokumentpage_publication_date: 'saksdokumentpage_publication_date', eventsadminpage_successful_delete_toast: 'eventsadminpage_successful_delete_toast', + promo_media_description: 'promo_media_description', + promo_media_invalid: 'promo_media_invalid', error_generic: 'error_generic', error_generic_description: 'error_generic_description', diff --git a/frontend/src/i18n/translations.ts b/frontend/src/i18n/translations.ts index 7bdb3c977..5e693cd43 100644 --- a/frontend/src/i18n/translations.ts +++ b/frontend/src/i18n/translations.ts @@ -262,6 +262,7 @@ export const nb = prepareTranslations({ [KEY.recruitment_not_applied]: 'Du har ikke sendt søknader til noen stillinger ennå', [KEY.recruitment_will_be_anonymized]: 'All info relatert til dine søknader vil bli slettet 3 uker etter opptaket', [KEY.recruitment_interviews]: 'Intervjuer', + [KEY.recruitment_interview_planned]: 'Intervjuer planlagt', [KEY.recruitment_interviewer]: 'Intervjuer', [KEY.recruitment_interviewers]: 'Intervjuere', [KEY.recruitment_no_interviews]: 'Ingen intervjuer', @@ -472,6 +473,9 @@ export const nb = prepareTranslations({ [KEY.admin_saksdokumenter_cannot_reupload]: 'Det er ikke mulig å endre filen som er lastet opp.', [KEY.eventsadminpage_successful_delete_toast]: 'Slettingen av arrangementet var vellykket.', + [KEY.promo_media_description]: 'Lenke eller ID til en YouTube-video', + [KEY.promo_media_invalid]: 'Må være en gyldig lenke til en YouTube-video', + // Errors [KEY.error_generic]: 'Uventet feil', [KEY.error_generic_description]: 'En uventet feil oppsto, vennligst prøv igjen', @@ -744,6 +748,7 @@ export const en = prepareTranslations({ [KEY.recruitment_will_be_anonymized]: 'All info related to the applications will be anonymized three weeks after the recruitment is over', [KEY.recruitment_interviews]: 'Interviews', + [KEY.recruitment_interview_planned]: 'Interviews planned', [KEY.recruitment_interviewer]: 'Interviewer', [KEY.recruitment_interviewers]: 'Interviewers', [KEY.recruitment_no_interviews]: 'No interviews', @@ -888,6 +893,10 @@ export const en = prepareTranslations({ [KEY.admin_information_confirm_cancel]: 'Are you sure you want to exit without saving?', [KEY.admin_saksdokumenter_cannot_reupload]: 'It is not possible to change the uploaded file.', [KEY.eventsadminpage_successful_delete_toast]: 'Succsessfully deleted event.', + + [KEY.promo_media_description]: 'Link or ID of a YouTube video', + [KEY.promo_media_invalid]: 'Must be a valid link to a YouTube video', + [KEY.recruitment_three_interviews_criteria_header]: 'Applicants with less than 3 interviews, but have applied to more than 3 positions', [KEY.recruitment_three_interviews_criteria_button]: 'Applicants with less than 3 interviews', diff --git a/frontend/src/routes/frontend.ts b/frontend/src/routes/frontend.ts index e29a2550d..4bf28443b 100644 --- a/frontend/src/routes/frontend.ts +++ b/frontend/src/routes/frontend.ts @@ -19,7 +19,7 @@ export const ROUTES_FRONTEND = { contributors: '/contributors', // Recruitment: recruitment: '/recruitment/', - recruitment_application: '/recruitment/position/:positionId/', + recruitment_application: '/recruitment/:recruitmentId/position/:positionId/', recruitment_application_overview: '/recruitment/:recruitmentId/my-applications/', organization_recruitment: '/recruitment/:recruitmentId/', contact: '/contact',