payment-kit 1.18.56 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +6 -0
- package/blocklet.yml +1 -1
- package/package.json +57 -58
- package/src/components/actions.tsx +22 -9
- package/src/components/balance-list.tsx +40 -12
- package/src/components/collapse.tsx +22 -14
- package/src/components/copyable.tsx +8 -7
- package/src/components/currency.tsx +15 -7
- package/src/components/customer/actions.tsx +1 -5
- package/src/components/customer/form.tsx +3 -1
- package/src/components/customer/link.tsx +4 -12
- package/src/components/customer/notification-preference.tsx +18 -9
- package/src/components/customer/overdraft-protection.tsx +112 -41
- package/src/components/drawer-form.tsx +42 -18
- package/src/components/error.tsx +1 -5
- package/src/components/event/list.tsx +9 -10
- package/src/components/filter-toolbar.tsx +20 -19
- package/src/components/info-card.tsx +32 -18
- package/src/components/info-metric.tsx +16 -6
- package/src/components/info-row-group.tsx +1 -7
- package/src/components/info-row.tsx +30 -24
- package/src/components/invoice/action.tsx +1 -7
- package/src/components/invoice/list.tsx +15 -25
- package/src/components/invoice/recharge.tsx +5 -7
- package/src/components/invoice/table.tsx +17 -12
- package/src/components/layout/user.tsx +1 -1
- package/src/components/metadata/form.tsx +13 -13
- package/src/components/metadata/list.tsx +11 -3
- package/src/components/passport/actions.tsx +9 -4
- package/src/components/payment-currency/add.tsx +16 -3
- package/src/components/payment-currency/form.tsx +12 -6
- package/src/components/payment-intent/actions.tsx +24 -16
- package/src/components/payment-intent/list.tsx +11 -8
- package/src/components/payment-link/actions.tsx +1 -5
- package/src/components/payment-link/after-pay.tsx +4 -2
- package/src/components/payment-link/before-pay.tsx +14 -4
- package/src/components/payment-link/item.tsx +27 -6
- package/src/components/payment-link/preview.tsx +9 -9
- package/src/components/payment-link/product-select.tsx +17 -3
- package/src/components/payment-method/arcblock.tsx +6 -1
- package/src/components/payment-method/base.tsx +6 -1
- package/src/components/payment-method/bitcoin.tsx +6 -1
- package/src/components/payment-method/ethereum.tsx +6 -1
- package/src/components/payment-method/evm-rpc-input.tsx +11 -7
- package/src/components/payment-method/form.tsx +2 -7
- package/src/components/payouts/actions.tsx +1 -5
- package/src/components/payouts/list.tsx +11 -9
- package/src/components/payouts/portal/list.tsx +11 -9
- package/src/components/price/currency-select.tsx +28 -17
- package/src/components/price/form.tsx +135 -84
- package/src/components/price/upsell-select.tsx +10 -2
- package/src/components/price/upsell.tsx +7 -2
- package/src/components/pricing-table/actions.tsx +1 -5
- package/src/components/pricing-table/customer-settings.tsx +5 -1
- package/src/components/pricing-table/payment-settings.tsx +14 -4
- package/src/components/pricing-table/preview.tsx +9 -9
- package/src/components/pricing-table/price-item.tsx +6 -1
- package/src/components/pricing-table/product-item.tsx +6 -1
- package/src/components/pricing-table/product-settings.tsx +17 -4
- package/src/components/product/actions.tsx +1 -5
- package/src/components/product/create.tsx +1 -5
- package/src/components/product/cross-sell-select.tsx +5 -1
- package/src/components/product/cross-sell.tsx +7 -2
- package/src/components/product/features.tsx +13 -3
- package/src/components/product/form.tsx +38 -10
- package/src/components/progress-bar.tsx +1 -1
- package/src/components/refund/actions.tsx +1 -7
- package/src/components/refund/list.tsx +12 -17
- package/src/components/section/header.tsx +23 -12
- package/src/components/subscription/actions/cancel.tsx +22 -5
- package/src/components/subscription/actions/index.tsx +9 -10
- package/src/components/subscription/actions/pause.tsx +32 -6
- package/src/components/subscription/actions/slash-stake.tsx +5 -3
- package/src/components/subscription/description.tsx +12 -8
- package/src/components/subscription/items/index.tsx +30 -15
- package/src/components/subscription/items/usage-records.tsx +19 -5
- package/src/components/subscription/list.tsx +5 -7
- package/src/components/subscription/metrics.tsx +27 -12
- package/src/components/subscription/portal/actions.tsx +76 -70
- package/src/components/subscription/portal/cancel.tsx +10 -3
- package/src/components/subscription/portal/list.tsx +48 -26
- package/src/components/uploader.tsx +5 -13
- package/src/components/webhook/attempts.tsx +51 -16
- package/src/components/webhook/request-info.tsx +8 -6
- package/src/contexts/products.tsx +1 -1
- package/src/pages/admin/billing/invoices/detail.tsx +48 -12
- package/src/pages/admin/billing/subscriptions/detail.tsx +43 -11
- package/src/pages/admin/customers/customers/detail.tsx +53 -12
- package/src/pages/admin/customers/customers/index.tsx +6 -1
- package/src/pages/admin/developers/events/detail.tsx +36 -10
- package/src/pages/admin/developers/webhooks/detail.tsx +41 -11
- package/src/pages/admin/index.tsx +15 -2
- package/src/pages/admin/overview.tsx +107 -19
- package/src/pages/admin/payments/intents/detail.tsx +57 -13
- package/src/pages/admin/payments/payouts/detail.tsx +62 -14
- package/src/pages/admin/payments/refunds/detail.tsx +57 -13
- package/src/pages/admin/products/index.tsx +8 -2
- package/src/pages/admin/products/links/create.tsx +22 -4
- package/src/pages/admin/products/links/detail.tsx +42 -13
- package/src/pages/admin/products/passports/index.tsx +23 -4
- package/src/pages/admin/products/prices/actions.tsx +1 -6
- package/src/pages/admin/products/prices/detail.tsx +43 -11
- package/src/pages/admin/products/prices/list.tsx +7 -2
- package/src/pages/admin/products/pricing-tables/create.tsx +45 -12
- package/src/pages/admin/products/pricing-tables/detail.tsx +44 -13
- package/src/pages/admin/products/products/create.tsx +4 -1
- package/src/pages/admin/products/products/detail.tsx +72 -17
- package/src/pages/admin/settings/index.tsx +8 -1
- package/src/pages/admin/settings/payment-methods/index.tsx +84 -19
- package/src/pages/admin/settings/vault-config/edit-form.tsx +42 -28
- package/src/pages/admin/settings/vault-config/index.tsx +57 -10
- package/src/pages/customer/index.tsx +41 -15
- package/src/pages/customer/invoice/detail.tsx +63 -14
- package/src/pages/customer/invoice/past-due.tsx +11 -3
- package/src/pages/customer/payout/detail.tsx +56 -13
- package/src/pages/customer/recharge/account.tsx +80 -20
- package/src/pages/customer/recharge/subscription.tsx +86 -25
- package/src/pages/customer/refund/list.tsx +60 -24
- package/src/pages/customer/subscription/change-payment.tsx +13 -4
- package/src/pages/customer/subscription/change-plan.tsx +34 -7
- package/src/pages/customer/subscription/detail.tsx +86 -20
- package/src/pages/customer/subscription/embed.tsx +24 -4
- package/src/pages/home.tsx +26 -4
- package/src/pages/integrations/donations/edit-form.tsx +25 -9
- package/src/pages/integrations/donations/index.tsx +26 -9
- package/src/pages/integrations/donations/preview.tsx +59 -15
- package/src/pages/integrations/index.tsx +10 -1
- package/src/pages/integrations/overview.tsx +78 -17
- package/vite.config.ts +60 -30
|
@@ -150,8 +150,18 @@ export default function CreatePaymentLink() {
|
|
|
150
150
|
</Button>
|
|
151
151
|
}>
|
|
152
152
|
<FormProvider {...methods}>
|
|
153
|
-
<Stack
|
|
154
|
-
|
|
153
|
+
<Stack
|
|
154
|
+
spacing={3}
|
|
155
|
+
direction="row"
|
|
156
|
+
sx={{
|
|
157
|
+
alignItems: 'flex-start',
|
|
158
|
+
}}>
|
|
159
|
+
<Stack
|
|
160
|
+
spacing={2}
|
|
161
|
+
sx={{
|
|
162
|
+
flex: 2,
|
|
163
|
+
alignItems: 'flex-start',
|
|
164
|
+
}}>
|
|
155
165
|
<Typography variant="h6" sx={{ mb: 2, fontWeight: 600 }}>
|
|
156
166
|
{t('common.setup')}
|
|
157
167
|
</Typography>
|
|
@@ -172,12 +182,20 @@ export default function CreatePaymentLink() {
|
|
|
172
182
|
<TabComponent triggerError={triggerError} />
|
|
173
183
|
</ProductsProvider>
|
|
174
184
|
</Stack>
|
|
175
|
-
<Stack
|
|
185
|
+
<Stack
|
|
186
|
+
sx={{
|
|
187
|
+
flex: 1,
|
|
188
|
+
maxWidth: 680,
|
|
189
|
+
}}>
|
|
176
190
|
<Typography variant="h6" sx={{ mb: 2, fontWeight: 600 }}>
|
|
177
191
|
{t('common.preview')}
|
|
178
192
|
</Typography>
|
|
179
193
|
{stashed && <PaymentLinkPreview id={`plink_${session?.user?.did}`} version={stashed} ref={fullScreenRef} />}
|
|
180
|
-
<Box
|
|
194
|
+
<Box
|
|
195
|
+
sx={{
|
|
196
|
+
textAlign: 'center',
|
|
197
|
+
mt: 2.5,
|
|
198
|
+
}}>
|
|
181
199
|
<Button
|
|
182
200
|
variant="outlined"
|
|
183
201
|
color="primary"
|
|
@@ -104,13 +104,22 @@ export default function PaymentLinkDetail(props: { id: string }) {
|
|
|
104
104
|
|
|
105
105
|
return (
|
|
106
106
|
<Grid container spacing={4} sx={{ mb: 4 }}>
|
|
107
|
-
<Grid
|
|
108
|
-
<Stack
|
|
107
|
+
<Grid size={12}>
|
|
108
|
+
<Stack
|
|
109
|
+
className="page-header"
|
|
110
|
+
direction="row"
|
|
111
|
+
sx={{
|
|
112
|
+
justifyContent: 'space-between',
|
|
113
|
+
alignItems: 'center',
|
|
114
|
+
}}>
|
|
109
115
|
<Stack
|
|
110
116
|
direction="row"
|
|
111
|
-
|
|
112
|
-
sx={{
|
|
113
|
-
|
|
117
|
+
onClick={() => goBackOrFallback('/admin/products/links')}
|
|
118
|
+
sx={{
|
|
119
|
+
alignItems: 'center',
|
|
120
|
+
fontWeight: 'normal',
|
|
121
|
+
cursor: 'pointer',
|
|
122
|
+
}}>
|
|
114
123
|
<ArrowBackOutlined fontSize="small" sx={{ mr: 0.5, color: 'text.secondary' }} />
|
|
115
124
|
<Typography variant="h6" sx={{ color: 'text.secondary', fontWeight: 'normal' }}>
|
|
116
125
|
{t('admin.paymentLinks')}
|
|
@@ -119,29 +128,41 @@ export default function PaymentLinkDetail(props: { id: string }) {
|
|
|
119
128
|
<PaymentLinkActions data={data} onChange={onChange} variant="normal" />
|
|
120
129
|
</Stack>
|
|
121
130
|
<Box
|
|
122
|
-
mt={4}
|
|
123
|
-
mb={3}
|
|
124
131
|
sx={{
|
|
132
|
+
mt: 4,
|
|
133
|
+
mb: 3,
|
|
125
134
|
display: 'flex',
|
|
135
|
+
|
|
126
136
|
gap: {
|
|
127
137
|
xs: 2,
|
|
128
138
|
sm: 2,
|
|
129
139
|
md: 5,
|
|
130
140
|
},
|
|
141
|
+
|
|
131
142
|
flexWrap: 'wrap',
|
|
143
|
+
|
|
132
144
|
flexDirection: {
|
|
133
145
|
xs: 'column',
|
|
134
146
|
sm: 'column',
|
|
135
147
|
md: 'row',
|
|
136
148
|
},
|
|
149
|
+
|
|
137
150
|
alignItems: {
|
|
138
151
|
xs: 'flex-start',
|
|
139
152
|
sm: 'flex-start',
|
|
140
153
|
md: 'center',
|
|
141
154
|
},
|
|
142
155
|
}}>
|
|
143
|
-
<Stack
|
|
144
|
-
|
|
156
|
+
<Stack
|
|
157
|
+
direction="row"
|
|
158
|
+
sx={{
|
|
159
|
+
justifyContent: 'space-between',
|
|
160
|
+
alignItems: 'center',
|
|
161
|
+
}}>
|
|
162
|
+
<Stack
|
|
163
|
+
sx={{
|
|
164
|
+
gap: 1,
|
|
165
|
+
}}>
|
|
145
166
|
<Typography variant="h1">{data.name}</Typography>
|
|
146
167
|
<Copyable text={joinURL(window.blocklet.appUrl, window.blocklet.prefix, `/checkout/pay/${data.id}`)}>
|
|
147
168
|
<Typography
|
|
@@ -160,18 +181,22 @@ export default function PaymentLinkDetail(props: { id: string }) {
|
|
|
160
181
|
</Stack>
|
|
161
182
|
<Stack
|
|
162
183
|
className="section-body"
|
|
163
|
-
justifyContent="flex-start"
|
|
164
|
-
flexWrap="wrap"
|
|
165
184
|
sx={{
|
|
185
|
+
justifyContent: 'flex-start',
|
|
186
|
+
flexWrap: 'wrap',
|
|
187
|
+
|
|
166
188
|
'hr.MuiDivider-root:last-child': {
|
|
167
189
|
display: 'none',
|
|
168
190
|
},
|
|
191
|
+
|
|
169
192
|
flexDirection: {
|
|
170
193
|
xs: 'column',
|
|
171
194
|
sm: 'column',
|
|
172
195
|
md: 'row',
|
|
173
196
|
},
|
|
197
|
+
|
|
174
198
|
alignItems: 'flex-start',
|
|
199
|
+
|
|
175
200
|
gap: {
|
|
176
201
|
xs: 1,
|
|
177
202
|
sm: 1,
|
|
@@ -184,7 +209,7 @@ export default function PaymentLinkDetail(props: { id: string }) {
|
|
|
184
209
|
</Box>
|
|
185
210
|
<Divider />
|
|
186
211
|
</Grid>
|
|
187
|
-
<Grid
|
|
212
|
+
<Grid size={12}>
|
|
188
213
|
<Stack
|
|
189
214
|
sx={{
|
|
190
215
|
flexDirection: {
|
|
@@ -210,7 +235,11 @@ export default function PaymentLinkDetail(props: { id: string }) {
|
|
|
210
235
|
},
|
|
211
236
|
},
|
|
212
237
|
}}>
|
|
213
|
-
<Box
|
|
238
|
+
<Box
|
|
239
|
+
className="payment-link-column-1"
|
|
240
|
+
sx={{
|
|
241
|
+
flex: 1,
|
|
242
|
+
}}>
|
|
214
243
|
<Div direction="column" spacing={3}>
|
|
215
244
|
<Box className="section">
|
|
216
245
|
<SectionHeader title={t('admin.products')} />
|
|
@@ -31,7 +31,14 @@ export default function PassportList() {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
if (data && data.length === 0) {
|
|
34
|
-
return
|
|
34
|
+
return (
|
|
35
|
+
<Typography
|
|
36
|
+
sx={{
|
|
37
|
+
color: 'text.secondary',
|
|
38
|
+
}}>
|
|
39
|
+
{t('admin.event.empty')}
|
|
40
|
+
</Typography>
|
|
41
|
+
);
|
|
35
42
|
}
|
|
36
43
|
|
|
37
44
|
const columns = [
|
|
@@ -61,7 +68,11 @@ export default function PassportList() {
|
|
|
61
68
|
}
|
|
62
69
|
|
|
63
70
|
return (
|
|
64
|
-
<Typography
|
|
71
|
+
<Typography
|
|
72
|
+
component="span"
|
|
73
|
+
sx={{
|
|
74
|
+
color: 'text.secondary',
|
|
75
|
+
}}>
|
|
65
76
|
{t('common.none')}
|
|
66
77
|
</Typography>
|
|
67
78
|
);
|
|
@@ -82,7 +93,11 @@ export default function PassportList() {
|
|
|
82
93
|
}
|
|
83
94
|
|
|
84
95
|
return (
|
|
85
|
-
<Typography
|
|
96
|
+
<Typography
|
|
97
|
+
component="span"
|
|
98
|
+
sx={{
|
|
99
|
+
color: 'text.secondary',
|
|
100
|
+
}}>
|
|
86
101
|
{t('common.none')}
|
|
87
102
|
</Typography>
|
|
88
103
|
);
|
|
@@ -114,7 +129,11 @@ export default function PassportList() {
|
|
|
114
129
|
}
|
|
115
130
|
|
|
116
131
|
return (
|
|
117
|
-
<Typography
|
|
132
|
+
<Typography
|
|
133
|
+
component="span"
|
|
134
|
+
sx={{
|
|
135
|
+
color: 'text.secondary',
|
|
136
|
+
}}>
|
|
118
137
|
{t('common.none')}
|
|
119
138
|
</Typography>
|
|
120
139
|
);
|
|
@@ -16,12 +16,7 @@ type Props = {
|
|
|
16
16
|
setAsDefault?: boolean;
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
PriceActions
|
|
20
|
-
variant: 'compact',
|
|
21
|
-
setAsDefault: false,
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export default function PriceActions({ data, onChange, variant, setAsDefault }: Props) {
|
|
19
|
+
export default function PriceActions({ data, onChange, variant = 'compact', setAsDefault = false }: Props) {
|
|
25
20
|
const { t } = useLocaleContext();
|
|
26
21
|
const navigate = useNavigate();
|
|
27
22
|
|
|
@@ -107,12 +107,21 @@ export default function PriceDetail(props: { id: string }) {
|
|
|
107
107
|
{t('admin.price.locked')}
|
|
108
108
|
</Alert>
|
|
109
109
|
)}
|
|
110
|
-
<Stack
|
|
110
|
+
<Stack
|
|
111
|
+
className="page-header"
|
|
112
|
+
direction="row"
|
|
113
|
+
sx={{
|
|
114
|
+
justifyContent: 'space-between',
|
|
115
|
+
alignItems: 'center',
|
|
116
|
+
}}>
|
|
111
117
|
<Stack
|
|
112
118
|
direction="row"
|
|
113
|
-
|
|
114
|
-
sx={{
|
|
115
|
-
|
|
119
|
+
onClick={() => goBackOrFallback(`/admin/products/${data.product_id}`)}
|
|
120
|
+
sx={{
|
|
121
|
+
alignItems: 'center',
|
|
122
|
+
fontWeight: 'normal',
|
|
123
|
+
cursor: 'pointer',
|
|
124
|
+
}}>
|
|
116
125
|
<ArrowBackOutlined fontSize="small" sx={{ mr: 0.5, color: 'text.secondary' }} />
|
|
117
126
|
<Typography variant="h6" sx={{ color: 'text.secondary', fontWeight: 'normal' }}>
|
|
118
127
|
{t('admin.products')}
|
|
@@ -121,47 +130,63 @@ export default function PriceDetail(props: { id: string }) {
|
|
|
121
130
|
<PriceActions data={data} onChange={onChange} variant="normal" />
|
|
122
131
|
</Stack>
|
|
123
132
|
<Box
|
|
124
|
-
mt={4}
|
|
125
|
-
mb={3}
|
|
126
133
|
sx={{
|
|
134
|
+
mt: 4,
|
|
135
|
+
mb: 3,
|
|
127
136
|
display: 'flex',
|
|
137
|
+
|
|
128
138
|
gap: {
|
|
129
139
|
xs: 2,
|
|
130
140
|
sm: 2,
|
|
131
141
|
md: 5,
|
|
132
142
|
},
|
|
143
|
+
|
|
133
144
|
flexWrap: 'wrap',
|
|
145
|
+
|
|
134
146
|
flexDirection: {
|
|
135
147
|
xs: 'column',
|
|
136
148
|
sm: 'column',
|
|
137
149
|
md: 'row',
|
|
138
150
|
},
|
|
151
|
+
|
|
139
152
|
alignItems: {
|
|
140
153
|
xs: 'flex-start',
|
|
141
154
|
sm: 'flex-start',
|
|
142
155
|
md: 'center',
|
|
143
156
|
},
|
|
144
157
|
}}>
|
|
145
|
-
<Stack
|
|
146
|
-
|
|
158
|
+
<Stack
|
|
159
|
+
direction="column"
|
|
160
|
+
sx={{
|
|
161
|
+
gap: 1,
|
|
162
|
+
}}>
|
|
163
|
+
<Typography
|
|
164
|
+
variant="h2"
|
|
165
|
+
sx={{
|
|
166
|
+
fontWeight: 600,
|
|
167
|
+
}}>
|
|
147
168
|
Price for {data.product.name}
|
|
148
169
|
</Typography>
|
|
149
170
|
<Copyable text={props.id} style={{ marginLeft: 4 }} />
|
|
150
171
|
</Stack>
|
|
151
172
|
<Stack
|
|
152
173
|
className="section-body"
|
|
153
|
-
justifyContent="flex-start"
|
|
154
|
-
flexWrap="wrap"
|
|
155
174
|
sx={{
|
|
175
|
+
justifyContent: 'flex-start',
|
|
176
|
+
flexWrap: 'wrap',
|
|
177
|
+
|
|
156
178
|
'hr.MuiDivider-root:last-child': {
|
|
157
179
|
display: 'none',
|
|
158
180
|
},
|
|
181
|
+
|
|
159
182
|
flexDirection: {
|
|
160
183
|
xs: 'column',
|
|
161
184
|
sm: 'column',
|
|
162
185
|
md: 'row',
|
|
163
186
|
},
|
|
187
|
+
|
|
164
188
|
alignItems: 'flex-start',
|
|
189
|
+
|
|
165
190
|
gap: {
|
|
166
191
|
xs: 1,
|
|
167
192
|
sm: 1,
|
|
@@ -207,7 +232,14 @@ export default function PriceDetail(props: { id: string }) {
|
|
|
207
232
|
},
|
|
208
233
|
},
|
|
209
234
|
}}>
|
|
210
|
-
<Box
|
|
235
|
+
<Box
|
|
236
|
+
className="payment-link-column-1"
|
|
237
|
+
sx={{
|
|
238
|
+
flex: 1,
|
|
239
|
+
gap: 2.5,
|
|
240
|
+
display: 'flex',
|
|
241
|
+
flexDirection: 'column',
|
|
242
|
+
}}>
|
|
211
243
|
<Box className="section" sx={{ containerType: 'inline-size' }}>
|
|
212
244
|
<SectionHeader title={t('admin.details')}>
|
|
213
245
|
<Button
|
|
@@ -36,10 +36,15 @@ export default function PricesList({ product, onChange }: { product: Product; on
|
|
|
36
36
|
const priceCurrency = showHighlight
|
|
37
37
|
? findCurrency(settings.paymentMethods, query.currency_id || '')
|
|
38
38
|
: price.currency;
|
|
39
|
-
const highlightColor = theme.mode === 'dark' ? '#2e3035' : '#FFF9C4';
|
|
39
|
+
const highlightColor = theme.palette.mode === 'dark' ? '#2e3035' : '#FFF9C4';
|
|
40
40
|
return (
|
|
41
41
|
<Link to={`/admin/products/${price.id}`} color="text.primary">
|
|
42
|
-
<Stack
|
|
42
|
+
<Stack
|
|
43
|
+
direction="row"
|
|
44
|
+
spacing={1}
|
|
45
|
+
sx={{
|
|
46
|
+
alignItems: 'center',
|
|
47
|
+
}}>
|
|
43
48
|
{price.locked && (
|
|
44
49
|
<Tooltip title={t('admin.price.locked')}>
|
|
45
50
|
<LockOutlined sx={{ color: 'text.secondary' }} />
|
|
@@ -121,23 +121,48 @@ export default function CreatePricingTable() {
|
|
|
121
121
|
}>
|
|
122
122
|
<FormProvider {...methods}>
|
|
123
123
|
<ProductsProvider>
|
|
124
|
-
<Stack
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
<Stack
|
|
125
|
+
spacing={2}
|
|
126
|
+
direction="row"
|
|
127
|
+
sx={{
|
|
128
|
+
height: '92vh',
|
|
129
|
+
}}>
|
|
130
|
+
<Box
|
|
131
|
+
sx={{
|
|
132
|
+
flex: 2,
|
|
133
|
+
position: 'relative',
|
|
134
|
+
borderRight: '1px solid',
|
|
135
|
+
borderColor: 'grey.100',
|
|
136
|
+
}}>
|
|
137
|
+
<Stack
|
|
138
|
+
spacing={2}
|
|
139
|
+
sx={{
|
|
140
|
+
height: '100%',
|
|
141
|
+
}}>
|
|
142
|
+
<Box
|
|
143
|
+
sx={{
|
|
144
|
+
overflow: 'auto',
|
|
145
|
+
pr: 2,
|
|
146
|
+
pb: 8,
|
|
147
|
+
}}>
|
|
128
148
|
{step === 0 && <PricingTableProductSettings triggerError={triggerError} />}
|
|
129
149
|
{step === 1 && <PricingTablePaymentSettings />}
|
|
130
150
|
{/* {step === 2 && <PricingTableCustomerSettings />} */}
|
|
131
151
|
</Box>
|
|
132
152
|
<Stack
|
|
133
|
-
padding={2}
|
|
134
153
|
spacing={2}
|
|
135
|
-
width="100%"
|
|
136
154
|
direction="row"
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
155
|
+
sx={{
|
|
156
|
+
padding: 2,
|
|
157
|
+
width: '100%',
|
|
158
|
+
alignItems: 'center',
|
|
159
|
+
justifyContent: 'flex-end',
|
|
160
|
+
position: 'absolute',
|
|
161
|
+
borderTop: '1px solid',
|
|
162
|
+
borderColor: 'grey.100',
|
|
163
|
+
left: 0,
|
|
164
|
+
bottom: 0,
|
|
165
|
+
}}>
|
|
141
166
|
<Button variant="text" color="inherit" disabled={step === 0} onClick={onPrevious}>
|
|
142
167
|
{t('common.previous')}
|
|
143
168
|
</Button>
|
|
@@ -147,14 +172,22 @@ export default function CreatePricingTable() {
|
|
|
147
172
|
</Stack>
|
|
148
173
|
</Stack>
|
|
149
174
|
</Box>
|
|
150
|
-
<Box
|
|
175
|
+
<Box
|
|
176
|
+
sx={{
|
|
177
|
+
flex: 1,
|
|
178
|
+
maxWidth: 680,
|
|
179
|
+
}}>
|
|
151
180
|
<Typography variant="h6" sx={{ mb: 2, fontWeight: 600 }}>
|
|
152
181
|
{t('common.preview')}
|
|
153
182
|
</Typography>
|
|
154
183
|
{stashed && (
|
|
155
184
|
<PricingTablePreview id={`prctbl_${session?.user?.did}`} version={stashed} ref={fullScreenRef} />
|
|
156
185
|
)}
|
|
157
|
-
<Box
|
|
186
|
+
<Box
|
|
187
|
+
sx={{
|
|
188
|
+
textAlign: 'center',
|
|
189
|
+
mt: 2.5,
|
|
190
|
+
}}>
|
|
158
191
|
<Button
|
|
159
192
|
variant="outlined"
|
|
160
193
|
color="primary"
|
|
@@ -85,13 +85,22 @@ export default function PricingTableDetail(props: { id: string }) {
|
|
|
85
85
|
|
|
86
86
|
return (
|
|
87
87
|
<Grid container spacing={4} sx={{ mb: 4 }}>
|
|
88
|
-
<Grid
|
|
89
|
-
<Stack
|
|
88
|
+
<Grid size={12}>
|
|
89
|
+
<Stack
|
|
90
|
+
className="page-header"
|
|
91
|
+
direction="row"
|
|
92
|
+
sx={{
|
|
93
|
+
justifyContent: 'space-between',
|
|
94
|
+
alignItems: 'center',
|
|
95
|
+
}}>
|
|
90
96
|
<Stack
|
|
91
97
|
direction="row"
|
|
92
|
-
|
|
93
|
-
sx={{
|
|
94
|
-
|
|
98
|
+
onClick={() => goBackOrFallback('/admin/products/pricing-tables')}
|
|
99
|
+
sx={{
|
|
100
|
+
alignItems: 'center',
|
|
101
|
+
fontWeight: 'normal',
|
|
102
|
+
cursor: 'pointer',
|
|
103
|
+
}}>
|
|
95
104
|
<ArrowBackOutlined fontSize="small" sx={{ mr: 0.5, color: 'text.secondary' }} />
|
|
96
105
|
<Typography variant="h6" sx={{ color: 'text.secondary', fontWeight: 'normal' }}>
|
|
97
106
|
{t('admin.pricingTables')}
|
|
@@ -100,29 +109,43 @@ export default function PricingTableDetail(props: { id: string }) {
|
|
|
100
109
|
<PricingTableActions data={data} onChange={onChange} variant="normal" />
|
|
101
110
|
</Stack>
|
|
102
111
|
<Box
|
|
103
|
-
mt={4}
|
|
104
|
-
mb={3}
|
|
105
112
|
sx={{
|
|
113
|
+
mt: 4,
|
|
114
|
+
mb: 3,
|
|
106
115
|
display: 'flex',
|
|
116
|
+
|
|
107
117
|
gap: {
|
|
108
118
|
xs: 2,
|
|
109
119
|
sm: 2,
|
|
110
120
|
md: 5,
|
|
111
121
|
},
|
|
122
|
+
|
|
112
123
|
flexWrap: 'wrap',
|
|
124
|
+
|
|
113
125
|
flexDirection: {
|
|
114
126
|
xs: 'column',
|
|
115
127
|
sm: 'column',
|
|
116
128
|
md: 'row',
|
|
117
129
|
},
|
|
130
|
+
|
|
118
131
|
alignItems: {
|
|
119
132
|
xs: 'flex-start',
|
|
120
133
|
sm: 'flex-start',
|
|
121
134
|
md: 'center',
|
|
122
135
|
},
|
|
123
136
|
}}>
|
|
124
|
-
<Stack
|
|
125
|
-
|
|
137
|
+
<Stack
|
|
138
|
+
direction="row"
|
|
139
|
+
sx={{
|
|
140
|
+
justifyContent: 'space-between',
|
|
141
|
+
alignItems: 'center',
|
|
142
|
+
gap: 5,
|
|
143
|
+
}}>
|
|
144
|
+
<Stack
|
|
145
|
+
direction="column"
|
|
146
|
+
sx={{
|
|
147
|
+
alignItems: 'flex-start',
|
|
148
|
+
}}>
|
|
126
149
|
<Typography variant="h1">{data.name}</Typography>
|
|
127
150
|
<Copyable
|
|
128
151
|
text={joinURL(window.blocklet.appUrl, window.blocklet.prefix, `/checkout/pricing-table/${data.id}`)}>
|
|
@@ -146,18 +169,22 @@ export default function PricingTableDetail(props: { id: string }) {
|
|
|
146
169
|
</Stack>
|
|
147
170
|
<Stack
|
|
148
171
|
className="section-body"
|
|
149
|
-
justifyContent="flex-start"
|
|
150
|
-
flexWrap="wrap"
|
|
151
172
|
sx={{
|
|
173
|
+
justifyContent: 'flex-start',
|
|
174
|
+
flexWrap: 'wrap',
|
|
175
|
+
|
|
152
176
|
'hr.MuiDivider-root:last-child': {
|
|
153
177
|
display: 'none',
|
|
154
178
|
},
|
|
179
|
+
|
|
155
180
|
flexDirection: {
|
|
156
181
|
xs: 'column',
|
|
157
182
|
sm: 'column',
|
|
158
183
|
md: 'row',
|
|
159
184
|
},
|
|
185
|
+
|
|
160
186
|
alignItems: 'flex-start',
|
|
187
|
+
|
|
161
188
|
gap: {
|
|
162
189
|
xs: 1,
|
|
163
190
|
sm: 1,
|
|
@@ -169,7 +196,7 @@ export default function PricingTableDetail(props: { id: string }) {
|
|
|
169
196
|
</Box>
|
|
170
197
|
<Divider />
|
|
171
198
|
</Grid>
|
|
172
|
-
<Grid
|
|
199
|
+
<Grid size={12}>
|
|
173
200
|
<Stack
|
|
174
201
|
sx={{
|
|
175
202
|
flexDirection: {
|
|
@@ -195,7 +222,11 @@ export default function PricingTableDetail(props: { id: string }) {
|
|
|
195
222
|
},
|
|
196
223
|
},
|
|
197
224
|
}}>
|
|
198
|
-
<Box
|
|
225
|
+
<Box
|
|
226
|
+
className="payment-link-column-1"
|
|
227
|
+
sx={{
|
|
228
|
+
flex: 1,
|
|
229
|
+
}}>
|
|
199
230
|
<Div direction="column" spacing={3}>
|
|
200
231
|
<Box className="section">
|
|
201
232
|
<SectionHeader title={t('admin.products')} />
|