-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(portals-admin): Parliamentary collection (#16142)
* test * merge * merge tweaks * aftermerge-tweaks * tw * download reports * key * tweaks * format --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
- Loading branch information
1 parent
309b467
commit fb57f11
Showing
14 changed files
with
625 additions
and
32 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
62 changes: 62 additions & 0 deletions
62
libs/portals/admin/signature-collection/src/screens-parliamentary/DownloadReports/index.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,62 @@ | ||
import { useLocale } from '@island.is/localization' | ||
import { ActionCard, Box, Button, Stack, Text } from '@island.is/island-ui/core' | ||
import { useState } from 'react' | ||
import { Modal } from '@island.is/react/components' | ||
import { SignatureCollectionArea } from '@island.is/api/schema' | ||
import { m } from '../../lib/messages' | ||
|
||
export const DownloadReports = ({ | ||
areas, | ||
}: { | ||
areas: SignatureCollectionArea[] | ||
}) => { | ||
const { formatMessage } = useLocale() | ||
const [modalDownloadReportsIsOpen, setModalDownloadReportsIsOpen] = | ||
useState(false) | ||
|
||
return ( | ||
<Box> | ||
<Button | ||
icon="download" | ||
iconType="outline" | ||
variant="utility" | ||
size="small" | ||
onClick={() => setModalDownloadReportsIsOpen(true)} | ||
> | ||
{formatMessage(m.downloadReports)} | ||
</Button> | ||
<Modal | ||
id="downloadReports" | ||
isVisible={modalDownloadReportsIsOpen} | ||
title={formatMessage(m.downloadReports)} | ||
label={''} | ||
onClose={() => setModalDownloadReportsIsOpen(false)} | ||
closeButtonLabel={''} | ||
> | ||
<Text>{formatMessage(m.downloadReportsDescription)}</Text> | ||
<Box marginTop={5}> | ||
<Stack space={3}> | ||
{areas.map((area) => ( | ||
<ActionCard | ||
key={area.id} | ||
heading={formatMessage(area.name)} | ||
backgroundColor="blue" | ||
cta={{ | ||
label: formatMessage(m.downloadButton), | ||
variant: 'text', | ||
icon: 'download', | ||
iconType: 'outline', | ||
onClick: () => { | ||
console.log('download') | ||
}, | ||
}} | ||
/> | ||
))} | ||
</Stack> | ||
</Box> | ||
</Modal> | ||
</Box> | ||
) | ||
} | ||
|
||
export default DownloadReports |
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
11 changes: 11 additions & 0 deletions
11
...e-collection/src/screens-parliamentary/List/paperSignees/identityAndCanSignLookup.graphql
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,11 @@ | ||
query Identity($input: IdentityInput!) { | ||
identity(input: $input) { | ||
nationalId | ||
type | ||
name | ||
} | ||
} | ||
|
||
query CanSign($input: SignatureCollectionCanSignFromPaperInput!) { | ||
signatureCollectionCanSignFromPaper(input: $input) | ||
} |
Oops, something went wrong.