Skip to content

Commit

Permalink
refactor: fix the subscription table label value on LPR (#1002)
Browse files Browse the repository at this point in the history
  • Loading branch information
zamanafzal authored Jul 10, 2023
1 parent 8edb622 commit f0ea4b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/Admin/licenses/LicenseAllocationHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const LicenseAllocationHeader = () => {
// don't show alert if the enterprise already has subsidy requests enabled
const isBrowseAndRequestFeatureAlertShown = subsidyRequestConfiguration?.subsidyType
=== SUPPORTED_SUBSIDY_TYPES.license && !subsidyRequestConfiguration?.subsidyRequestsEnabled;
const activatedAndAssigned = (subscription.licenses?.activated ?? 0) + (subscription.licenses?.assigned ?? 0);
return (
<>
{isBrowseAndRequestFeatureAlertShown && <NewFeatureAlertBrowseAndRequest />}
Expand All @@ -25,7 +26,7 @@ const LicenseAllocationHeader = () => {
</Badge>
<Badge variant="light">Activated: {subscription.licenses?.activated}
{' of '}
{subscription.licenses?.assigned} assigned
{activatedAndAssigned} assigned
</Badge>
</div>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ exports[`LicenseAllocationHeader renders without crashing 1`] = `
Activated:
1
of
1
2
assigned
</span>
</div>
Expand Down

0 comments on commit f0ea4b0

Please sign in to comment.