File tree Expand file tree Collapse file tree 3 files changed +56
-0
lines changed
packages/cloud/views/billing/OrganizationBillingPage Expand file tree Collapse file tree 3 files changed +56
-0
lines changed Original file line number Diff line number Diff line change 1024
1024
"settings.organization.members.title" : " Organization members" ,
1025
1025
"settings.organization.billing.notSetUp" : " Billing has not yet been set up for this organization. Start by adding a payment method." ,
1026
1026
"settings.organization.billing.title" : " Billing" ,
1027
+ "settings.organization.billing.manualPaymentStatus" : " Reach out to <lnk>Sales</lnk> if you have any questions about your plan." ,
1027
1028
"settings.organization.billing.billingInformation" : " Billing information" ,
1028
1029
"settings.organization.billing.billingInformationError" : " Error loading billing information" ,
1029
1030
"settings.organization.billing.update" : " Update" ,
Original file line number Diff line number Diff line change
1
+ import React from "react" ;
2
+ import { useIntl } from "react-intl" ;
3
+
4
+ import { Link } from "components/ui/Link" ;
5
+ import { Message } from "components/ui/Message" ;
6
+
7
+ import { useCurrentOrganizationInfo } from "core/api" ;
8
+ import { links } from "core/utils/links" ;
9
+ import { useExperiment } from "hooks/services/Experiment" ;
10
+
11
+ export const BillingBanners : React . FC = ( ) => {
12
+ const { formatMessage } = useIntl ( ) ;
13
+ const { billing } = useCurrentOrganizationInfo ( ) ;
14
+ const isAutoRechargeEnabled = useExperiment ( "billing.autoRecharge" , false ) ;
15
+
16
+ return (
17
+ < >
18
+ { billing ?. paymentStatus === "manual" && (
19
+ < Message
20
+ type = "info"
21
+ text = { formatMessage (
22
+ { id : "settings.organization.billing.manualPaymentStatus" } ,
23
+ {
24
+ lnk : ( node : React . ReactNode ) => (
25
+ < Link opensInNewTab to = { links . contactSales } variant = "primary" >
26
+ { node }
27
+ </ Link >
28
+ ) ,
29
+ }
30
+ ) }
31
+ />
32
+ ) }
33
+ { isAutoRechargeEnabled && (
34
+ < Message
35
+ data-testid = "autoRechargeEnabledBanner"
36
+ text = { formatMessage (
37
+ {
38
+ id : "credits.autoRechargeEnabled" ,
39
+ } ,
40
+ {
41
+ contact : ( node : React . ReactNode ) => (
42
+ < Link opensInNewTab to = "mailto:[email protected] " variant = "primary" >
43
+ { node }
44
+ </ Link >
45
+ ) ,
46
+ }
47
+ ) }
48
+ />
49
+ ) }
50
+ </ >
51
+ ) ;
52
+ } ;
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import { Heading } from "components/ui/Heading";
10
10
11
11
import { useCurrentOrganizationInfo } from "core/api" ;
12
12
13
+ import { BillingBanners } from "./BillingBanners" ;
13
14
import { BillingInformation } from "./BillingInformation" ;
14
15
import { Invoices } from "./Invoices" ;
15
16
import { PaymentMethod } from "./PaymentMethod" ;
@@ -28,6 +29,8 @@ export const OrganizationBillingPage: React.FC = () => {
28
29
< FormattedMessage id = "settings.organization.billing.title" />
29
30
</ Heading >
30
31
32
+ < BillingBanners />
33
+
31
34
< BorderedTiles >
32
35
< BorderedTile >
33
36
< BillingInformation />
You can’t perform that action at this time.
0 commit comments