-
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.
FAGSYSTEM-360070 Støtte oppdatering av ident UTEN hendelse (#6604)
* FAGSYSTEM-360070 Støtte oppdatering av ident UTEN hendelse * fikse og legge til test * ikon på knapp
- Loading branch information
1 parent
8bec594
commit 13372aa
Showing
9 changed files
with
147 additions
and
26 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
6 changes: 6 additions & 0 deletions
6
apps/etterlatte-saksbehandling-ui/client/src/shared/statusbar/usePerson.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,6 @@ | ||
import { useAppSelector } from '~store/Store' | ||
import { IPdlPersonNavnFoedsel } from '~shared/types/Person' | ||
|
||
export function usePerson(): IPdlPersonNavnFoedsel | null { | ||
return useAppSelector((state) => state.personReducer.person) | ||
} |
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
18 changes: 18 additions & 0 deletions
18
apps/etterlatte-saksbehandling-ui/client/src/store/reducers/PersonReducer.ts
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,18 @@ | ||
import { createAction, createReducer } from '@reduxjs/toolkit' | ||
import { IPdlPersonNavnFoedsel } from '~shared/types/Person' | ||
|
||
export const settPerson = createAction<IPdlPersonNavnFoedsel | null>('person/set') | ||
export const resetPerson = createAction('person/reset') | ||
|
||
const initialState: { person: IPdlPersonNavnFoedsel | null } = { | ||
person: null, | ||
} | ||
|
||
export const personReducer = createReducer(initialState, (builder) => { | ||
builder.addCase(settPerson, (state, action) => { | ||
state.person = action.payload | ||
}) | ||
builder.addCase(resetPerson, (state) => { | ||
state.person = null | ||
}) | ||
}) |