-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
704 possibility to access interview notes from overview page (#739)
* Created interviewnotes page * fix css for InterviewNotes page * added TODOs for getting notes from backend * fixed route names * added translations for interview notes and deleted p-lock.json * fixed interview notes page * Improved css and tsx file * Fixed darkmode
- Loading branch information
Showing
8 changed files
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
frontend/src/PagesAdmin/InterviewNotesAdminPage/InterviewNotesAdminPage.module.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
@import 'src/mixins'; | ||
|
||
@import 'src/constants'; | ||
|
||
.container { | ||
color: $black; | ||
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; | ||
|
||
@include theme-dark { | ||
background-color: $black; | ||
color: $theme-dark-color; | ||
} | ||
} | ||
|
||
.button { | ||
width: 150px; | ||
margin: 0 auto; | ||
margin-top: 10px; | ||
} |
38 changes: 38 additions & 0 deletions
38
frontend/src/PagesAdmin/InterviewNotesAdminPage/InterviewNotesAdminPage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { InterviewNotesPage } from './InterviewNotesAdminPage'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters