-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vis informasjon om innsynsrett (#1300)
* mark en test akivitet som kassert * Legg til tag kassert aktiviteter * farge forandring på kassert tag * endre tekst fra Kassert til Slettet * Lagt til under 18 imformasjon på hva er aktivitestplan tabben under rettigheter og personvern panel * Forandret text på under 18 info på rettigheter og personvern panel * Lagt til under 18 info box når man lager ny aktivitet og oppdatert info på hva er rettigheter og personvern panel * Gjort om under 18 info på aktiviterts kort til komponent og skal bre vises når ekstern bruker er under 18 * gjort om om no info. og lagd egen accordian til under 18 på hva er aktivitetsplan * wip * ✨ Lag innsynsrettslice * wip * Fiks URL i mock * Hent innsynsrett når appen starter * Fikset sånn at over 18 ekstern brukere ikke ser under 18 info * Tillatt innsynsrettkall kun for ekstern bruker * clean up * Rename * Rename * Fix --------- Co-authored-by: johannetronstad <johanne.tronstad@nav.no> Co-authored-by: Mads Lee Giil <mads.lee.giil@nav.no>
- Loading branch information
1 parent
f5b40d7
commit 58755a5
Showing
17 changed files
with
98 additions
and
3 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { GuidePanel } from '@navikt/ds-react'; | ||
import { useSelector } from 'react-redux'; | ||
import { selectInnsynsrett } from './innsynsrett-selector'; | ||
|
||
export const InnsynsrettInfo = () => { | ||
const innsynsrett = useSelector(selectInnsynsrett); | ||
|
||
if (!innsynsrett || !innsynsrett.foresatteHarInnsynsrett) return null; | ||
|
||
return <GuidePanel poster={true}>Husk at dine foresatte kan lese det du skriver her.</GuidePanel>; | ||
}; |
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,5 @@ | ||
import { RootState } from '../../../store'; | ||
|
||
export const selectInnsynsrett = (state: RootState) => { | ||
return state.data.innsynsrett.data; | ||
}; |
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,19 @@ | ||
import createGenericSlice, { Status } from '../../../createGenericSlice'; | ||
import { createAsyncThunk } from '@reduxjs/toolkit'; | ||
import * as Api from '../../../api/aktivitetAPI'; | ||
|
||
interface Innsynsrett { | ||
foresatteHarInnsynsrett: boolean | undefined; | ||
status: Status; | ||
} | ||
|
||
const innsynsrettSlice = createGenericSlice<Innsynsrett>({ | ||
name: 'innsynsrett', | ||
reducers: {}, | ||
}); | ||
|
||
export const hentInnsynsrett = createAsyncThunk(`${innsynsrettSlice.name}/fetchInnsynsrett`, async () => { | ||
return await Api.hentInnsynsrett(); | ||
}); | ||
|
||
export const innsynsrettReducer = innsynsrettSlice.reducer; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { Accordion, BodyShort, Heading } from '@navikt/ds-react'; | ||
import React, { useState } from 'react'; | ||
import { logAccordionAapnet } from '../../amplitude/amplitude'; | ||
|
||
export const InnsynsrettPanel = () => { | ||
const [open, setOpen] = useState(false); | ||
|
||
function handleClick() { | ||
if (!open) { | ||
logAccordionAapnet('Slik bruker du aktivitetsplanen'); | ||
} | ||
setOpen(!open); | ||
} | ||
|
||
return ( | ||
<Accordion.Item> | ||
<Accordion.Header onClick={handleClick}> | ||
<Heading level="2" size="small"> | ||
Er du under 18 år? | ||
</Heading> | ||
</Accordion.Header> | ||
<Accordion.Content> | ||
<Heading level="3" size="xsmall" className="pt-4"> | ||
Er du under 18 år? | ||
</Heading> | ||
<BodyShort className="pb-4"> | ||
Når du er under 18 år så har dine foreldre eller foresatte rett til innsyn i din sak. Det betyr at | ||
foreldrene dine kan be om å få se alt du skriver i NAV sine tjenester. Derfor bør du ikke skrive noe | ||
her som du ikke vil at foreldrene dine skal lese. | ||
</BodyShort> | ||
|
||
<BodyShort> | ||
Når du blir 18 år vil de ikke kunne lese nye ting du skriver, men de kan fortsatt lese det du skrev | ||
før du fylte 18 år | ||
</BodyShort> | ||
</Accordion.Content> | ||
</Accordion.Item> | ||
); | ||
}; |
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