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 plan = `${instanceStatus.plan}${isPAYG ? ' Pay-as-You-Go' : ''}`;
|
||||
const isEnterpriseConsumption = billing === 'enterprise-consumption';
|
||||
const inactive = instanceStatus.state !== InstanceState.ACTIVE;
|
||||
const { isCustomBilling } = instanceStatus;
|
||||
@ -101,9 +100,9 @@ export const BillingInfo: FC<BillingInfoProps> = () => {
|
||||
<StyledRow>
|
||||
<StyledItemTitle>Current plan</StyledItemTitle>{' '}
|
||||
<StyledItemValue>
|
||||
{plan}
|
||||
{isPAYG || isEnterpriseConsumption ? ' Pay-as-You-Go' : ''}
|
||||
{isEnterpriseConsumption ? ' Consumption' : ''}
|
||||
{isPAYG && isEnterpriseConsumption
|
||||
? 'Consumption'
|
||||
: 'Pay-as-You-Go'}
|
||||
</StyledItemValue>
|
||||
</StyledRow>
|
||||
<StyledRow>
|
||||
|
||||
@ -145,6 +145,9 @@ export const BillingInvoice = ({
|
||||
{status === 'invoiced' ? (
|
||||
<Badge color='success'>Invoiced</Badge>
|
||||
) : null}
|
||||
{status === 'paid' ? (
|
||||
<Badge color='success'>Paid</Badge>
|
||||
) : null}
|
||||
<Typography variant='body1' sx={{ fontWeight: 700 }}>
|
||||
{formatCurrency(totalAmount, currency)}
|
||||
</Typography>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user