Skip to content

Commit

Permalink
Spesifiserer hvilke ytelser som skal støtte stjernemerking
Browse files Browse the repository at this point in the history
  • Loading branch information
hallvardastark committed Oct 16, 2023
1 parent dbb579f commit cf24cd4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
11 changes: 9 additions & 2 deletions packages/sak-dokumenter/src/components/DocumentList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ const DocumentList = ({
}: OwnProps & WrappedComponentProps) => {
const [selectedFilter, setSelectedFilter] = useState(alleBehandlinger);

const erStøttetFagsakYtelseType = [
fagsakYtelseType.PLEIEPENGER,
fagsakYtelseType.OMSORGSPENGER,
fagsakYtelseType.PLEIEPENGER_SLUTTFASE,
].includes(sakstype);

const getInntektsmeldingerIBruk = (signal?: AbortSignal) =>
axios
.get<Kompletthet>(`/k9/sak/api/behandling/kompletthet/beregning/vurderinger`, {
Expand All @@ -112,7 +118,9 @@ const DocumentList = ({
return inntektsmeldingerIBruk;
});

const { data: inntektsmeldingerIBruk } = useQuery('kompletthet', ({ signal }) => getInntektsmeldingerIBruk(signal));
const { data: inntektsmeldingerIBruk } = useQuery('kompletthet', ({ signal }) => getInntektsmeldingerIBruk(signal), {
enabled: erStøttetFagsakYtelseType && !!behandlingUuid,
});

const harMerEnnEnBehandlingKnyttetTilDokumenter = () => {
const unikeBehandlinger = [];
Expand Down Expand Up @@ -152,7 +160,6 @@ const DocumentList = ({
`/k9/sak/api/dokument/hent-dokument?saksnummer=${saksnummer}&journalpostId=${document.journalpostId}&dokumentId=${document.dokumentId}`;

const erInntektsmeldingOgBruktIDenneBehandlingen = (document: Dokument) =>
sakstype === fagsakYtelseType.PLEIEPENGER &&
document.brevkode === inntektsmeldingBrevkode &&
inntektsmeldingerIBruk &&
inntektsmeldingerIBruk.length > 0 &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
margin-bottom: -0.25rem;
margin-left: 0.625rem;
width: 1.5625rem;
display: none;
}

.noDocuments {
Expand Down

0 comments on commit cf24cd4

Please sign in to comment.