From 554599be4cb80d19e7e1411559e344a5867f72e4 Mon Sep 17 00:00:00 2001 From: unakb Date: Mon, 16 Dec 2024 15:57:02 +0000 Subject: [PATCH 1/2] fix(j-s): Remove body from GET request (#17260) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- .../digital-mailbox-api/src/app/modules/cases/case.service.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/judicial-system/digital-mailbox-api/src/app/modules/cases/case.service.ts b/apps/judicial-system/digital-mailbox-api/src/app/modules/cases/case.service.ts index 6f4274fcbe56..0fc03e1d0632 100644 --- a/apps/judicial-system/digital-mailbox-api/src/app/modules/cases/case.service.ts +++ b/apps/judicial-system/digital-mailbox-api/src/app/modules/cases/case.service.ts @@ -173,7 +173,6 @@ export class CaseService { 'Content-Type': 'application/json', authorization: `Bearer ${this.config.secretToken}`, }, - body: JSON.stringify({ nationalId }), }, ) From c4bc9c48fcb49eaa81ef3ff77010634524b55580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9Eorkell=20M=C3=A1ni=20=C3=9Eorkelsson?= Date: Mon, 16 Dec 2024 16:22:37 +0000 Subject: [PATCH 2/2] fix(social-insurance-maintenance): add warning (#17205) * fix: add warning * feat: conditiona lredner on payment plan * chore: revert inoem plan detail * fix: revert income plan --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- .../src/lib/messages.ts | 6 +- .../IncomePlanDetail/IncomePlanDetail.tsx | 50 +---- .../src/screens/PaymentPlan/PaymentPlan.tsx | 182 +++++++++++------- 3 files changed, 121 insertions(+), 117 deletions(-) diff --git a/libs/portals/my-pages/social-insurance-maintenance/src/lib/messages.ts b/libs/portals/my-pages/social-insurance-maintenance/src/lib/messages.ts index f90f69b54bab..233106923711 100644 --- a/libs/portals/my-pages/social-insurance-maintenance/src/lib/messages.ts +++ b/libs/portals/my-pages/social-insurance-maintenance/src/lib/messages.ts @@ -122,9 +122,9 @@ export const m = defineMessages({ id: 'sp.social-insurance-maintenance:income-plan-link-text', defaultMessage: 'Hvað er tekjuáætlun?', }, - incomePlanTemporarilyUnavailable: { - id: 'sp.social-insurance-maintenance:income-plan-temporarily-unavailable', + paymentPlanTemporarilyUnavailable: { + id: 'sp.social-insurance-maintenance:payment-plan-temporarily-unavailable', defaultMessage: - 'Bráðabirgðatekjuáætlun 2025 verður tilbúin seinni part desember', + 'Bráðabirgðagreiðsluáætlun 2025 verður tilbúin seinni part desember', }, }) diff --git a/libs/portals/my-pages/social-insurance-maintenance/src/screens/IncomePlanDetail/IncomePlanDetail.tsx b/libs/portals/my-pages/social-insurance-maintenance/src/screens/IncomePlanDetail/IncomePlanDetail.tsx index 51878ab260c9..5adb2a673a20 100644 --- a/libs/portals/my-pages/social-insurance-maintenance/src/screens/IncomePlanDetail/IncomePlanDetail.tsx +++ b/libs/portals/my-pages/social-insurance-maintenance/src/screens/IncomePlanDetail/IncomePlanDetail.tsx @@ -15,60 +15,14 @@ import { m as coreMessages, } from '@island.is/portals/my-pages/core' import { m } from '../../lib/messages' -import { - useGetIncomePlanDetailLazyQuery, - useGetIncomePlanDetailQuery, -} from './IncomePlanDetail.generated' +import { useGetIncomePlanDetailQuery } from './IncomePlanDetail.generated' import { Problem } from '@island.is/react-spa/shared' -import { useEffect, useState } from 'react' -import { useFeatureFlagClient } from '@island.is/react/feature-flags' const IncomePlanDetail = () => { useNamespaces('sp.social-insurance-maintenance') const { formatMessage } = useLocale() - const [displayPaymentPlan, setDisplayPaymentPlan] = useState(false) - const [query, { data, loading, error }] = useGetIncomePlanDetailLazyQuery() - - const featureFlagClient = useFeatureFlagClient() - useEffect(() => { - const isFlagEnabled = async () => { - const ffEnabled = await featureFlagClient.getValue( - `isServicePortalPaymentPlan2025Enabled`, - false, - ) - if (ffEnabled) { - setDisplayPaymentPlan(ffEnabled as boolean) - } - } - isFlagEnabled() - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []) - - useEffect(() => { - if (displayPaymentPlan) { - query() - } - }, [displayPaymentPlan]) - - if (!displayPaymentPlan) { - return ( - - - - ) - } - + const { data, loading, error } = useGetIncomePlanDetailQuery() return ( { useNamespaces('sp.social-insurance-maintenance') const { formatMessage } = useLocale() - const { data, loading, error } = useGetPreviousPaymentsQuery() + const [displayPaymentPlan, setDisplayPaymentPlan] = useState(false) + const [query, { data, loading, error }] = useGetPreviousPaymentsLazyQuery() + + const featureFlagClient = useFeatureFlagClient() + + useEffect(() => { + const isFlagEnabled = async () => { + const ffEnabled = await featureFlagClient.getValue( + `isServicePortalPaymentPlan2025Enabled`, + false, + ) + if (ffEnabled) { + setDisplayPaymentPlan(ffEnabled as boolean) + } + } + isFlagEnabled() + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []) + + useEffect(() => { + if (displayPaymentPlan) { + query() + } + }, [displayPaymentPlan]) + + if (!displayPaymentPlan) { + return ( + + + + ) + } return ( - { serviceProviderTooltip={formatMessage( coreMessages.socialInsuranceTooltip, )} - /> - {error && !loading ? ( - - ) : !error && !loading && !data?.socialInsurancePayments ? ( - - ) : ( - <> - - - - - - - + > + {error && !loading ? ( + + ) : !error && !loading && !data?.socialInsurancePayments ? ( + + ) : ( + <> + + + + + + + - - {formatMessage(coreMessages.period)} - + + {formatMessage(coreMessages.period)} + - - - - - {formatMessage(m.maintenanceFooter)} - {formatMessage(m.maintenanceFooterLink, { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - link: (str: any) => ( - - ), - })} - - - - )} - + + + + + {formatMessage(m.maintenanceFooter)} + {formatMessage(m.maintenanceFooterLink, { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + link: (str: any) => ( + + ), + })} + + + + )} + ) }