|
|
@@ -1,5 +1,4 @@
|
|
|
import { useCallback } from 'react'
|
|
|
-import { Grid, Row } from 'react-bootstrap'
|
|
|
import moment from 'moment'
|
|
|
import { useTranslation, Trans } from 'react-i18next'
|
|
|
import {
|
|
|
@@ -15,6 +14,7 @@ import { debugConsole } from '@/utils/debugging'
|
|
|
import { postJSON } from '@/infrastructure/fetch-json'
|
|
|
import Notification from '@/shared/components/notification'
|
|
|
import OLCard from '@/features/ui/components/ol/ol-card'
|
|
|
+import OLRow from '@/features/ui/components/ol/ol-row'
|
|
|
import OLCol from '@/features/ui/components/ol/ol-col'
|
|
|
import OLButton from '@/features/ui/components/ol/ol-button'
|
|
|
import { subscriptionUpdateUrl } from '@/features/subscription/data/subscription-url'
|
|
|
@@ -50,8 +50,8 @@ function PreviewSubscriptionChange() {
|
|
|
: (preview.change as PremiumSubscriptionChange).plan.name
|
|
|
|
|
|
return (
|
|
|
- <Grid>
|
|
|
- <Row>
|
|
|
+ <div className="container">
|
|
|
+ <OLRow>
|
|
|
<OLCol md={{ offset: 2, span: 8 }}>
|
|
|
<OLCard className="p-3">
|
|
|
{preview.change.type === 'add-on-purchase' ? (
|
|
|
@@ -100,7 +100,7 @@ function PreviewSubscriptionChange() {
|
|
|
|
|
|
<OLCard className="payment-summary-card mt-5">
|
|
|
<h3>{t('due_today')}:</h3>
|
|
|
- <Row>
|
|
|
+ <OLRow>
|
|
|
<OLCol xs={9}>{changeName}</OLCol>
|
|
|
<OLCol xs={3} className="text-end">
|
|
|
<strong>
|
|
|
@@ -110,10 +110,10 @@ function PreviewSubscriptionChange() {
|
|
|
)}
|
|
|
</strong>
|
|
|
</OLCol>
|
|
|
- </Row>
|
|
|
+ </OLRow>
|
|
|
|
|
|
{preview.immediateCharge.tax > 0 && (
|
|
|
- <Row className="mt-1">
|
|
|
+ <OLRow className="mt-1">
|
|
|
<OLCol xs={9}>
|
|
|
{t('vat')} {preview.nextInvoice.tax.rate * 100}%
|
|
|
</OLCol>
|
|
|
@@ -123,10 +123,10 @@ function PreviewSubscriptionChange() {
|
|
|
preview.currency
|
|
|
)}
|
|
|
</OLCol>
|
|
|
- </Row>
|
|
|
+ </OLRow>
|
|
|
)}
|
|
|
|
|
|
- <Row className="mt-1">
|
|
|
+ <OLRow className="mt-1">
|
|
|
<OLCol xs={9}>{t('total_today')}</OLCol>
|
|
|
<OLCol xs={3} className="text-end">
|
|
|
<strong>
|
|
|
@@ -136,7 +136,7 @@ function PreviewSubscriptionChange() {
|
|
|
)}
|
|
|
</strong>
|
|
|
</OLCol>
|
|
|
- </Row>
|
|
|
+ </OLRow>
|
|
|
</OLCard>
|
|
|
|
|
|
<div className="mt-5">
|
|
|
@@ -169,7 +169,7 @@ function PreviewSubscriptionChange() {
|
|
|
|
|
|
<OLCard className="payment-summary-card mt-5">
|
|
|
<h3>{t('future_payments')}:</h3>
|
|
|
- <Row className="mt-1">
|
|
|
+ <OLRow className="mt-1">
|
|
|
<OLCol xs={9}>{preview.nextInvoice.plan.name}</OLCol>
|
|
|
<OLCol xs={3} className="text-end">
|
|
|
{formatCurrency(
|
|
|
@@ -177,10 +177,10 @@ function PreviewSubscriptionChange() {
|
|
|
preview.currency
|
|
|
)}
|
|
|
</OLCol>
|
|
|
- </Row>
|
|
|
+ </OLRow>
|
|
|
|
|
|
{preview.nextInvoice.addOns.map(addOn => (
|
|
|
- <Row className="mt-1" key={addOn.code}>
|
|
|
+ <OLRow className="mt-1" key={addOn.code}>
|
|
|
<OLCol xs={9}>
|
|
|
{addOn.name}
|
|
|
{addOn.quantity > 1 ? ` ×${addOn.quantity}` : ''}
|
|
|
@@ -188,11 +188,11 @@ function PreviewSubscriptionChange() {
|
|
|
<OLCol xs={3} className="text-end">
|
|
|
{formatCurrency(addOn.amount, preview.currency)}
|
|
|
</OLCol>
|
|
|
- </Row>
|
|
|
+ </OLRow>
|
|
|
))}
|
|
|
|
|
|
{preview.nextInvoice.tax.rate > 0 && (
|
|
|
- <Row className="mt-1">
|
|
|
+ <OLRow className="mt-1">
|
|
|
<OLCol xs={9}>
|
|
|
{t('vat')} {preview.nextInvoice.tax.rate * 100}%
|
|
|
</OLCol>
|
|
|
@@ -202,10 +202,10 @@ function PreviewSubscriptionChange() {
|
|
|
preview.currency
|
|
|
)}
|
|
|
</OLCol>
|
|
|
- </Row>
|
|
|
+ </OLRow>
|
|
|
)}
|
|
|
|
|
|
- <Row className="mt-1">
|
|
|
+ <OLRow className="mt-1">
|
|
|
<OLCol xs={9}>
|
|
|
{preview.nextPlan.annual
|
|
|
? t('total_per_year')
|
|
|
@@ -214,7 +214,7 @@ function PreviewSubscriptionChange() {
|
|
|
<OLCol xs={3} className="text-end">
|
|
|
{formatCurrency(preview.nextInvoice.total, preview.currency)}
|
|
|
</OLCol>
|
|
|
- </Row>
|
|
|
+ </OLRow>
|
|
|
</OLCard>
|
|
|
|
|
|
<div className="mt-5">
|
|
|
@@ -228,8 +228,8 @@ function PreviewSubscriptionChange() {
|
|
|
</div>
|
|
|
</OLCard>
|
|
|
</OLCol>
|
|
|
- </Row>
|
|
|
- </Grid>
|
|
|
+ </OLRow>
|
|
|
+ </div>
|
|
|
)
|
|
|
}
|
|
|
|