mirror of
https://github.com/Unleash/unleash.git
synced 2025-11-10 01:19:53 +01:00
fix: now showing either payg or consumption (#10803)
1. Make it show either payg or consumption. 2. Add paid tag.
This commit is contained in:
parent
bffec9bc4d
commit
e83d92975c
@ -79,7 +79,6 @@ export const BillingInfo: FC<BillingInfoProps> = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const isPAYG = billing === 'pay-as-you-go';
|
const isPAYG = billing === 'pay-as-you-go';
|
||||||
const plan = `${instanceStatus.plan}${isPAYG ? ' Pay-as-You-Go' : ''}`;
|
|
||||||
const isEnterpriseConsumption = billing === 'enterprise-consumption';
|
const isEnterpriseConsumption = billing === 'enterprise-consumption';
|
||||||
const inactive = instanceStatus.state !== InstanceState.ACTIVE;
|
const inactive = instanceStatus.state !== InstanceState.ACTIVE;
|
||||||
const { isCustomBilling } = instanceStatus;
|
const { isCustomBilling } = instanceStatus;
|
||||||
@ -101,9 +100,9 @@ export const BillingInfo: FC<BillingInfoProps> = () => {
|
|||||||
<StyledRow>
|
<StyledRow>
|
||||||
<StyledItemTitle>Current plan</StyledItemTitle>{' '}
|
<StyledItemTitle>Current plan</StyledItemTitle>{' '}
|
||||||
<StyledItemValue>
|
<StyledItemValue>
|
||||||
{plan}
|
{isPAYG && isEnterpriseConsumption
|
||||||
{isPAYG || isEnterpriseConsumption ? ' Pay-as-You-Go' : ''}
|
? 'Consumption'
|
||||||
{isEnterpriseConsumption ? ' Consumption' : ''}
|
: 'Pay-as-You-Go'}
|
||||||
</StyledItemValue>
|
</StyledItemValue>
|
||||||
</StyledRow>
|
</StyledRow>
|
||||||
<StyledRow>
|
<StyledRow>
|
||||||
|
|||||||
@ -145,6 +145,9 @@ export const BillingInvoice = ({
|
|||||||
{status === 'invoiced' ? (
|
{status === 'invoiced' ? (
|
||||||
<Badge color='success'>Invoiced</Badge>
|
<Badge color='success'>Invoiced</Badge>
|
||||||
) : null}
|
) : null}
|
||||||
|
{status === 'paid' ? (
|
||||||
|
<Badge color='success'>Paid</Badge>
|
||||||
|
) : null}
|
||||||
<Typography variant='body1' sx={{ fontWeight: 700 }}>
|
<Typography variant='body1' sx={{ fontWeight: 700 }}>
|
||||||
{formatCurrency(totalAmount, currency)}
|
{formatCurrency(totalAmount, currency)}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user