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

feat(signature-collection): Application for Parliamentary Create List #15333

Merged
merged 82 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from 76 commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
2706297
initial commit
Jun 24, 2024
324bcd2
chore: nx format:write update dirty files
andes-it Jun 24, 2024
cb073e1
Merge branch 'main' into signature_collection_parliamentary
albinagu Jun 24, 2024
c0e05c2
Merge branch 'main' into signature_collection_parliamentary
albinagu Jun 24, 2024
0651da5
Merge branch 'main' of https://github.com/island-is/island.is into si…
Jun 25, 2024
fef47ec
merge fix
Jun 25, 2024
6f34ae2
chore: nx format:write update dirty files
andes-it Jun 25, 2024
5462c3d
Merge branch 'main' into signature_collection_parliamentary
albinagu Jun 26, 2024
be9ae38
Merge branch 'main' into signature_collection_parliamentary
albinagu Jun 26, 2024
84ed3db
test
Jun 26, 2024
0cd6cfe
Merge branch 'signature_collection_parliamentary' of https://github.c…
Jun 26, 2024
557fcb5
temp
Jun 26, 2024
a539cf9
temp2
Jun 26, 2024
68845fa
fix(ui-fields): TableRepeaterField with NationalIdWithName component
Jun 26, 2024
4b07af7
Merge branch 'table_repeater_nationaldWithName' of https://github.com…
Jun 26, 2024
58d149e
hehe, revert
Jun 26, 2024
48fa471
tweak
Jun 26, 2024
d4e54d8
Merge branch 'main' into signature_collection_parliamentary
albinagu Jun 26, 2024
ee6bd4a
tweak for item type
Jun 27, 2024
8f28cfd
chore: nx format:write update dirty files
andes-it Jun 27, 2024
2591956
lint
Jun 27, 2024
f25a58b
Merge branch 'signature_collection_parliamentary' of https://github.c…
Jun 27, 2024
4f41dc6
person in table repeater
Jun 27, 2024
289371e
Merge branch 'main' into signature_collection_parliamentary
albinagu Jun 27, 2024
117a810
small refactor moving functions to utils
Jun 28, 2024
59c42ab
Merge branch 'main' into table_repeater_nationaldWithName
albinagu Jun 28, 2024
5036c9a
tweaks
Jun 28, 2024
047c0ac
tweaks
Jun 28, 2024
821598a
Merge branch 'table_repeater_nationaldWithName' of https://github.com…
Jun 28, 2024
ec77f97
Merge branch 'signature_collection_parliamentary' of https://github.c…
Jun 28, 2024
2884668
Merge branch 'table_repeater_nationaldWithName' of https://github.com…
Jun 28, 2024
0842450
cleanup
Jun 28, 2024
2726c2b
temp
Jun 28, 2024
f09e355
Merge branch 'table_repeater_nationaldWithName' of https://github.com…
Jun 28, 2024
db2d932
chore: nx format:write update dirty files
andes-it Jun 28, 2024
6f65e47
rabbit
Jun 28, 2024
c56a2d8
Merge branch 'table_repeater_nationaldWithName' of https://github.com…
Jun 28, 2024
094c3c3
Merge branch 'table_repeater_nationaldWithName' of https://github.com…
Jun 28, 2024
7992341
cleanup2
Jun 28, 2024
d191898
tables
Jun 28, 2024
85e5fae
texts
Jun 28, 2024
f4eb306
fix for undefined
Jun 28, 2024
d6c30ec
Merge branch 'main' into signature_collection_parliamentary
albinagu Jun 28, 2024
a6707c0
Merge branch 'main' into signature_collection_parliamentary
albinagu Jun 28, 2024
fe2f914
t
Jun 28, 2024
3e052b8
Merge branch 'signature_collection_parliamentary' of https://github.c…
Jun 28, 2024
4f3c240
Merge branch 'main' into signature_collection_parliamentary
albinagu Jul 1, 2024
b994f06
review tweaks
Jul 1, 2024
89eb010
chore: nx format:write update dirty files
andes-it Jul 1, 2024
909f760
Merge branch 'table_repeater_nationaldWithName' of https://github.com…
Jul 1, 2024
24b0b47
tweak overview
Jul 1, 2024
e7c704d
refactor
Jul 1, 2024
835b13a
conflict
Jul 1, 2024
6c9d38a
cleanup
Jul 1, 2024
5aa4af9
keep handleCustomMappedValues in utils tho
Jul 1, 2024
a48a904
Merge branch 'table_repeater_nationaldWithName' of https://github.com…
Jul 1, 2024
de34bea
tweak
Jul 1, 2024
03f4871
added comment in utils
Jul 1, 2024
d8e1f99
Merge branch 'main' into table_repeater_nationaldWithName
kodiakhq[bot] Jul 1, 2024
bf5e0dc
Merge branch 'main' into signature_collection_parliamentary
albinagu Jul 2, 2024
bbed321
rabbit review
Jul 2, 2024
8bd43b6
Merge branch 'table_repeater_nationaldWithName' of https://github.com…
Jul 2, 2024
63ababc
Merge branch 'signature_collection_parliamentary' of https://github.c…
Jul 2, 2024
dc91ba0
Merge branch 'table_repeater_nationaldWithName' of https://github.com…
Jul 2, 2024
8a2a806
cleanup
Jul 2, 2024
15e3bbd
Merge branch 'table_repeater_nationaldWithName' of https://github.com…
Jul 2, 2024
cee0e80
Merge branch 'main' into signature_collection_parliamentary
albinagu Jul 2, 2024
da51138
dataschema
Jul 3, 2024
cda9d98
format
Jul 4, 2024
c5524ca
tweaks
Jul 4, 2024
e23129e
tweaks vol 2
Jul 4, 2024
605aa27
Merge branch 'main' into signature_collection_parliamentary
albinagu Jul 4, 2024
fe7b00c
removed any's
Jul 4, 2024
aba6e9e
Merge branch 'signature_collection_parliamentary' of https://github.c…
Jul 4, 2024
b38e82b
linting tweaks
Jul 4, 2024
f29d7f3
adding translationNamespaces
Jul 4, 2024
ee1148b
removed custom component
Jul 4, 2024
052dc3c
chore: nx format:write update dirty files
andes-it Jul 4, 2024
333cca1
renamed template
Jul 4, 2024
a7ada54
merge
Jul 4, 2024
8185a92
review tweaks
Jul 5, 2024
d6a6370
Merge branch 'main' into signature_collection_parliamentary
kodiakhq[bot] Jul 5, 2024
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
4 changes: 4 additions & 0 deletions libs/application/template-loader/src/lib/templateLoaders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ const templates: Record<ApplicationTypes, () => Promise<unknown>> = {
import(
'@island.is/application/templates/signature-collection/presidential-list-signing'
),
[ApplicationTypes.PARLIAMENTARY_LIST_CREATION]: () =>
import(
'@island.is/application/templates/signature-collection/parliamentary-list-creation'
),
[ApplicationTypes.CITIZENSHIP]: () =>
import(
'@island.is/application/templates/directorate-of-immigration/citizenship'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4137,11 +4137,11 @@ const Illustration: React.FC<React.PropsWithChildren<unknown>> = () => (
y2="154.319"
gradientUnits="userSpaceOnUse"
>
<stop stop-color="#FF4C84" />
<stop offset="0.3015" stop-color="#C064AF" />
<stop offset="0.6316" stop-color="#827CDA" />
<stop offset="0.8738" stop-color="#5B8BF5" />
<stop offset="1" stop-color="#4C90FF" />
<stop stopColor="#FF4C84" />
<stop offset="0.3015" stopColor="#C064AF" />
<stop offset="0.6316" stopColor="#827CDA" />
<stop offset="0.8738" stopColor="#5B8BF5" />
<stop offset="1" stopColor="#4C90FF" />
</linearGradient>
<linearGradient
id="paint1_linear_3546_23902"
Expand All @@ -4151,11 +4151,11 @@ const Illustration: React.FC<React.PropsWithChildren<unknown>> = () => (
y2="135.619"
gradientUnits="userSpaceOnUse"
>
<stop stop-color="#FF4C84" />
<stop offset="0.3015" stop-color="#C064AF" />
<stop offset="0.6316" stop-color="#827CDA" />
<stop offset="0.8738" stop-color="#5B8BF5" />
<stop offset="1" stop-color="#4C90FF" />
<stop stopColor="#FF4C84" />
<stop offset="0.3015" stopColor="#C064AF" />
<stop offset="0.6316" stopColor="#827CDA" />
<stop offset="0.8738" stopColor="#5B8BF5" />
<stop offset="1" stopColor="#4C90FF" />
</linearGradient>
<linearGradient
id="paint2_linear_3546_23902"
Expand All @@ -4165,9 +4165,9 @@ const Illustration: React.FC<React.PropsWithChildren<unknown>> = () => (
y2="293.826"
gradientUnits="userSpaceOnUse"
>
<stop stop-color="#FF4C84" />
<stop offset="0.6233" stop-color="#8D78D3" />
<stop offset="1" stop-color="#4C90FF" />
<stop stopColor="#FF4C84" />
<stop offset="0.6233" stopColor="#8D78D3" />
<stop offset="1" stopColor="#4C90FF" />
</linearGradient>
<linearGradient
id="paint3_linear_3546_23902"
Expand All @@ -4177,8 +4177,8 @@ const Illustration: React.FC<React.PropsWithChildren<unknown>> = () => (
y2="141.642"
gradientUnits="userSpaceOnUse"
>
<stop stop-color="#4C90FF" />
<stop offset="1" stop-color="#FF4C84" />
<stop stopColor="#4C90FF" />
<stop offset="1" stopColor="#FF4C84" />
</linearGradient>
</defs>
</svg>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"presets": [
[
"@nx/react/babel",
{
"runtime": "automatic",
"useBuiltIns": "usage"
}
]
],
"plugins": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": ["plugin:@nx/react", "../../../../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# application-templates-parliamentary-list-creation

This library was generated with [Nx](https://nx.dev).

## Running unit tests

Run `nx test application-templates-parliamentary-list-creation` to execute the unit tests via [Jest](https://jestjs.io).
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import React, { FC } from 'react'

export const Logo: FC<React.PropsWithChildren<unknown>> = () => (
<svg
width="80"
height="80"
viewBox="0 0 80 80"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<g clipPath="url(#clip0_8686_17776)">
<g clipPath="url(#clip1_8686_17776)">
<path
d="M37.3702 0.566454L18.3626 9.81752C18.2539 9.87023 18.1623 9.95247 18.0982 10.0548C18.034 10.1572 18 10.2755 18 10.3962V35.9469C18 36.1175 18.0678 36.2812 18.1884 36.4018C18.3091 36.5225 18.4728 36.5903 18.6434 36.5903H37.6511C37.8217 36.5903 37.9854 36.5225 38.106 36.4018C38.2267 36.2812 38.2945 36.1175 38.2945 35.9469V1.14688C38.2943 1.0379 38.2665 0.93074 38.2137 0.835409C38.1608 0.740079 38.0847 0.659682 37.9924 0.601723C37.9002 0.543764 37.7947 0.510131 37.6859 0.503964C37.5771 0.497796 37.4685 0.519295 37.3702 0.566454Z"
fill="#020350"
/>
<path
d="M37.3853 40.088L18.393 48.4965C18.2777 48.5478 18.1797 48.6313 18.1108 48.737C18.042 48.8427 18.0052 48.9661 18.0049 49.0923V79.7663C18.0048 79.8747 18.0317 79.9815 18.0833 80.0768C18.1348 80.1722 18.2094 80.2532 18.3001 80.3125C18.3909 80.3719 18.495 80.4076 18.603 80.4166C18.7111 80.4255 18.8197 80.4073 18.9189 80.3638L37.9113 72.0233C38.0273 71.9724 38.1259 71.8888 38.1951 71.7827C38.2644 71.6765 38.3012 71.5526 38.3011 71.4259V40.6906C38.3021 40.5815 38.2758 40.4739 38.2245 40.3776C38.1732 40.2814 38.0986 40.1995 38.0075 40.1395C37.9164 40.0796 37.8117 40.0435 37.703 40.0345C37.5943 40.0254 37.485 40.0439 37.3853 40.088Z"
fill="#020350"
/>
<path
d="M41.6016 60.1664C41.4278 60.1664 41.2611 60.0973 41.1382 59.9744C41.0153 59.8515 40.9463 59.6849 40.9463 59.5111V37.2455C40.9463 37.1595 40.9632 37.0743 40.9962 36.9947C41.0291 36.9152 41.0774 36.843 41.1382 36.7821C41.1991 36.7213 41.2713 36.673 41.3508 36.6401C41.4303 36.6072 41.5156 36.5902 41.6016 36.5902H60.5871C60.6732 36.5902 60.7584 36.6072 60.8379 36.6401C60.9174 36.673 60.9897 36.7213 61.0505 36.7821C61.1114 36.843 61.1596 36.9152 61.1926 36.9947C61.2255 37.0743 61.2425 37.1595 61.2425 37.2455V40.5255C61.2425 45.7346 59.1732 50.7303 55.4898 54.4137C51.8064 58.0971 46.8107 60.1664 41.6016 60.1664Z"
fill="#020350"
/>
<path
d="M51.0942 12.2496C53.2302 12.2496 55.3183 12.883 57.0944 14.0698C58.8704 15.2565 60.2547 16.9432 61.0721 18.9167C61.8895 20.8901 62.1034 23.0616 61.6867 25.1566C61.27 27.2516 60.2414 29.176 58.7309 30.6864C57.2205 32.1968 55.2962 33.2254 53.2012 33.6421C51.1062 34.0588 48.9347 33.845 46.9612 33.0275C44.9878 32.2101 43.301 30.8258 42.1143 29.0498C40.9276 27.2737 40.2942 25.1857 40.2942 23.0496C40.2942 20.1853 41.432 17.4383 43.4574 15.4129C45.4828 13.3875 48.2299 12.2496 51.0942 12.2496Z"
fill="#020350"
/>
</g>
</g>
<defs>
<clipPath id="clip0_8686_17776">
<rect width="80" height="80" fill="white" />
</clipPath>
<clipPath id="clip1_8686_17776">
<rect
width="44.2553"
height="80"
fill="white"
transform="translate(18 0.5)"
/>
</clipPath>
</defs>
</svg>
)

export default Logo
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* eslint-disable */
export default {
displayName: 'application-templates-parliamentary-list-creation',
preset: './jest.preset.js',
rootDir: '../../../../..',
roots: [__dirname],
transform: {
'^.+\\.[tj]sx?$': ['babel-jest', { presets: ['@nx/react/babel'] }],
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory:
'<rootDir>/coverage/libs/application/templates/signature-collection/parliamentary-list-creation',
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "application-templates-parliamentary-list-creation",
"$schema": "../../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/application/templates/signature-collection/parliamentary-list-creation/src",
"projectType": "library",
"tags": ["scope:application-system", "lib:application-system"],
"targets": {
"lint": {
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": [
"libs/application/templates/signature-collection/parliamentary-list-creation/**/*.{ts,tsx,js,jsx}"
]
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": [
"{workspaceRoot}/coverage/libs/application/templates/signature-collection/parliamentary-list-creation"
],
"options": {
"jestConfig": "libs/application/templates/signature-collection/parliamentary-list-creation/jest.config.ts",
"passWithNoTests": true
}
},
"extract-strings": {
"executor": "nx:run-commands",
"options": {
"command": "yarn ts-node -P libs/localization/tsconfig.lib.json libs/localization/scripts/extract 'libs/application/templates/signature-collection/parliamentary-list-creation/src/**/*.{js,ts,tsx}'"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineTemplateApi } from '@island.is/application/types'

export const OwnerRequirementsApi = defineTemplateApi({
action: 'ownerRequirements',
})

export const CurrentCollectionApi = defineTemplateApi({
action: 'currentCollection',
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { FC } from 'react'
import { ActionCard, Stack } from '@island.is/island-ui/core'
import { FieldBaseProps } from '@island.is/application/types'

export const ListsInOverview: FC<FieldBaseProps> = ({ application }) => {
const { answers } = application

return (
<Stack space={3}>
{(answers.constituency as string[]).map((c: string, index: number) => (
<ActionCard
key={index}
heading={'Flokkur 1 - ' + c}
progressMeter={{
currentProgress: 0,
maxProgress: 350,
withLabel: true,
}}
/>
))}
</Stack>
)
albinagu marked this conversation as resolved.
Show resolved Hide resolved
}

export default ListsInOverview
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { ListsInOverview } from './ListsInOverview'
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import {
buildForm,
buildMultiField,
buildSection,
buildMessageWithLinkButtonField,
buildDescriptionField,
} from '@island.is/application/core'
import { Form, FormModes } from '@island.is/application/types'
import { m } from '../lib/messages'

export const Done: Form = buildForm({
id: 'done',
title: '',
mode: FormModes.COMPLETED,
children: [
/* Sections for the stepper */
buildSection({
id: 'screen1',
title: m.dataCollection,
children: [],
}),
buildSection({
id: 'screen2',
title: m.information,
children: [],
}),
buildSection({
id: 'screen3',
title: m.overview,
children: [],
}),
/* ------------------------ */
buildSection({
id: 'doneScreen',
title: m.listCreated,
children: [
buildMultiField({
id: 'doneScreen',
title: m.listCreated,
description: m.listCreatedDescription,
children: [
buildDescriptionField({
id: 'nextStepsTitle',
title: m.nextSteps,
titleVariant: 'h3',
marginBottom: 1,
}),
//Set up separately for even spacing
buildDescriptionField({
id: 'nextStepsDescription',
title: '',
description: m.nextStepsDescription,
titleVariant: 'h3',
marginBottom: 5,
}),
buildMessageWithLinkButtonField({
id: 'done.goToServicePortal',
title: '',
url: '/minarsidur/min-gogn/listar/medmaelasofnun',
buttonTitle: m.linkFieldButtonTitle,
message: m.linkFieldMessage,
}),
buildDescriptionField({
id: 'space',
title: '',
space: 'containerGutter',
}),
buildDescriptionField({
id: 'space1',
title: '',
space: 'containerGutter',
}),
],
}),
],
}),
],
})
Loading
Loading