Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(signature-collection): cleanup constituencies #15864

Merged
merged 2 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,54 +66,6 @@ const OwnerView = () => {
</Box>
))}
</Box>
{/* Ábyrgðaraðilar - hlutverk tekið út eins og staðan er */}
{/*<Box>
<Box
display="flex"
justifyContent="spaceBetween"
alignItems="baseline"
marginBottom={3}
>
<Text variant="h4">
{formatMessage(m.managers) + ' '}
<Tooltip
placement="right"
text="info"
color="blue400"
iconSize="medium"
/>
</Text>
<LookupPerson
collectionId={'1'}
title={formatMessage(m.addManager)}
/>
</Box>
<T.Table>
<T.Head>
<T.Row>
<T.HeadData>{formatMessage(m.personName)}</T.HeadData>
<T.HeadData>{formatMessage(m.personNationalId)}</T.HeadData>
<T.HeadData>{formatMessage(m.constituency)}</T.HeadData>
<T.HeadData></T.HeadData>
</T.Row>
</T.Head>
<T.Body>
<T.Row>
<T.Data>{'Nafni Nafnason'}</T.Data>
<T.Data>{'010130-3019'}</T.Data>
<T.Data width={'40%'}>
{formatMessage(m.allConstituencies)}
</T.Data>
<T.Data width={'12%'}>
<Box display={'flex'} justifyContent={'flexEnd'}>
<DeletePerson />
</Box>
</T.Data>
</T.Row>
</T.Body>
</T.Table>
</Box>*/}
{/* Umsjónaraðilar */}
<Box>
<Box
display="flex"
Expand All @@ -127,7 +79,6 @@ const OwnerView = () => {
</Text>
<LookupPerson
collectionId={'1'}
withConstituencies
title={formatMessage(m.addSupervisor)}
/>
</Box>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,18 @@
import { useEffect, useState } from 'react'
import {
Box,
Stack,
Button,
Text,
Input,
Checkbox,
} from '@island.is/island-ui/core'
import { Box, Stack, Button, Text, Input } from '@island.is/island-ui/core'
import { Modal } from '@island.is/service-portal/core'
import { useLocale } from '@island.is/localization'
import { useIdentityQuery } from '@island.is/service-portal/graphql'
import { InputController } from '@island.is/shared/form-fields'
import { useForm } from 'react-hook-form'
import { m } from '../../../../../lib/messages'
import { constituencies } from '../../../../../lib/constants'

interface LookupPersonProps {
collectionId: string
title: string
withConstituencies?: boolean
}

const LookupPerson = ({
collectionId,
title,
withConstituencies,
}: LookupPersonProps) => {
const LookupPerson = ({ collectionId, title }: LookupPersonProps) => {
const { formatMessage } = useLocale()
const { control } = useForm()

Expand Down Expand Up @@ -105,14 +92,6 @@ const LookupPerson = ({
value={name}
readOnly
/>
{withConstituencies &&
constituencies.map((constituency) => (
<Checkbox
key={constituency}
label={constituency}
value={constituency}
/>
))}
</Stack>
<Box display="flex" justifyContent="center" marginY={5}>
<Button>{formatMessage(m.add)}</Button>
Expand Down