From 271e5d2354358e14dfcf8a3610830f805b419145 Mon Sep 17 00:00:00 2001 From: helgifr Date: Mon, 16 Dec 2024 13:44:03 +0000 Subject: [PATCH 1/3] feat(new-primary-school): Add mock users for testing application hotfix (#17220) * feat(new-primary-school): Add mock users for testing application * remove console log * Removed mock user file --------- Co-authored-by: hfhelgason Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- .../new-primary-school.service.ts | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/libs/application/template-api-modules/src/lib/modules/templates/new-primary-school/new-primary-school.service.ts b/libs/application/template-api-modules/src/lib/modules/templates/new-primary-school/new-primary-school.service.ts index 80ce338d5cd2..15b415938eec 100644 --- a/libs/application/template-api-modules/src/lib/modules/templates/new-primary-school/new-primary-school.service.ts +++ b/libs/application/template-api-modules/src/lib/modules/templates/new-primary-school/new-primary-school.service.ts @@ -13,6 +13,7 @@ import { TemplateApiModuleActionProps } from '../../../types' import { BaseTemplateApiService } from '../../base-template-api.service' import { transformApplicationToNewPrimarySchoolDTO } from './new-primary-school.utils' import { isRunningOnEnvironment } from '@island.is/shared/utils' +import { isRunningInProduction } from '../parental-leave/constants' @Injectable() export class NewPrimarySchoolService extends BaseTemplateApiService { @@ -38,6 +39,66 @@ export class NewPrimarySchoolService extends BaseTemplateApiService { } async getChildren({ auth }: TemplateApiModuleActionProps) { + if (!isRunningInProduction) { + if (auth.nationalId === '0101303019') { + return [ + { + nationalId: '1111111119', + fullName: 'Stubbur Maack', + genderCode: '3', + livesWithApplicant: true, + livesWithBothParents: true, + }, + ] + } + if (auth.nationalId === '0101302989') { + return [ + { + nationalId: '2222222229', + fullName: 'Stúfur Maack ', + genderCode: '3', + livesWithApplicant: true, + livesWithBothParents: true, + otherParent: { + nationalId: '0101302399', + fullName: 'Gervimaður Færeyjar', + address: { + streetName: 'Hvassaleiti 5', + postalCode: '103', + city: 'Reykjavík', + municipalityCode: '0000', + }, + genderCode: '2', + }, + }, + { + nationalId: '5555555559', + fullName: 'Bína Maack ', + genderCode: '4', + livesWithApplicant: true, + livesWithBothParents: true, + }, + { + nationalId: '6666666669', + fullName: 'Snúður Maack', + genderCode: '3', + livesWithApplicant: true, + livesWithBothParents: true, + }, + ] + } + if (auth.nationalId === '0101304929') { + return [ + { + nationalId: '6666666669', + fullName: 'Snúður Maack', + genderCode: '3', + livesWithApplicant: true, + livesWithBothParents: true, + }, + ] + } + } const children = await this.nationalRegistryService.getChildrenCustodyInformation(auth) From 0c7df8f3604c0a08e9329b881e1ba2a4618baf7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BAnar=20Vestmann?= <43557895+RunarVestmann@users.noreply.github.com> Date: Mon, 16 Dec 2024 14:23:51 +0000 Subject: [PATCH 2/3] feat(web): Pension Calculator - Display icon to left of title for 2025 preview (#17251) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- .../PensionCalculator.css.ts | 4 ++ .../PensionCalculator.tsx | 33 ++++++-------- .../PensionCalculatorResults.tsx | 33 ++++++-------- .../PensionCalculatorTitle.tsx | 45 +++++++++++++++++++ .../translationStrings.ts | 7 +++ 5 files changed, 82 insertions(+), 40 deletions(-) create mode 100644 apps/web/screens/Organization/SocialInsuranceAdministration/PensionCalculatorTitle.tsx diff --git a/apps/web/screens/Organization/SocialInsuranceAdministration/PensionCalculator.css.ts b/apps/web/screens/Organization/SocialInsuranceAdministration/PensionCalculator.css.ts index 66a268028923..8550d211f92b 100644 --- a/apps/web/screens/Organization/SocialInsuranceAdministration/PensionCalculator.css.ts +++ b/apps/web/screens/Organization/SocialInsuranceAdministration/PensionCalculator.css.ts @@ -46,3 +46,7 @@ export const yearSelectContainer = style({ md: { width: '204px' }, }), }) + +export const noWrap = style({ + flexWrap: 'nowrap', +}) diff --git a/apps/web/screens/Organization/SocialInsuranceAdministration/PensionCalculator.tsx b/apps/web/screens/Organization/SocialInsuranceAdministration/PensionCalculator.tsx index 143a47f3b0de..2dfab0c78d4e 100644 --- a/apps/web/screens/Organization/SocialInsuranceAdministration/PensionCalculator.tsx +++ b/apps/web/screens/Organization/SocialInsuranceAdministration/PensionCalculator.tsx @@ -50,6 +50,7 @@ import { GET_ORGANIZATION_PAGE_QUERY, GET_ORGANIZATION_QUERY, } from '../../queries' +import { PensionCalculatorTitle } from './PensionCalculatorTitle' import { PensionCalculatorWrapper } from './PensionCalculatorWrapper' import { translationStrings } from './translationStrings' import { @@ -554,16 +555,12 @@ const PensionCalculator: CustomScreen = ({ > - {isNewSystemActive && ( - - {title}
{titlePostfix}
-
- )} - {!isNewSystemActive && ( - - {title} {titlePostfix} - - )} + {formatMessage(translationStrings.isTurnedOff)}
@@ -584,16 +581,12 @@ const PensionCalculator: CustomScreen = ({ - {isNewSystemActive && ( - - {title}
{titlePostfix}
-
- )} - {!isNewSystemActive && ( - - {title} {titlePostfix} - - )} +
= ({ > - {isNewSystemActive && ( - - {title}
{titlePostfix}
-
- )} - {!isNewSystemActive && ( - - {title} {titlePostfix} - - )} + {formatMessage(translationStrings.isTurnedOff)} @@ -391,16 +388,12 @@ const PensionCalculatorResults: CustomScreen = ({ - {isNewSystemActive && ( - - {title}
{titlePostfix}
-
- )} - {!isNewSystemActive && ( - - {title} {titlePostfix} - - )} + {formatMessage( diff --git a/apps/web/screens/Organization/SocialInsuranceAdministration/PensionCalculatorTitle.tsx b/apps/web/screens/Organization/SocialInsuranceAdministration/PensionCalculatorTitle.tsx new file mode 100644 index 000000000000..4a61eb3b61fb --- /dev/null +++ b/apps/web/screens/Organization/SocialInsuranceAdministration/PensionCalculatorTitle.tsx @@ -0,0 +1,45 @@ +import { useIntl } from 'react-intl' + +import { GridColumn, GridRow, Text } from '@island.is/island-ui/core' + +import { translationStrings } from './translationStrings' +import * as styles from './PensionCalculator.css' + +interface PensionCalculatorTitleProps { + isNewSystemActive: boolean + title: string + titlePostfix: string + titleVariant: 'h1' | 'h2' +} + +export const PensionCalculatorTitle = ({ + isNewSystemActive, + title, + titlePostfix, + titleVariant, +}: PensionCalculatorTitleProps) => { + const { formatMessage } = useIntl() + if (isNewSystemActive) + return ( + + + + + + + {title}
{titlePostfix}
+
+
+
+ ) + return ( + + {title} {titlePostfix} + + ) +} diff --git a/apps/web/screens/Organization/SocialInsuranceAdministration/translationStrings.ts b/apps/web/screens/Organization/SocialInsuranceAdministration/translationStrings.ts index 8a273868f14b..89f5b13b9202 100644 --- a/apps/web/screens/Organization/SocialInsuranceAdministration/translationStrings.ts +++ b/apps/web/screens/Organization/SocialInsuranceAdministration/translationStrings.ts @@ -625,6 +625,13 @@ export const translationStrings = defineMessages({ defaultMessage: 'Eftir 1. september 2025', description: 'Eftir 1. september 2025', }, + after1stSeptember2025IconUrl: { + id: 'web.pensionCalculator:after1stSeptember2025IconUrl', + defaultMessage: + 'https://images.ctfassets.net/8k0h54kbe6bj/5RIwKVet87Nm4ycltkzjnX/9c594855a9b2f90dde63766ee87a09ca/58dd40fbf365769d984be22a9b64bc29.png', + description: + 'Mynd vinstra megin við titil "Reiknivél örorku- og endurhæfingargreiðslna eftir 1. september 2025"', + }, after1stSeptember2025Calculate: { id: 'web.pensionCalculator:after1stSeptember2025Calculate', defaultMessage: 'Reikna', From 65767dcb54a01134fb1c6d12c40268fb28d81eed Mon Sep 17 00:00:00 2001 From: Ylfa <55542991+ylfahfa@users.noreply.github.com> Date: Mon, 16 Dec 2024 14:35:22 +0000 Subject: [PATCH 3/3] feat(income-plan): Remove edit function after submission (#17246) * remove edit function after submission * format * remove unit test --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- .../income-plan/src/fields/Review/index.tsx | 15 --------------- .../src/lib/IncomePlanTemplate.spec.ts | 17 ----------------- .../income-plan/src/lib/IncomePlanTemplate.ts | 8 -------- .../income-plan/src/lib/messages.ts | 11 ++--------- 4 files changed, 2 insertions(+), 49 deletions(-) diff --git a/libs/application/templates/social-insurance-administration/income-plan/src/fields/Review/index.tsx b/libs/application/templates/social-insurance-administration/income-plan/src/fields/Review/index.tsx index 9a420ccf1e56..4dbb1ffe6f0c 100644 --- a/libs/application/templates/social-insurance-administration/income-plan/src/fields/Review/index.tsx +++ b/libs/application/templates/social-insurance-administration/income-plan/src/fields/Review/index.tsx @@ -126,21 +126,6 @@ export const Review: FC = ({
- {state === `${States.TRYGGINGASTOFNUN_SUBMITTED}` && ( - - )}