-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Flytter typer * Viser bare aktive notater i varselboble Logikk på om notat kan redigeres * Formatterer årstall kortere * Laget apiPaths for å samle api-endepunkter Rydding i kode
- Loading branch information
1 parent
2bc89ec
commit d6a2472
Showing
17 changed files
with
165 additions
and
122 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const apiPaths = { | ||
notatISak: '/k9/sak/api/notat', | ||
}; | ||
|
||
export default apiPaths; |
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
28 changes: 17 additions & 11 deletions
28
packages/sak-app/src/behandlingsupport/notater/NotaterIndex.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 |
---|---|---|
@@ -1,25 +1,31 @@ | ||
import { LoadingPanel, requireProps } from '@fpsak-frontend/shared-components'; | ||
import Notater from '@k9-sak-web/sak-notat'; | ||
import { FagsakPerson, NavAnsatt } from '@k9-sak-web/types'; | ||
import { Fagsak, NavAnsatt } from '@k9-sak-web/types'; | ||
import React from 'react'; | ||
import ErrorBoundary from '@k9-sak-web/sak-app/src/app/ErrorBoundary'; | ||
import { useRestApiErrorDispatcher } from '@k9-sak-web/rest-api-hooks'; | ||
|
||
interface OwnProps { | ||
saksnummer: string; | ||
behandlingId?: number; | ||
behandlingVersjon?: number; | ||
fagsakPerson?: FagsakPerson; | ||
navAnsatt: NavAnsatt; | ||
fagsak: Fagsak; | ||
} | ||
|
||
const EMPTY_ARRAY = []; | ||
|
||
/** | ||
* NotaterIndex | ||
* | ||
* Container komponent. Har ansvar for å vise notater i saken. | ||
*/ | ||
export const NotaterIndex = ({ saksnummer, navAnsatt }: OwnProps) => ( | ||
<Notater fagsakId={saksnummer} navAnsatt={navAnsatt} /> | ||
); | ||
export const NotaterIndex = ({ fagsak, navAnsatt }: OwnProps) => { | ||
const { addErrorMessage } = useRestApiErrorDispatcher(); | ||
|
||
export default requireProps(['saksnummer'], <LoadingPanel />)(NotaterIndex); | ||
return ( | ||
<ErrorBoundary errorMessageCallback={addErrorMessage}> | ||
<Notater | ||
fagsakId={fagsak.saksnummer} | ||
navAnsatt={navAnsatt} | ||
fagsakHarPleietrengende={!!fagsak.pleietrengendeAktørId} | ||
/> | ||
</ErrorBoundary> | ||
); | ||
}; | ||
export default requireProps(['fagsak'], <LoadingPanel />)(NotaterIndex); |
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
Oops, something went wrong.