Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

704 possibility to access interview notes from overview page #739

Merged
5 changes: 5 additions & 0 deletions frontend/src/AppRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import { SamfOutlet } from './Components/SamfOutlet';
import { SultenOutlet } from './Components/SultenOutlet';
import { VenuePage } from './Pages/VenuePage';
import { AdminLayout } from './PagesAdmin/AdminLayout/AdminLayout';
import { InterviewNotesPage } from './PagesAdmin/InterviewNotesAdminPage';
import { RecruitmentFormAdminPage } from './PagesAdmin/RecruitmentFormAdminPage';
import { RecruitmentPositionOverviewPage } from './PagesAdmin/RecruitmentPositionOverviewPage/RecruitmentPositionOverviewPage';
import { SaksdokumentAdminPage } from './PagesAdmin/SaksdokumentAdminPage';
Expand Down Expand Up @@ -185,6 +186,10 @@ export function AppRoutes() {
path={ROUTES.frontend.admin_recruitment_users_without_interview}
element={<RecruitmentUsersWithoutInterview />}
/>
<Route
path={ROUTES.frontend.admin_recruitment_gang_position_applicants_interview_notes}
element={<InterviewNotesPage />}
/>
{/* TODO ADD PERMISSIONS */}
<Route
path={ROUTES.frontend.admin_recruitment_gang_overview}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.container {
emilte marked this conversation as resolved.
Show resolved Hide resolved
display: flex;
flex-direction: column;
align-items: left;
width: auto;
background-color: white;
font-family: inherit;
border-radius: 10px;
transition: 0.2s;
padding: 20px;
margin: 10px;
}

.button {
width: 150px;
margin: 0 auto;
margin-top: 10px;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { useState } from 'react';
import { useTranslation } from 'react-i18next';
import { Button } from '~/Components';
import { TextAreaField } from '~/Components/TextAreaField/TextAreaField';
import { KEY } from '~/i18n/constants';
import { AdminPageLayout } from '../AdminPageLayout/AdminPageLayout';
import styles from './InterviewNotesAdminPage.module.scss';

export function InterviewNotesPage() {
//TODO: interview notes from backend
const [editingMode, setEditingMode] = useState(false);
const [text, setText] = useState('Notater fra intervjuet her...'); //TODO: place the text from the backend here.
const posId = 1; //TODO: get the posId from the backend.
const { t } = useTranslation();

function handleEditSave() {
if (editingMode) {
//TODO: save the text in the textbox and send it to the backend
}
setEditingMode(!editingMode);
}

//TODO: make handleSave function to save the text in the textbox and send it to the backend

return (
<AdminPageLayout title={t(KEY.recruitment_interview_notes)}>
<div className={styles.container}>
<label htmlFor="INotes">
{t(KEY.recruitment_applicant)} {posId}
</label>
<TextAreaField value={text} onChange={setText} disabled={!editingMode}></TextAreaField>
<Button theme="samf" rounded={true} className={styles.button} onClick={handleEditSave}>
{editingMode ? t(KEY.common_save) : t(KEY.common_edit)}
</Button>
</div>
</AdminPageLayout>
);
}
1 change: 1 addition & 0 deletions frontend/src/PagesAdmin/InterviewNotesAdminPage/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { InterviewNotesPage } from './InterviewNotesAdminPage';
1 change: 1 addition & 0 deletions frontend/src/PagesAdmin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export { ImageAdminPage } from './ImageAdminPage';
export { ImageFormAdminPage } from './ImageFormAdminPage';
export { InformationAdminPage } from './InformationAdminPage';
export { InformationFormAdminPage } from './InformationFormAdminPage';
export { InterviewNotesPage } from './InterviewNotesAdminPage';
export { OpeningHoursAdminPage } from './OpeningHoursAdminPage';
export { RecruitmentAdminPage } from './RecruitmentAdminPage';
export { RecruitmentGangAdminPage } from './RecruitmentGangAdminPage';
Expand Down
1 change: 1 addition & 0 deletions frontend/src/i18n/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ export const KEY = {
recruitment_applicant: 'recruitment_applicant',
recruitment_interview_time: 'recruitment_interview_time',
recruitment_interview_location: 'recruitment_interview_location',
recruitment_interview_notes: 'recruitment_interview_notes',
recruitment_priority: 'recruitment_priority',
recruitment_recruiter_priority: 'recruitment_recruiter_priority',
recruitment_recruiter_status: 'recruitment_recruiter_status',
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/i18n/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ export const nb: Record<KeyValues, string> = {
[KEY.recruitment_applicant]: 'Søker',
[KEY.recruitment_interview_time]: 'Intervjutid',
[KEY.recruitment_interview_location]: 'Intervjusted',
[KEY.recruitment_interview_notes]: 'Intervju notater',
[KEY.recruitment_priority]: 'Søkers prioritet',
[KEY.recruitment_recruiter_priority]: 'Prioritet',
[KEY.recruitment_recruiter_status]: 'Status',
Expand Down Expand Up @@ -369,6 +370,7 @@ export const en: Record<KeyValues, string> = {
[KEY.recruitment_applicant]: 'Applicant',
[KEY.recruitment_interview_time]: 'Intervjutid',
[KEY.recruitment_interview_location]: 'Intervjusted',
[KEY.recruitment_interview_notes]: 'Interview notes',
[KEY.recruitment_priority]: 'Søkers prioritet',
[KEY.recruitment_recruiter_priority]: 'Prioritet',
[KEY.recruitment_recruiter_status]: 'Status',
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/routes/frontend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ export const ROUTES_FRONTEND = {
admin_recruitment_gang_position_edit: '/control-panel/recruitment/:recruitmentId/gang/:gangId/edit/:positionId',
admin_recruitment_gang_position_applicants_overview:
'/control-panel/recruitment/:recruitmentId/gang/:gangId/position/:positionId',
admin_recruitment_gang_position_applicants_interview_notes:
'/control-panel/recruitment/:recruitmentId/gang/:gangId/position/:positionId/notesId', //fix when backend is done
// ==================== //
// Development //
// ==================== //
Expand Down
Loading