11import { Card } from '@/ui/elements/Card' ;
22import { useCardState , withCardStateProvider } from '@/ui/elements/contexts' ;
33import { Header } from '@/ui/elements/Header' ;
4+ import { ProfileCard } from '@/ui/elements/ProfileCard' ;
45import { Tab , TabPanel , TabPanels , Tabs , TabsList } from '@/ui/elements/Tabs' ;
56
67import { Protect } from '../../common' ;
@@ -24,63 +25,67 @@ const OrganizationBillingPageInternal = withCardStateProvider(() => {
2425 const { selectedTab, handleTabChange } = useTabState ( orgTabMap ) ;
2526
2627 return (
27- < Col
28- elementDescriptor = { descriptors . page }
29- sx = { t => ( { gap : t . space . $8 , color : t . colors . $colorForeground } ) }
30- >
28+ < ProfileCard . Page >
3129 < Col
32- elementDescriptor = { descriptors . profilePage }
33- elementId = { descriptors . profilePage . setId ( 'billing' ) }
34- gap = { 4 }
30+ elementDescriptor = { descriptors . page }
31+ sx = { t => ( { gap : t . space . $8 , color : t . colors . $colorForeground } ) }
3532 >
36- < Header . Root >
37- < Header . Title
38- localizationKey = { localizationKeys ( 'organizationProfile.billingPage.title' ) }
39- textVariant = 'h2'
40- />
41- </ Header . Root >
42-
43- < Card . Alert > { card . error } </ Card . Alert >
44-
45- < Tabs
46- value = { selectedTab }
47- onChange = { handleTabChange }
33+ < Col
34+ elementDescriptor = { descriptors . profilePage }
35+ elementId = { descriptors . profilePage . setId ( 'billing' ) }
36+ gap = { 4 }
4837 >
49- < TabsList sx = { t => ( { gap : t . space . $6 } ) } >
50- < Tab
51- localizationKey = { localizationKeys ( 'organizationProfile.billingPage.start.headerTitle__subscriptions' ) }
38+ < Header . Root >
39+ < Header . Title
40+ localizationKey = { localizationKeys ( 'organizationProfile.billingPage.title' ) }
41+ textVariant = 'h2'
5242 />
53- < Tab localizationKey = { localizationKeys ( 'organizationProfile.billingPage.start.headerTitle__statements' ) } />
54- < Tab localizationKey = { localizationKeys ( 'organizationProfile.billingPage.start.headerTitle__payments' ) } />
55- </ TabsList >
56- < TabPanels >
57- < TabPanel sx = { { width : '100%' , flexDirection : 'column' } } >
58- < SubscriptionsList
59- title = { localizationKeys ( 'organizationProfile.billingPage.subscriptionsListSection.title' ) }
60- switchPlansLabel = { localizationKeys (
61- 'organizationProfile.billingPage.subscriptionsListSection.actionLabel__switchPlan' ,
62- ) }
63- newSubscriptionLabel = { localizationKeys (
64- 'organizationProfile.billingPage.subscriptionsListSection.actionLabel__newSubscription' ,
65- ) }
66- manageSubscriptionLabel = { localizationKeys (
67- 'organizationProfile.billingPage.subscriptionsListSection.actionLabel__manageSubscription' ,
68- ) }
43+ </ Header . Root >
44+
45+ < Card . Alert > { card . error } </ Card . Alert >
46+
47+ < Tabs
48+ value = { selectedTab }
49+ onChange = { handleTabChange }
50+ >
51+ < TabsList sx = { t => ( { gap : t . space . $6 } ) } >
52+ < Tab
53+ localizationKey = { localizationKeys ( 'organizationProfile.billingPage.start.headerTitle__subscriptions' ) }
54+ />
55+ < Tab
56+ localizationKey = { localizationKeys ( 'organizationProfile.billingPage.start.headerTitle__statements' ) }
6957 />
70- < Protect condition = { has => has ( { permission : 'org:sys_billing:manage' } ) } >
71- < PaymentMethods />
72- </ Protect >
73- </ TabPanel >
74- < TabPanel sx = { { width : '100%' } } >
75- < StatementsList />
76- </ TabPanel >
77- < TabPanel sx = { { width : '100%' } } >
78- < PaymentAttemptsList />
79- </ TabPanel >
80- </ TabPanels >
81- </ Tabs >
58+ < Tab localizationKey = { localizationKeys ( 'organizationProfile.billingPage.start.headerTitle__payments' ) } />
59+ </ TabsList >
60+ < TabPanels >
61+ < TabPanel sx = { { width : '100%' , flexDirection : 'column' } } >
62+ < SubscriptionsList
63+ title = { localizationKeys ( 'organizationProfile.billingPage.subscriptionsListSection.title' ) }
64+ switchPlansLabel = { localizationKeys (
65+ 'organizationProfile.billingPage.subscriptionsListSection.actionLabel__switchPlan' ,
66+ ) }
67+ newSubscriptionLabel = { localizationKeys (
68+ 'organizationProfile.billingPage.subscriptionsListSection.actionLabel__newSubscription' ,
69+ ) }
70+ manageSubscriptionLabel = { localizationKeys (
71+ 'organizationProfile.billingPage.subscriptionsListSection.actionLabel__manageSubscription' ,
72+ ) }
73+ />
74+ < Protect condition = { has => has ( { permission : 'org:sys_billing:manage' } ) } >
75+ < PaymentMethods />
76+ </ Protect >
77+ </ TabPanel >
78+ < TabPanel sx = { { width : '100%' } } >
79+ < StatementsList />
80+ </ TabPanel >
81+ < TabPanel sx = { { width : '100%' } } >
82+ < PaymentAttemptsList />
83+ </ TabPanel >
84+ </ TabPanels >
85+ </ Tabs >
86+ </ Col >
8287 </ Col >
83- </ Col >
88+ </ ProfileCard . Page >
8489 ) ;
8590} ) ;
8691
0 commit comments