Skip to content

Commit

Permalink
Div css
Browse files Browse the repository at this point in the history
  • Loading branch information
betsytraran committed Mar 19, 2024
1 parent c911bca commit c01598a
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const ImporterValgtePersoner = ({ identer, isMultiple }) => {
icon={<EnterIcon />}
loading={loading}
onClick={openModal}
style={{ minWidth: '150px' }}
style={{ minWidth: '155px', height: '24px', marginTop: '10px' }}
>
Importer person
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export const NavigerTilPerson = ({ ident }) => {
icon={<ArrowRightIcon />}
loading={loading}
onClick={handleClick}
style={{ minWidth: '118px' }}
>
Vis i gruppe
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ import { NavigerTilPerson } from '@/pages/tenorSoek/resultatVisning/NavigerTilPe
import { ImporterValgtePersoner } from '@/pages/tenorSoek/resultatVisning/ImporterValgtePersoner'
import { useFinnesIDolly } from '@/utils/hooks/useIdent'

const PersonVisningWrapper = styled.div`
position: sticky;
top: 80px;
max-height: 92vh;
overflow: auto;
scrollbar-width: thin;
`

const NavnHeader = styled.h2`
margin: 10px 0 15px 0;
word-break: break-word;
Expand All @@ -33,22 +41,24 @@ export const PersonVisning = ({ person, ident, loading, error }) => {
const personData = person.data?.dokumentListe?.[0]

return (
<Box background="surface-default" padding="3" borderRadius="medium">
<div className="flexbox--space">
<NavnHeader>{personData?.visningnavn}</NavnHeader>
{loadingFinnes && <Loading onlySpinner />}
{!loadingFinnes &&
(finnesIDolly ? (
<NavigerTilPerson ident={ident} />
) : (
<ImporterValgtePersoner identer={[ident]} isMultiple={false} />
))}
</div>
<FolkeregisteretVisning data={personData} />
<EnhetsregisteretForetaksregisteretVisning
data={_.get(personData, 'tenorRelasjoner.brreg-er-fr')}
/>
<InntektVisning data={personData?.tenorRelasjoner?.inntekt} />
</Box>
<PersonVisningWrapper>
<Box background="surface-default" padding="3" borderRadius="medium">
<div className="flexbox--space">
<NavnHeader>{personData?.visningnavn}</NavnHeader>
{loadingFinnes && <Loading onlySpinner />}
{!loadingFinnes &&
(finnesIDolly ? (
<NavigerTilPerson ident={ident} />
) : (
<ImporterValgtePersoner identer={[ident]} isMultiple={false} />
))}
</div>
<FolkeregisteretVisning data={personData} />
<EnhetsregisteretForetaksregisteretVisning
data={_.get(personData, 'tenorRelasjoner.brreg-er-fr')}
/>
<InntektVisning data={personData?.tenorRelasjoner?.inntekt} />
</Box>
</PersonVisningWrapper>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@ const TagsWrapper = styled.div`
margin: 10px 0;
`

const PersonVisningWrapper = styled.div`
position: sticky;
top: 80px;
max-height: 92vh;
overflow: auto;
scrollbar-width: none;
`

export const TreffListe = ({ response, personListe, loading, error }: any) => {
if ((!personListe || personListe?.length === 0) && loading) {
return <Loading label="Laster treff ..." />
Expand Down Expand Up @@ -132,14 +124,12 @@ export const TreffListe = ({ response, personListe, loading, error }: any) => {
}}
>
{valgtPerson && (
<PersonVisningWrapper>
<PersonVisning
person={valgtPersonData?.data}
ident={valgtPerson?.id}
loading={valgtPersonLoading}
error={valgtPersonError}
/>
</PersonVisningWrapper>
<PersonVisning
person={valgtPersonData?.data}
ident={valgtPerson?.id}
loading={valgtPersonLoading}
error={valgtPersonError}
/>
)}
</div>
</div>
Expand Down

0 comments on commit c01598a

Please sign in to comment.