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

feat: add pre-acceptance and pre-rejection status #161

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions backend/utils/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ enum StatusTypes {
INVITED_TO_INTERVIEW = 'Invited to interview',
INTERVIEW_DECLINED = 'Interview declined',
INTERVIEW_COMPLETED = 'Interview completed',
PLANNED_ACCEPTANCE = 'Planned acceptance',
PLANNED_REJECTION = 'Planned rejection',
OFFER_GIVEN = 'Offer given',
OFFER_DECLINED = 'Offer declined',
ACCEPTED = 'Accepted',
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/StatusInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ function isYellow(value: StatusTypes): boolean {
return (
value === StatusTypes.PLANNED_INTERVIEW ||
value === StatusTypes.INVITED_TO_INTERVIEW ||
value === StatusTypes.PLANNED_ACCEPTANCE ||
value === StatusTypes.OFFER_GIVEN ||
value === StatusTypes.INTERVIEW_COMPLETED
)
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/utils/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ enum StatusTypes {
INVITED_TO_INTERVIEW = 'Invited to interview',
INTERVIEW_DECLINED = 'Interview declined',
INTERVIEW_COMPLETED = 'Interview completed',
PLANNED_ACCEPTANCE = 'Planned acceptance',
PLANNED_REJECTION = 'Planned rejection',
OFFER_GIVEN = 'Offer given',
OFFER_DECLINED = 'Offer declined',
ACCEPTED = 'Accepted',
Expand Down
17 changes: 17 additions & 0 deletions frontend/src/utils/status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
PhoneCheck,
PhoneIncoming,
PhoneOff,
PhonePause,
QuestionMark,
UserOff,
UserPlus,
Expand All @@ -25,6 +26,10 @@ export function getStatusTranslation(status: StatusTypes) {
return 'Intervju avslått'
case StatusTypes.INTERVIEW_COMPLETED:
return 'Intervju fullført'
case StatusTypes.PLANNED_ACCEPTANCE:
return 'Planlagt tilbud'
case StatusTypes.PLANNED_REJECTION:
return 'Planlagt avslag'
case StatusTypes.OFFER_GIVEN:
return 'Tilbud gitt'
case StatusTypes.OFFER_DECLINED:
Expand All @@ -50,6 +55,10 @@ export function getStatus(status: string) {
return StatusTypes.INTERVIEW_DECLINED
case 'Interview completed':
return StatusTypes.INTERVIEW_COMPLETED
case 'Planned acceptance':
return StatusTypes.PLANNED_ACCEPTANCE
case 'Planned rejection':
return StatusTypes.PLANNED_REJECTION
case 'Offer given':
return StatusTypes.OFFER_GIVEN
case 'Offer declined':
Expand All @@ -75,6 +84,10 @@ export function getStatusColor(status: StatusTypes, theme: MantineTheme) {
return theme.colors.ntnui_red[9]
case StatusTypes.INTERVIEW_COMPLETED:
return theme.colors.ntnui_yellow[9]
case StatusTypes.PLANNED_ACCEPTANCE:
return theme.colors.ntnui_yellow[9]
case StatusTypes.PLANNED_REJECTION:
return theme.colors.ntnui_red[9]
case StatusTypes.OFFER_GIVEN:
return theme.colors.ntnui_yellow[9]
case StatusTypes.OFFER_DECLINED:
Expand All @@ -100,6 +113,10 @@ export function getIconForStatus(status: string) {
return <PhoneOff size={20} />
case StatusTypes.INTERVIEW_COMPLETED:
return <PhoneCheck size={20} />
case StatusTypes.PLANNED_ACCEPTANCE:
return <PhonePause size={20} />
case StatusTypes.PLANNED_REJECTION:
return <PhonePause size={20} />
case StatusTypes.OFFER_GIVEN:
return <UserPlus size={20} />
case StatusTypes.OFFER_DECLINED:
Expand Down