-
Notifications
You must be signed in to change notification settings - Fork 6
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
Vis kolonner med info om tiltakshendelse #1066
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
f34cfdd
Legger til overskrifter i statusfilter Tiltakshendelser i Enhetens ov…
klaramargrethehelgemo 126f807
Ta bort sistEndret
Mathiamu 981a5a0
Endre navn til TILTAKSHENDELSE_LENKE
Mathiamu f0762bf
Legg til mockdata
Mathiamu a31bb25
Lag ny type kolonne og legg til datakolonner
Mathiamu e52eb7f
Legger inn kolonner for tiltakshendelser i Min oversikt
klaramargrethehelgemo 024412f
Update features.ts
klaramargrethehelgemo 99dc0b0
Tilpasninger til brukermodell fra backend
klaramargrethehelgemo df8b9b7
Legger til hendelse-kolonnene i Velg kolonner
klaramargrethehelgemo afb9e4e
Designendringer.
klaramargrethehelgemo 8ecfce5
Endrer mock
klaramargrethehelgemo e288ae6
Fjerner tiltakstype fra mulige kolonner
klaramargrethehelgemo 4325c03
endrer tiltakshendelseobjektet til å bruke samme objektform som opens…
JulieHillRoa 90f211a
lenke får med basepath
JulieHillRoa fbdf9c6
Smårydding etter reivew
ingfo 9dace20
Ta bort sortering på nye kolonner
ingfo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
src/components/tabell/kolonner/tiltakshendelse-lenke-kolonne.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,42 @@ | ||
import {BrukerModell} from '../../../model-interfaces'; | ||
import {oppdaterBrukerIKontekstOgNavigerTilLenke} from '../../../utils/utils'; | ||
import {AksjonKnappMedPopoverFeilmelding} from '../../aksjon-knapp-med-popover-feilmelding/aksjon-knapp-med-popover-feilmelding'; | ||
import {getVeilarbpersonflateUrl} from '../../../utils/url-utils'; | ||
|
||
interface LenkeKolonneProps { | ||
bruker: BrukerModell; | ||
skalVises: boolean; | ||
enhetId: string; | ||
className?: string; | ||
} | ||
|
||
export const TiltakshendelseLenkeKolonne = ({bruker, skalVises, enhetId, className}: LenkeKolonneProps) => { | ||
if (!skalVises || !bruker.tiltakshendelse) { | ||
return null; | ||
} | ||
|
||
const tiltakshendelse = bruker.tiltakshendelse; | ||
|
||
const handterKlikk = () => | ||
oppdaterBrukerIKontekstOgNavigerTilLenke(bruker.fnr, getVeilarbpersonflateUrl(tiltakshendelse.lenke, enhetId)); | ||
|
||
const handterKlikkNyFane = () => | ||
oppdaterBrukerIKontekstOgNavigerTilLenke( | ||
bruker.fnr, | ||
getVeilarbpersonflateUrl(tiltakshendelse.lenke, enhetId), | ||
true | ||
); | ||
|
||
return ( | ||
<div className={className}> | ||
{tiltakshendelse && ( | ||
<AksjonKnappMedPopoverFeilmelding | ||
klikkAksjon={handterKlikk} | ||
ctrlklikkAksjon={handterKlikkNyFane} | ||
knappStil="juster-tekst-venstre" | ||
knappTekst={tiltakshendelse.tekst} | ||
/> | ||
)} | ||
</div> | ||
); | ||
}; |
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
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jeg syns ikke vi skal fjerne
kode
fra navnet såfremt det er koden vi sender og ikke hele tiltakstypenavnet. Tror det blir mer forståelig når vi skal legge tilbake type-kolonnen og må bruke koden for å få typen!