Skip to content

Commit

Permalink
feat(web): WHODAS calculator - Remove total score in breakdown and up…
Browse files Browse the repository at this point in the history
…date texts (#17163)

* Remove total score in breakdown and update texts

* Remove unused translation string

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
RunarVestmann and kodiakhq[bot] authored Dec 6, 2024
1 parent 429a55f commit 8d1ad41
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 19 deletions.
6 changes: 0 additions & 6 deletions apps/web/components/connected/WHODAS/Calculator.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ export const breakdownRowContainer = style({
gap: theme.spacing[5],
})

export const totalScoreRowContainer = style({
display: 'grid',
gridTemplateColumns: `${leftWidth + 24}px 1fr`,
gap: theme.spacing[5],
})

export const stayOnSinglePageWhenPrinting = style({
pageBreakInside: 'avoid',
})
10 changes: 5 additions & 5 deletions apps/web/components/connected/WHODAS/Calculator.strings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ export const m = {
'Takk fyrir að svara spurningalistanum, Mat á færni þinni. Mat þitt á færni er stuðningur við að meta þörf þína fyrir heimaþjónustu. Ef þú hefur ekki svarað öllum spurningum getur það haft áhrif á niðurstöðuna.',
description: 'Texti fyrir ofan niðurstöðuskjá',
},
totalScore: {
id: 'web.whodas.calculator:results.totalScore',
defaultMessage: 'Stig samtals',
description: 'Stig samtals',
},
resultDisclaimer: {
id: 'web.whodas.calculator:results.resultDisclaimer',
defaultMessage:
Expand Down Expand Up @@ -124,5 +119,10 @@ export const m = {
defaultMessage: 'Sundurliðun á niðurstöðum',
description: 'Sundurliðun á niðurstöðum',
},
outOf100: {
id: 'web.whodas.calculator:results.outOf100',
defaultMessage: 'af 100',
description: 'af 100',
},
}),
}
15 changes: 7 additions & 8 deletions apps/web/components/connected/WHODAS/Calculator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ const WHODASResults = ({
{formatMessage(m.results.scoreHeading)}
</Text>
<Box background="purple100" padding="p2" borderRadius="large">
<Text>{formatScore(totalScore)}</Text>
<Text>
{formatScore(totalScore)} {formatMessage(m.results.outOf100)}
</Text>
</Box>
</Stack>
<Stack space={1}>
Expand Down Expand Up @@ -203,17 +205,14 @@ const WHODASResults = ({
<Bullet key={step.title}>
<Box className={styles.breakdownRowContainer}>
<Text>{step.title}</Text>
<Text>{formatScore(step.scoreForStep)}</Text>
<Text>
{formatScore(step.scoreForStep)}{' '}
{formatMessage(m.results.outOf100)}
</Text>
</Box>
</Bullet>
))}
</BulletList>
<Box className={styles.totalScoreRowContainer}>
<Text fontWeight="semiBold">
{formatMessage(m.results.totalScore)}
</Text>
<Text fontWeight="semiBold">{formatScore(totalScore)}</Text>
</Box>
</Stack>
</Stack>
<Box
Expand Down

0 comments on commit 8d1ad41

Please sign in to comment.