This repository has been archived by the owner on Nov 5, 2024. It is now read-only.
-
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.
- Loading branch information
Showing
11 changed files
with
247 additions
and
39 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
7 changes: 7 additions & 0 deletions
7
...src/NotifikasjonWidget/NotifikasjonPanel/NotifikasjonListeElement/AvtaletilstandLinje.css
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,7 @@ | ||
|
||
.notifikasjon_AvtaletilstandLinje.notifikasjon_AvtaletilstandLinje { | ||
width: fit-content; | ||
--ac-tag-warning-bg: rgba(255, 236, 204, 1); | ||
--ac-tag-neutral-bg: rgba(0, 0, 0, 0.05); | ||
--ac-tag-success-bg: rgba(204, 241, 214, 1); | ||
} |
55 changes: 55 additions & 0 deletions
55
...src/NotifikasjonWidget/NotifikasjonPanel/NotifikasjonListeElement/AvtaletilstandLinje.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,55 @@ | ||
import React, {FC} from 'react' | ||
import {Tag} from '@navikt/ds-react' | ||
import './AvtaletilstandLinje.css' | ||
import {KalenderavtaleTilstand, Notifikasjon} from '../../../api/graphql-types' | ||
|
||
export interface StatusLinjeProps { | ||
notifikasjon: Notifikasjon | ||
} | ||
|
||
export const AvtaletilstandLinje: FC<StatusLinjeProps> = ({ notifikasjon }) => { | ||
if (notifikasjon.__typename !== 'Kalenderavtale') { | ||
return null | ||
} | ||
|
||
switch (notifikasjon.avtaletilstand) { | ||
case KalenderavtaleTilstand.VenterSvarFraArbeidsgiver: | ||
return ( | ||
<Tag size='small' className='notifikasjon_AvtaletilstandLinje' variant='warning'> | ||
Svar på invitasjonen | ||
</Tag> | ||
) | ||
|
||
case KalenderavtaleTilstand.ArbeidsgiverHarGodtatt: | ||
return ( | ||
<Tag size='small' className='notifikasjon_AvtaletilstandLinje' variant='success'> | ||
Du har takket ja | ||
</Tag> | ||
) | ||
|
||
case KalenderavtaleTilstand.ArbeidsgiverVilEndreTidEllerSted: | ||
return ( | ||
<Tag size='small' className='notifikasjon_AvtaletilstandLinje' variant='neutral'> | ||
Du ønsker å endre tid eller sted | ||
</Tag> | ||
) | ||
|
||
case KalenderavtaleTilstand.ArbeidsgiverVilAvlyse: | ||
return ( | ||
<Tag size='small' className='notifikasjon_AvtaletilstandLinje' variant='neutral'> | ||
Du ønsker å avlyse | ||
</Tag> | ||
) | ||
|
||
case KalenderavtaleTilstand.Avlyst: | ||
return ( | ||
<Tag size='small' className='notifikasjon_AvtaletilstandLinje' variant='info'> | ||
Avlyst | ||
</Tag> | ||
) | ||
|
||
|
||
default: | ||
return null | ||
} | ||
} |
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
Oops, something went wrong.