diff --git a/frontend/src/Components/Dropdown/index.ts b/frontend/src/Components/Dropdown/index.ts index c11eca394..73287634f 100644 --- a/frontend/src/Components/Dropdown/index.ts +++ b/frontend/src/Components/Dropdown/index.ts @@ -1,2 +1,2 @@ export { Dropdown } from './Dropdown'; -export type { DropdownProps } from './Dropdown'; +export type { DropdownProps, DropdownOption } from './Dropdown'; diff --git a/frontend/src/Components/index.ts b/frontend/src/Components/index.ts index f1cffc04e..8ccd87139 100644 --- a/frontend/src/Components/index.ts +++ b/frontend/src/Components/index.ts @@ -1,4 +1,3 @@ -export { RecruitmentApplicantsStatus } from '../PagesAdmin/RecruitmentPositionOverviewPage/components/RecruitmentApplicantsStatus'; export { AccessDenied } from './AccessDenied'; export { AdminBox } from './AdminBox'; export { Alert } from './Alert'; @@ -63,6 +62,7 @@ export { SamfundetLogo } from './SamfundetLogo'; export { SamfundetLogoSpinner } from './SamfundetLogoSpinner'; export { useScrollToTop } from './ScrollToTop'; export { Select } from './Select'; +export { SetInterviewManuallyModal } from './SetInterviewManually'; export { Skeleton } from './Skeleton'; export { SpinningBorder } from './SpinningBorder'; export { SplashHeaderBox } from './SplashHeaderBox'; @@ -89,7 +89,7 @@ export { Video } from './Video'; // Props export type { CheckboxProps } from './Checkbox'; -export type { DropdownProps } from './Dropdown'; +export type { DropdownOption, DropdownProps } from './Dropdown'; export type { ImagePickerProps } from './ImagePicker/ImagePicker'; export type { InputFieldProps } from './InputField'; export type { InputFileProps } from './InputFile'; diff --git a/frontend/src/PagesAdmin/RecruitmentPositionOverviewPage/RecruitmentPositionOverviewPage.module.scss b/frontend/src/PagesAdmin/RecruitmentPositionOverviewPage/RecruitmentPositionOverviewPage.module.scss index 6b0ad0f2d..214a789a8 100644 --- a/frontend/src/PagesAdmin/RecruitmentPositionOverviewPage/RecruitmentPositionOverviewPage.module.scss +++ b/frontend/src/PagesAdmin/RecruitmentPositionOverviewPage/RecruitmentPositionOverviewPage.module.scss @@ -1,10 +1,3 @@ -.container { - display: flex; - flex-direction: column; - flex-wrap: wrap; - gap: 1rem; -} - .sub_container { margin-top: 1.5em; } diff --git a/frontend/src/PagesAdmin/RecruitmentPositionOverviewPage/RecruitmentPositionOverviewPage.tsx b/frontend/src/PagesAdmin/RecruitmentPositionOverviewPage/RecruitmentPositionOverviewPage.tsx index 5b29e8c77..8f599c1e4 100644 --- a/frontend/src/PagesAdmin/RecruitmentPositionOverviewPage/RecruitmentPositionOverviewPage.tsx +++ b/frontend/src/PagesAdmin/RecruitmentPositionOverviewPage/RecruitmentPositionOverviewPage.tsx @@ -3,7 +3,7 @@ import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useParams } from 'react-router-dom'; import { toast } from 'react-toastify'; -import { Button, RecruitmentApplicantsStatus, Text } from '~/Components'; +import { Button, Text } from '~/Components'; import { getRecruitmentApplicationsForRecruitmentPosition, getRecruitmentPosition, @@ -17,7 +17,7 @@ import { ROUTES } from '~/routes'; import { dbT, lowerCapitalize } from '~/utils'; import { AdminPageLayout } from '../AdminPageLayout/AdminPageLayout'; import styles from './RecruitmentPositionOverviewPage.module.scss'; -import { ProcessedApplicants } from './components'; +import { ProcessedApplicants, RecruitmentApplicantsStatus } from './components'; // Define the possible states an application can be in within the recruitment process // Applications flow through these states as they are processed by recruiters @@ -204,27 +204,25 @@ export function RecruitmentPositionOverviewPage() { }} /> -
- {applicationSections.map(({ type, title, helpText, emptyText }) => ( -
- - {t(title)} ({applications[type]?.length || 0}) + {applicationSections.map(({ type, title, helpText, emptyText }) => ( +
+ + {t(title)} ({applications[type]?.length || 0}) + + {helpText && {t(helpText)}} + {applications[type]?.length > 0 ? ( + + ) : ( + + {t(emptyText)} - {helpText && {t(helpText)}} - {applications[type]?.length > 0 ? ( - - ) : ( - - {t(emptyText)} - - )} -
- ))} -
+ )} +
+ ))} ); } diff --git a/frontend/src/PagesAdmin/RecruitmentPositionOverviewPage/components/RecruitmentApplicantsStatus/RecruitmentApplicantsStatus.module.scss b/frontend/src/PagesAdmin/RecruitmentPositionOverviewPage/components/RecruitmentApplicantsStatus/RecruitmentApplicantsStatus.module.scss index cad99a052..cb0ed02eb 100644 --- a/frontend/src/PagesAdmin/RecruitmentPositionOverviewPage/components/RecruitmentApplicantsStatus/RecruitmentApplicantsStatus.module.scss +++ b/frontend/src/PagesAdmin/RecruitmentPositionOverviewPage/components/RecruitmentApplicantsStatus/RecruitmentApplicantsStatus.module.scss @@ -92,7 +92,7 @@ justify-content: center; } -.loadingApplState { +.loadingApplicationStatus { display: block; position: absolute; width: 1rem; diff --git a/frontend/src/PagesAdmin/RecruitmentPositionOverviewPage/components/RecruitmentApplicantsStatus/RecruitmentApplicantsStatus.tsx b/frontend/src/PagesAdmin/RecruitmentPositionOverviewPage/components/RecruitmentApplicantsStatus/RecruitmentApplicantsStatus.tsx index 5a50f349c..a1d2124d6 100644 --- a/frontend/src/PagesAdmin/RecruitmentPositionOverviewPage/components/RecruitmentApplicantsStatus/RecruitmentApplicantsStatus.tsx +++ b/frontend/src/PagesAdmin/RecruitmentPositionOverviewPage/components/RecruitmentApplicantsStatus/RecruitmentApplicantsStatus.tsx @@ -1,17 +1,21 @@ import { Fragment } from 'react'; import { useTranslation } from 'react-i18next'; -import { SamfundetLogoSpinner, TimeDisplay } from '~/Components'; -import { CrudButtons } from '~/Components/CrudButtons/CrudButtons'; -import { Dropdown, type DropdownOption } from '~/Components/Dropdown/Dropdown'; -import { Table } from '~/Components/Table'; -import { Text } from '~/Components/Text/Text'; +import { + CrudButtons, + Dropdown, + type DropdownOption, + Link, + SamfundetLogoSpinner, + SetInterviewManuallyModal, + Table, + Text, + TimeDisplay, +} from '~/Components'; import type { RecruitmentApplicationDto, RecruitmentApplicationStateDto } from '~/dto'; import { useCustomNavigate } from '~/hooks'; import { KEY } from '~/i18n/constants'; import { reverse } from '~/named-urls'; import { ROUTES } from '~/routes'; -import { Link } from '../../../../Components/Link'; -import { SetInterviewManuallyModal } from '../../../../Components/SetInterviewManually'; import styles from './RecruitmentApplicantsStatus.module.scss'; type RecruitmentApplicantsStatusProps = { @@ -166,7 +170,7 @@ export function RecruitmentApplicantsStatus({ style: applicationStatusStyle, content: ( - {isUpdating && } + {isUpdating && } - {isUpdating && } + {isUpdating && }