1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-09 00:18:00 +01:00

chore: adapt billing page to custom billing scenarios

This commit is contained in:
Nuno Góis 2024-11-26 14:20:59 +00:00
parent 14403d7836
commit 13fbcec5b3
No known key found for this signature in database
GPG Key ID: 71ECC689F1091765
2 changed files with 26 additions and 11 deletions

View File

@ -46,16 +46,27 @@ export const BillingInformation = () => {
const plan = `${instanceStatus.plan}${isPAYG ? ' Pay-as-You-Go' : ''}`; const plan = `${instanceStatus.plan}${isPAYG ? ' Pay-as-You-Go' : ''}`;
const inactive = instanceStatus.state !== InstanceState.ACTIVE; const inactive = instanceStatus.state !== InstanceState.ACTIVE;
const { isCustomBilling } = instanceStatus;
return ( return (
<Grid item xs={12} md={5}> <Grid item xs={12} md={5}>
<StyledInfoBox> <StyledInfoBox>
<StyledTitle variant='body1'>Billing information</StyledTitle> <StyledTitle variant='body1'>Billing information</StyledTitle>
<ConditionallyRender
condition={Boolean(isCustomBilling)}
show={
<StyledInfoLabel>
Your billing is managed by Unleash
</StyledInfoLabel>
}
elseShow={
<>
<ConditionallyRender <ConditionallyRender
condition={inactive} condition={inactive}
show={ show={
<StyledAlert severity='warning'> <StyledAlert severity='warning'>
In order to <strong>Upgrade trial</strong> you need In order to{' '}
<strong>Upgrade trial</strong> you need
to provide us your billing information. to provide us your billing information.
</StyledAlert> </StyledAlert>
} }
@ -66,6 +77,9 @@ export const BillingInformation = () => {
? 'Once we have received your billing information we will upgrade your trial within 1 business day' ? 'Once we have received your billing information we will upgrade your trial within 1 business day'
: 'Update your credit card and business information and change which email address we send invoices to'} : 'Update your credit card and business information and change which email address we send invoices to'}
</StyledInfoLabel> </StyledInfoLabel>
</>
}
/>
<StyledDivider /> <StyledDivider />
<StyledInfoLabel> <StyledInfoLabel>
<a <a

View File

@ -7,6 +7,7 @@ export interface IInstanceStatus {
state?: InstanceState; state?: InstanceState;
seats?: number; seats?: number;
minSeats?: number; minSeats?: number;
isCustomBilling?: boolean;
} }
export enum InstanceState { export enum InstanceState {