From 657a223fe9f8befde4a11521c946ca33ef225be9 Mon Sep 17 00:00:00 2001 From: magsyg Date: Tue, 12 Nov 2024 21:19:17 +0100 Subject: [PATCH] fix renames --- backend/samfundet/urls.py | 4 ++-- backend/samfundet/views.py | 4 ++-- .../RecruitmentGangOverviewPage.tsx | 4 ++-- ...tSharedInterviewPositionsList.module.scss} | 0 ...cruitmentSharedInterviewPositionsList.tsx} | 18 ++++++++--------- .../index.ts | 1 - ...edInterviewPositionsComponent.module.scss} | 0 ...mentSharedInterviewPositionsComponent.tsx} | 10 +++++----- .../index.ts | 1 + .../components/index.ts | 2 +- .../index.ts | 1 - ...cruitmentSharedInterviewPositionsForm.tsx} | 15 ++++++-------- ...terviewPositionsFormAdminPage.module.scss} | 0 ...SharedInterviewPositionsFormAdminPage.tsx} | 16 +++++++-------- .../index.ts | 1 + frontend/src/PagesAdmin/index.ts | 2 +- frontend/src/api.ts | 20 +++++++++---------- frontend/src/dto.ts | 4 ++-- frontend/src/router/router.tsx | 6 +++--- frontend/src/routes/backend.ts | 7 ++++--- 20 files changed, 57 insertions(+), 59 deletions(-) rename frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/{RecruitmentInterviewGroupsList.module.scss => RecruitmentSharedInterviewPositionsList.module.scss} (100%) rename frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/{RecruitmentInterviewGroupsList.tsx => RecruitmentSharedInterviewPositionsList.tsx} (52%) delete mode 100644 frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/components/RecruitmentInterviewGroupComponent/index.ts rename frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/components/{RecruitmentInterviewGroupComponent/RecruitmentInterviewGroupComponent.module.scss => RecruitmentSharedInterviewPositionsComponent/RecruitmentSharedInterviewPositionsComponent.module.scss} (100%) rename frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/components/{RecruitmentInterviewGroupComponent/RecruitmentInterviewGroupComponent.tsx => RecruitmentSharedInterviewPositionsComponent/RecruitmentSharedInterviewPositionsComponent.tsx} (74%) create mode 100644 frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/components/RecruitmentSharedInterviewPositionsComponent/index.ts delete mode 100644 frontend/src/PagesAdmin/RecruitmentInterviewGroupFormAdminPage/index.ts rename frontend/src/PagesAdmin/{RecruitmentInterviewGroupFormAdminPage/RecruitmentInterviewGroupForm.tsx => RecruitmentSharedInterviewPositionsFormAdminPage/RecruitmentSharedInterviewPositionsForm.tsx} (90%) rename frontend/src/PagesAdmin/{RecruitmentInterviewGroupFormAdminPage/RecruitmentInterviewGroupFormAdminPage.module.scss => RecruitmentSharedInterviewPositionsFormAdminPage/RecruitmentSharedInterviewPositionsFormAdminPage.module.scss} (100%) rename frontend/src/PagesAdmin/{RecruitmentInterviewGroupFormAdminPage/RecruitmentInterviewGroupFormAdminPage.tsx => RecruitmentSharedInterviewPositionsFormAdminPage/RecruitmentSharedInterviewPositionsFormAdminPage.tsx} (75%) create mode 100644 frontend/src/PagesAdmin/RecruitmentSharedInterviewPositionsFormAdminPage/index.ts diff --git a/backend/samfundet/urls.py b/backend/samfundet/urls.py index 7d5bd9e18..b2b8ab36e 100644 --- a/backend/samfundet/urls.py +++ b/backend/samfundet/urls.py @@ -41,7 +41,7 @@ ########## Recruitment ########## router.register('recruitment', views.RecruitmentView, 'recruitment') -router.register('recruitment-sharedinterviewgroup', views.RecruitmentSharedInterviewGroupView, 'recruitment_sharedinterviewgroups') +router.register('recruitment-sharedinterviewgroup', views.RecruitmentSharedInterviewPositionsView, 'recruitment_sharedinterviewgroups') router.register('recruitment-for-recruiter', views.RecruitmentForRecruiterView, 'recruitment_for_recruiter') router.register('recruitment-stats', views.RecruitmentStatisticsView, 'recruitment_stats') router.register('recruitment-separateposition', views.RecruitmentSeparatePositionView, 'recruitment_separateposition') @@ -91,7 +91,7 @@ ), path( 'recruitment-shared-interview-groups//', - views.RecruitmentInterviewGroupRecruitmentView.as_view(), + views.RecruitmentSharedInterviewPositionsRecruitmentView.as_view(), name='recruitment_shared_interviews', ), path('recruitment-positions-gang-for-gangs/', views.RecruitmentPositionsPerGangForGangView.as_view(), name='recruitment_positions_gang_for_gangs'), diff --git a/backend/samfundet/views.py b/backend/samfundet/views.py index 83ba1e204..6cb22a266 100644 --- a/backend/samfundet/views.py +++ b/backend/samfundet/views.py @@ -654,7 +654,7 @@ class RecruitmentForRecruiterView(ModelViewSet): @method_decorator(ensure_csrf_cookie, 'dispatch') -class RecruitmentSharedInterviewGroupView(ModelViewSet): +class RecruitmentSharedInterviewPositionsView(ModelViewSet): permission_classes = (DjangoModelPermissionsOrAnonReadOnly,) serializer_class = RecruitmentPositionSharedInterviewGroupSerializer queryset = RecruitmentPositionSharedInterviewGroup.objects.all() @@ -1138,7 +1138,7 @@ def get_queryset(self) -> Response: return Recruitment.objects.filter(visible_from__lte=timezone.now(), actual_application_deadline__gte=timezone.now()) -class RecruitmentInterviewGroupRecruitmentView(APIView): +class RecruitmentSharedInterviewPositionsRecruitmentView(APIView): permission_classes = [IsAuthenticated] def get( diff --git a/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/RecruitmentGangOverviewPage.tsx b/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/RecruitmentGangOverviewPage.tsx index 954c24625..b5f9ae8cc 100644 --- a/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/RecruitmentGangOverviewPage.tsx +++ b/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/RecruitmentGangOverviewPage.tsx @@ -11,7 +11,7 @@ import { reverse } from '~/named-urls'; import { ROUTES } from '~/routes'; import { dbT, lowerCapitalize } from '~/utils'; import { AdminPageLayout } from '../AdminPageLayout/AdminPageLayout'; -import { AppletContainer, RecruitmentInterviewGroupsList } from './components'; +import { AppletContainer, RecruitmentSharedInterviewPositionsList } from './components'; import styles from './RecruitmentGangOverviewPage.module.scss'; @@ -131,7 +131,6 @@ export function RecruitmentGangOverviewPage() { label: t(KEY.recruitment_interview_groups), value: ( <> - {' '} + ), }, diff --git a/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/RecruitmentInterviewGroupsList.module.scss b/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/RecruitmentSharedInterviewPositionsList.module.scss similarity index 100% rename from frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/RecruitmentInterviewGroupsList.module.scss rename to frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/RecruitmentSharedInterviewPositionsList.module.scss diff --git a/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/RecruitmentInterviewGroupsList.tsx b/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/RecruitmentSharedInterviewPositionsList.tsx similarity index 52% rename from frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/RecruitmentInterviewGroupsList.tsx rename to frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/RecruitmentSharedInterviewPositionsList.tsx index 9f0ef8c96..229119c7f 100644 --- a/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/RecruitmentInterviewGroupsList.tsx +++ b/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/RecruitmentSharedInterviewPositionsList.tsx @@ -2,20 +2,20 @@ import { useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useParams } from 'react-router-dom'; import { toast } from 'react-toastify'; -import { getRecruitmentSharedInterviewGroups, getRecruitmentStats } from '~/api'; -import type { RecruitmentSharedInterviewGroupDto, RecruitmentStatsDto } from '~/dto'; +import { getRecruitmentSharedInterviewPositionss, getRecruitmentStats } from '~/api'; +import type { RecruitmentSharedInterviewPositionsDto, RecruitmentStatsDto } from '~/dto'; import { KEY } from '~/i18n/constants'; -import styles from './RecruitmentInterviewGroupsList.module.scss'; -import { RecruitmentInterviewGroupComponent } from './components/RecruitmentInterviewGroupComponent/RecruitmentInterviewGroupComponent'; +import styles from './RecruitmentSharedInterviewPositionsList.module.scss'; +import { RecruitmentSharedInterviewPositionsComponent } from './components/RecruitmentSharedInterviewPositionsComponent/RecruitmentSharedInterviewPositionsComponent'; -export function RecruitmentInterviewGroupsList() { +export function RecruitmentSharedInterviewPositionsList() { const { recruitmentId } = useParams(); - const [interviewGroups, setInterviewGroups] = useState(); + const [interviewGroups, setInterviewGroups] = useState(); const { t } = useTranslation(); useEffect(() => { if (recruitmentId) { - getRecruitmentSharedInterviewGroups(recruitmentId) + getRecruitmentSharedInterviewPositionss(recruitmentId) .then((response) => { setInterviewGroups(response.data); }) @@ -28,8 +28,8 @@ export function RecruitmentInterviewGroupsList() { return (
- {interviewGroups?.map((interviewGroup: RecruitmentSharedInterviewGroupDto) => { - return ; + {interviewGroups?.map((interviewGroup: RecruitmentSharedInterviewPositionsDto) => { + return ; })}
); diff --git a/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/components/RecruitmentInterviewGroupComponent/index.ts b/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/components/RecruitmentInterviewGroupComponent/index.ts deleted file mode 100644 index 82bb123f8..000000000 --- a/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/components/RecruitmentInterviewGroupComponent/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { RecruitmentInterviewGroupComponent } from './RecruitmentInterviewGroupComponent'; diff --git a/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/components/RecruitmentInterviewGroupComponent/RecruitmentInterviewGroupComponent.module.scss b/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/components/RecruitmentSharedInterviewPositionsComponent/RecruitmentSharedInterviewPositionsComponent.module.scss similarity index 100% rename from frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/components/RecruitmentInterviewGroupComponent/RecruitmentInterviewGroupComponent.module.scss rename to frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/components/RecruitmentSharedInterviewPositionsComponent/RecruitmentSharedInterviewPositionsComponent.module.scss diff --git a/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/components/RecruitmentInterviewGroupComponent/RecruitmentInterviewGroupComponent.tsx b/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/components/RecruitmentSharedInterviewPositionsComponent/RecruitmentSharedInterviewPositionsComponent.tsx similarity index 74% rename from frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/components/RecruitmentInterviewGroupComponent/RecruitmentInterviewGroupComponent.tsx rename to frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/components/RecruitmentSharedInterviewPositionsComponent/RecruitmentSharedInterviewPositionsComponent.tsx index e8b86a228..79f08e869 100644 --- a/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/components/RecruitmentInterviewGroupComponent/RecruitmentInterviewGroupComponent.tsx +++ b/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/components/RecruitmentSharedInterviewPositionsComponent/RecruitmentSharedInterviewPositionsComponent.tsx @@ -1,17 +1,17 @@ import { useTranslation } from 'react-i18next'; import { Button, ExpandableHeader, Table } from '~/Components'; -import type { RecruitmentSharedInterviewGroupDto, RecruitmentStatsDto } from '~/dto'; +import type { RecruitmentSharedInterviewPositionsDto, RecruitmentStatsDto } from '~/dto'; import { KEY } from '~/i18n/constants'; import { reverse } from '~/named-urls'; import { ROUTES } from '~/routes'; import { dbT } from '~/utils'; -import styles from './RecruitmentInterviewGroupComponent.module.scss'; +import styles from './RecruitmentSharedInterviewPositionsComponent.module.scss'; -type RecruitmentInterviewGroupComponentProps = { - interviewGroup: RecruitmentSharedInterviewGroupDto; +type RecruitmentSharedInterviewPositionsComponentProps = { + interviewGroup: RecruitmentSharedInterviewPositionsDto; }; -export function RecruitmentInterviewGroupComponent({ interviewGroup }: RecruitmentInterviewGroupComponentProps) { +export function RecruitmentSharedInterviewPositionsComponent({ interviewGroup }: RecruitmentSharedInterviewPositionsComponentProps) { const interviewGroupHeader = dbT(interviewGroup, 'name') ?? 'N/A'; const { t } = useTranslation(); diff --git a/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/components/RecruitmentSharedInterviewPositionsComponent/index.ts b/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/components/RecruitmentSharedInterviewPositionsComponent/index.ts new file mode 100644 index 000000000..710d4fe2e --- /dev/null +++ b/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/components/RecruitmentSharedInterviewPositionsComponent/index.ts @@ -0,0 +1 @@ +export { RecruitmentSharedInterviewPositionsComponent } from './RecruitmentSharedInterviewPositionsComponent'; diff --git a/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/index.ts b/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/index.ts index 3e6c4124e..5cf490d94 100644 --- a/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/index.ts +++ b/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/index.ts @@ -1,3 +1,3 @@ export { AppletCard } from './AppletCard/AppletCard'; export { AppletContainer } from './AppletContainer/AppletContainer'; -export { RecruitmentInterviewGroupsList } from './RecruitmentInterviewGroupsList/RecruitmentInterviewGroupsList'; +export { RecruitmentSharedInterviewPositionsList } from './RecruitmentInterviewGroupsList/RecruitmentSharedInterviewPositionsList'; diff --git a/frontend/src/PagesAdmin/RecruitmentInterviewGroupFormAdminPage/index.ts b/frontend/src/PagesAdmin/RecruitmentInterviewGroupFormAdminPage/index.ts deleted file mode 100644 index feab21ea1..000000000 --- a/frontend/src/PagesAdmin/RecruitmentInterviewGroupFormAdminPage/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { RecruitmentInterviewGroupFormAdminPage } from './RecruitmentInterviewGroupFormAdminPage'; diff --git a/frontend/src/PagesAdmin/RecruitmentInterviewGroupFormAdminPage/RecruitmentInterviewGroupForm.tsx b/frontend/src/PagesAdmin/RecruitmentSharedInterviewPositionsFormAdminPage/RecruitmentSharedInterviewPositionsForm.tsx similarity index 90% rename from frontend/src/PagesAdmin/RecruitmentInterviewGroupFormAdminPage/RecruitmentInterviewGroupForm.tsx rename to frontend/src/PagesAdmin/RecruitmentSharedInterviewPositionsFormAdminPage/RecruitmentSharedInterviewPositionsForm.tsx index 5bfddc9fc..cf6ac567a 100644 --- a/frontend/src/PagesAdmin/RecruitmentInterviewGroupFormAdminPage/RecruitmentInterviewGroupForm.tsx +++ b/frontend/src/PagesAdmin/RecruitmentSharedInterviewPositionsFormAdminPage/RecruitmentSharedInterviewPositionsForm.tsx @@ -21,15 +21,15 @@ import type { DropdownOption } from '~/Components/Dropdown/Dropdown'; import { MultiSelect } from '~/Components/MultiSelect'; import { getRecruitmentPositions, - postRecruitmentSharedInterviewGroup, + postRecruitmentSharedInterviewPositions, putRecruitmentPosition, - putRecruitmentSharedInterviewGroup, + putRecruitmentSharedInterviewPositions, } from '~/api'; import { KEY } from '~/i18n/constants'; import { reverse } from '~/named-urls'; import { ROUTES } from '~/routes'; import { NON_EMPTY_STRING } from '~/schema/strings'; -import styles from './RecruitmentInterviewGroupFormAdminPage.module.scss'; +import styles from './RecruitmentSharedInterviewPositionsFormAdminPage.module.scss'; const schema = z.object({ name_nb: NON_EMPTY_STRING, @@ -46,7 +46,7 @@ interface FormProps { recruitmentId?: string; } -export function RecruitmentInterviewGroupForm({ initialData, recruitmentId, sharedInterviewGroupId }: FormProps) { +export function RecruitmentSharedInterviewPositionsForm({ initialData, recruitmentId, sharedInterviewGroupId }: FormProps) { const { t } = useTranslation(); const navigate = useNavigate(); @@ -59,9 +59,6 @@ export function RecruitmentInterviewGroupForm({ initialData, recruitmentId, shar const submitText = sharedInterviewGroupId ? t(KEY.common_save) : t(KEY.common_create); - useEffect(() => { - console.log(initialData); - }, [initialData]); useEffect(() => { if (recruitmentId) { @@ -88,8 +85,8 @@ export function RecruitmentInterviewGroupForm({ initialData, recruitmentId, shar }; const action = sharedInterviewGroupId - ? putRecruitmentSharedInterviewGroup(sharedInterviewGroupId, updatedSharedInterviewGroup) - : postRecruitmentSharedInterviewGroup(updatedSharedInterviewGroup); + ? putRecruitmentSharedInterviewPositions(sharedInterviewGroupId, updatedSharedInterviewGroup) + : postRecruitmentSharedInterviewPositions(updatedSharedInterviewGroup); action .then(() => { diff --git a/frontend/src/PagesAdmin/RecruitmentInterviewGroupFormAdminPage/RecruitmentInterviewGroupFormAdminPage.module.scss b/frontend/src/PagesAdmin/RecruitmentSharedInterviewPositionsFormAdminPage/RecruitmentSharedInterviewPositionsFormAdminPage.module.scss similarity index 100% rename from frontend/src/PagesAdmin/RecruitmentInterviewGroupFormAdminPage/RecruitmentInterviewGroupFormAdminPage.module.scss rename to frontend/src/PagesAdmin/RecruitmentSharedInterviewPositionsFormAdminPage/RecruitmentSharedInterviewPositionsFormAdminPage.module.scss diff --git a/frontend/src/PagesAdmin/RecruitmentInterviewGroupFormAdminPage/RecruitmentInterviewGroupFormAdminPage.tsx b/frontend/src/PagesAdmin/RecruitmentSharedInterviewPositionsFormAdminPage/RecruitmentSharedInterviewPositionsFormAdminPage.tsx similarity index 75% rename from frontend/src/PagesAdmin/RecruitmentInterviewGroupFormAdminPage/RecruitmentInterviewGroupFormAdminPage.tsx rename to frontend/src/PagesAdmin/RecruitmentSharedInterviewPositionsFormAdminPage/RecruitmentSharedInterviewPositionsFormAdminPage.tsx index 6993316f8..ecc55aafb 100644 --- a/frontend/src/PagesAdmin/RecruitmentInterviewGroupFormAdminPage/RecruitmentInterviewGroupFormAdminPage.tsx +++ b/frontend/src/PagesAdmin/RecruitmentSharedInterviewPositionsFormAdminPage/RecruitmentSharedInterviewPositionsFormAdminPage.tsx @@ -2,25 +2,25 @@ import { useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useNavigate, useParams } from 'react-router-dom'; import { toast } from 'react-toastify'; -import { getRecruitmentSharedInterviewGroup } from '~/api'; -import type { RecruitmentSharedInterviewGroupDto, RecruitmentSharedInterviewGroupPostDto } from '~/dto'; +import { getRecruitmentSharedInterviewPositions } from '~/api'; +import type { RecruitmentSharedInterviewPositionsDto, RecruitmentSharedInterviewPositionsPostDto } from '~/dto'; import { useTitle } from '~/hooks'; import { KEY } from '~/i18n/constants'; import { reverse } from '~/named-urls'; import { ROUTES } from '~/routes'; import { dbT } from '~/utils'; import { AdminPageLayout } from '../AdminPageLayout/AdminPageLayout'; -import { RecruitmentInterviewGroupForm } from './RecruitmentInterviewGroupForm'; +import { RecruitmentSharedInterviewPositionsForm } from './RecruitmentSharedInterviewPositionsForm'; -export function RecruitmentInterviewGroupFormAdminPage() { +export function RecruitmentSharedInterviewPositionsFormAdminPage() { const { t } = useTranslation(); const navigate = useNavigate(); const { recruitmentId, sharedInterviewGroupId } = useParams(); - const [sharedInterview, setSharedInterview] = useState>(); + const [sharedInterview, setSharedInterview] = useState>(); useEffect(() => { if (sharedInterviewGroupId && recruitmentId) { - getRecruitmentSharedInterviewGroup(sharedInterviewGroupId) + getRecruitmentSharedInterviewPositions(sharedInterviewGroupId) .then((data) => { setSharedInterview(data.data); }) @@ -37,7 +37,7 @@ export function RecruitmentInterviewGroupFormAdminPage() { } }, [sharedInterviewGroupId, recruitmentId, navigate, t]); - const initialData: Partial = { + const initialData: Partial = { name_nb: sharedInterview?.name_nb || '', name_en: sharedInterview?.name_en || '', recruitment: recruitmentId, @@ -52,7 +52,7 @@ export function RecruitmentInterviewGroupFormAdminPage() { return ( - > { +): Promise> { const url = BACKEND_DOMAIN + reverse({ @@ -834,9 +834,9 @@ export async function getRecruitmentSharedInterviewGroups( return await axios.get(url, { withCredentials: true }); } -export async function getRecruitmentSharedInterviewGroup( +export async function getRecruitmentSharedInterviewPositions( sharedInterviewGroupId: string, -): Promise> { +): Promise> { const url = BACKEND_DOMAIN + reverse({ @@ -848,9 +848,9 @@ export async function getRecruitmentSharedInterviewGroup( return await axios.get(url, { withCredentials: true }); } -export async function putRecruitmentSharedInterviewGroup( +export async function putRecruitmentSharedInterviewPositions( sharedInterviewGroupId: string, - sharedInterviewGroup: Partial, + sharedInterviewGroup: Partial, ): Promise { const url = BACKEND_DOMAIN + @@ -863,8 +863,8 @@ export async function putRecruitmentSharedInterviewGroup( return await axios.put(url, sharedInterviewGroup, { withCredentials: true }); } -export async function postRecruitmentSharedInterviewGroup( - sharedInterviewGroup: Partial, +export async function postRecruitmentSharedInterviewPositions( + sharedInterviewGroup: Partial, ): Promise { const url = BACKEND_DOMAIN + diff --git a/frontend/src/dto.ts b/frontend/src/dto.ts index 0f8313016..dcd5f6400 100644 --- a/frontend/src/dto.ts +++ b/frontend/src/dto.ts @@ -428,7 +428,7 @@ export type RecruitmentSeparatePositionDto = { recruitment?: string; }; -export type RecruitmentSharedInterviewGroupDto = { +export type RecruitmentSharedInterviewPositionsDto = { id?: number; recruitment?: string; name_nb: string; @@ -436,7 +436,7 @@ export type RecruitmentSharedInterviewGroupDto = { positions: RecruitmentPositionDto[]; }; -export type RecruitmentSharedInterviewGroupPostDto = Omit & { +export type RecruitmentSharedInterviewPositionsPostDto = Omit & { positions: number[]; }; diff --git a/frontend/src/router/router.tsx b/frontend/src/router/router.tsx index d14d0f017..d4bba0fb4 100644 --- a/frontend/src/router/router.tsx +++ b/frontend/src/router/router.tsx @@ -51,7 +51,7 @@ import { RecruitmentGangAdminPage, RecruitmentGangAllApplicantsAdminPage, RecruitmentGangOverviewPage, - RecruitmentInterviewGroupFormAdminPage, + RecruitmentSharedInterviewPositionsFormAdminPage, RecruitmentOpenToOtherPositionsPage, RecruitmentOverviewPage, RecruitmentPositionFormAdminPage, @@ -378,11 +378,11 @@ export const router = createBrowserRouter( /> } />} + element={} />} /> } />} + element={} />} />