Skip to content

Commit

Permalink
fix: enrollements count (#534)
Browse files Browse the repository at this point in the history
  • Loading branch information
melniiv committed Feb 29, 2024
1 parent 2aea1e2 commit 8f51b96
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/common/translation/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
}
},
"message": {
"eventVisitsThisYear": "You have attended events this year"
"eventVisitsThisYear": "Events you have registered this year"
}
},
"combobox": {
Expand Down
2 changes: 1 addition & 1 deletion src/common/translation/i18n/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
}
},
"message": {
"eventVisitsThisYear": "Tapahtumakäynnit tänä vuonna"
"eventVisitsThisYear": "Ilmoittautumisesi tapahtumiin tänä vuonna"
}
},
"combobox": {
Expand Down
2 changes: 1 addition & 1 deletion src/common/translation/i18n/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
}
},
"message": {
"eventVisitsThisYear": "Dina evenemangsbesök i år"
"eventVisitsThisYear": "Dina anmälningar till årets evenemang"
}
},
"combobox": {
Expand Down
8 changes: 4 additions & 4 deletions src/domain/child/ChildEnrolmentCount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ export default function ChildEnrolmentCount({ childId }: Props) {
const { t } = useTranslation();
const {
data,
convenience: { areAllEnrolmentsUsed },
convenience: { areAllCurrentEnrolmentsUsed },
} = useChildEnrolmentCount({
variables: {
childId,
},
});

const enrolmentsUsed = data?.child?.pastEnrolmentCount ?? ' ';
const enrolmentsUsed = data?.child?.enrolmentCount ?? ' ';
const loadingSpinner = (
<LoadingSpinner
theme={{
Expand All @@ -31,8 +31,8 @@ export default function ChildEnrolmentCount({ childId }: Props) {

return (
<KukkuuPill
variant={areAllEnrolmentsUsed ? 'success' : 'default'}
iconLeft={areAllEnrolmentsUsed && <IconCheck />}
variant={areAllCurrentEnrolmentsUsed ? 'success' : 'default'}
iconLeft={areAllCurrentEnrolmentsUsed && <IconCheck />}
name={
<>
{t('child.message.eventVisitsThisYear')}:{' '}
Expand Down

0 comments on commit 8f51b96

Please sign in to comment.