Skip to content

Commit

Permalink
feat(social-insurance): UI changes (#16942)
Browse files Browse the repository at this point in the history
* feat: ini

* fix: switch link

* chore: remove mocks

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and jonnigs committed Nov 26, 2024
1 parent 8db736f commit 8ccbed8
Showing 1 changed file with 17 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
CardLoader,
FootNote,
IntroHeader,
IntroWrapper,
LinkButton,
m as coreMessages,
formatDate,
Expand Down Expand Up @@ -75,16 +76,14 @@ const IncomePlan = () => {
const { data, loading, error } = useGetIncomePlanQuery()

return (
<Box>
<IntroHeader
title={formatMessage(coreMessages.incomePlan)}
intro={formatMessage(coreMessages.incomePlanDescription)}
serviceProviderSlug={'tryggingastofnun'}
serviceProviderTooltip={formatMessage(
coreMessages.socialInsuranceTooltip,
)}
/>

<IntroWrapper
title={formatMessage(coreMessages.incomePlan)}
intro={formatMessage(coreMessages.incomePlanDescription)}
serviceProviderSlug={'tryggingastofnun'}
serviceProviderTooltip={formatMessage(
coreMessages.socialInsuranceTooltip,
)}
>
{error && !loading ? (
<Problem error={error} noBorder={false} />
) : loading ? (
Expand Down Expand Up @@ -146,17 +145,15 @@ const IncomePlan = () => {
heading={formatMessage(coreMessages.incomePlan)}
cta={{
label: formatMessage(m.viewIncomePlan),
url: SocialInsuranceMaintenancePaths.SocialInsuranceMaintenanceIncomePlanDetail,
url:
data.socialInsuranceIncomePlan.status ===
SocialInsuranceIncomePlanStatus.IN_PROGRESS
? `${document.location.origin}/${formatMessage(
m.incomePlanModifyLink,
)}`
: SocialInsuranceMaintenancePaths.SocialInsuranceMaintenanceIncomePlanDetail,
variant: 'text',
}}
tag={
data?.socialInsuranceIncomePlan?.status
? parseTag(
data.socialInsuranceIncomePlan?.status,
formatMessage,
)
: undefined
}
/>
) : (
<ActionCard
Expand All @@ -183,8 +180,7 @@ const IncomePlan = () => {
)}
</Stack>
)}
<FootNote serviceProviderSlug="tryggingastofnun" />
</Box>
</IntroWrapper>
)
}

Expand Down

0 comments on commit 8ccbed8

Please sign in to comment.