File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed
components/interfaces/Organization/BillingSettings Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ const UpcomingInvoice = ({ slug }: UpcomingInvoiceProps) => {
113113 < th className = "py-2 font-medium text-right text-sm text-foreground-light pr-4" >
114114 Usage
115115 </ th >
116- < th className = "py-2 font-medium text-left text-sm text-foreground-light" >
116+ < th className = "py-2 pr-2 font-medium text-left text-sm text-foreground-light max-w-[200px] " >
117117 Unit price
118118 </ th >
119119 < th className = "py-2 font-medium text-right text-sm text-foreground-light" > Cost</ th >
@@ -124,19 +124,22 @@ const UpcomingInvoice = ({ slug }: UpcomingInvoiceProps) => {
124124 < tr key = { item . description } className = "border-b" >
125125 < td className = "py-2 text-sm max-w-[200px]" colSpan = { item . proration ? 3 : 1 } >
126126 { item . description ?? 'Unknown' }
127+ { item . usage_metric &&
128+ billingMetricUnit ( item . usage_metric ) &&
129+ ` (${ billingMetricUnit ( item . usage_metric ) } )` }
127130 </ td >
128131 { ! item . proration && (
129132 < td className = "py-2 text-sm text-right pr-4" >
130133 { item . quantity ?. toLocaleString ( ) }
131134 </ td >
132135 ) }
133136 { ! item . proration && (
134- < td className = "py-2 text-sm" >
137+ < td className = "py-2 pr-2 text-sm max-w-[200px] " >
135138 { item . unit_price === 0
136139 ? 'FREE'
137140 : item . unit_price
138141 ? formatCurrency ( item . unit_price )
139- : null }
142+ : ` ${ item . unit_price_desc } ` }
140143 </ td >
141144 ) }
142145 < td className = "py-2 text-sm text-right" > { formatCurrency ( item . amount ) } </ td >
Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ export const billingMetricUnit = (pricingMetric: PricingMetric) => {
4646 PricingMetric . PITR_7 ,
4747 PricingMetric . PITR_14 ,
4848 PricingMetric . PITR_28 ,
49+ PricingMetric . LOG_DRAIN ,
50+ PricingMetric . AUTH_MFA_PHONE ,
51+ PricingMetric . AUTH_MFA_WEB_AUTHN ,
4952 ] . includes ( pricingMetric )
5053 ) {
5154 return 'Hours'
Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ export enum PricingMetric {
4040 DISK_THROUGHPUT_GP3 = 'DISK_THROUGHPUT_GP3' ,
4141 LOG_DRAIN = 'LOG_DRAIN' ,
4242 LOG_DRAIN_EVENTS = 'LOG_DRAIN_EVENTS' ,
43+ AUTH_MFA_PHONE = 'AUTH_MFA_PHONE' ,
44+ AUTH_MFA_WEB_AUTHN = 'AUTH_MFA_WEB_AUTHN' ,
4345}
4446
4547export enum ComputeUsageMetric {
You can’t perform that action at this time.
0 commit comments