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(social-insurance): UI changes #16942

Merged
merged 8 commits into from
Nov 24, 2024
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,
thorkellmani marked this conversation as resolved.
Show resolved Hide resolved
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