From 3bb3c8d459c23fd413769690ab216d9c56230dcd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Snorre=20S=C3=A6ther?=
<112980079+Snorre98@users.noreply.github.com>
Date: Tue, 5 Nov 2024 21:53:25 +0100
Subject: [PATCH] Improve UX of recruitment users without three interview page
(#1601)
* renamed applicationsWithoutInterview and and changd navigation link
* UX improvment
---
.../RecruitmentWithoutInterviewTable.tsx | 5 +--
.../components/WithoutInterviewList.tsx | 36 ++++++++++++++++---
.../components/WithoutInterviewModal.tsx | 22 ++++++++----
frontend/src/i18n/constants.ts | 1 +
frontend/src/i18n/translations.ts | 2 ++
5 files changed, 53 insertions(+), 13 deletions(-)
diff --git a/frontend/src/Components/RecruitmentWithoutInterviewTable/RecruitmentWithoutInterviewTable.tsx b/frontend/src/Components/RecruitmentWithoutInterviewTable/RecruitmentWithoutInterviewTable.tsx
index 3925b2e87..e07800bef 100644
--- a/frontend/src/Components/RecruitmentWithoutInterviewTable/RecruitmentWithoutInterviewTable.tsx
+++ b/frontend/src/Components/RecruitmentWithoutInterviewTable/RecruitmentWithoutInterviewTable.tsx
@@ -24,7 +24,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[] {
@@ -64,7 +64,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 (
<>
-