@carlonicora/nextjs-jsonapi 5.7.2 → 5.7.3
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/dist/billing/index.js +0 -13
- package/dist/billing/index.js.map +1 -1
- package/dist/billing/index.mjs +0 -13
- package/dist/billing/index.mjs.map +1 -1
- package/messages/en.json +0 -2
- package/messages/it.json +0 -2
- package/package.json +1 -1
- package/src/features/billing/i18n-keys.ts +0 -2
- package/src/features/billing/stripe-subscription/components/details/SubscriptionDetails.tsx +0 -19
package/messages/en.json
CHANGED
|
@@ -770,8 +770,6 @@
|
|
|
770
770
|
"details_description": "View and manage your subscription",
|
|
771
771
|
"details_title": "Subscription Details",
|
|
772
772
|
"manage_portal": "Manage via Portal",
|
|
773
|
-
"pause": "Pause",
|
|
774
|
-
"pausing": "Pausing...",
|
|
775
773
|
"resume": "Resume",
|
|
776
774
|
"resuming": "Resuming...",
|
|
777
775
|
"trial_ends": "Trial Ends:",
|
package/messages/it.json
CHANGED
|
@@ -770,8 +770,6 @@
|
|
|
770
770
|
"details_description": "Visualizza e gestisci il tuo abbonamento",
|
|
771
771
|
"details_title": "Dettagli abbonamento",
|
|
772
772
|
"manage_portal": "Gestisci dal portale",
|
|
773
|
-
"pause": "Sospendi",
|
|
774
|
-
"pausing": "Sospensione...",
|
|
775
773
|
"resume": "Riattiva",
|
|
776
774
|
"resuming": "Riattivazione...",
|
|
777
775
|
"trial_ends": "Fine della prova:",
|
package/package.json
CHANGED
|
@@ -336,8 +336,6 @@ export const BILLING_UI_I18N_KEYS = [
|
|
|
336
336
|
"billing.ui.subscription.details_description",
|
|
337
337
|
"billing.ui.subscription.details_title",
|
|
338
338
|
"billing.ui.subscription.manage_portal",
|
|
339
|
-
"billing.ui.subscription.pause",
|
|
340
|
-
"billing.ui.subscription.pausing",
|
|
341
339
|
"billing.ui.subscription.resume",
|
|
342
340
|
"billing.ui.subscription.resuming",
|
|
343
341
|
"billing.ui.subscription.trial_ends",
|
|
@@ -77,18 +77,6 @@ export function SubscriptionDetails({
|
|
|
77
77
|
const [showCancel, setShowCancel] = useState<boolean>(false);
|
|
78
78
|
const [isProcessing, setIsProcessing] = useState<boolean>(false);
|
|
79
79
|
|
|
80
|
-
const handlePause = async () => {
|
|
81
|
-
setIsProcessing(true);
|
|
82
|
-
try {
|
|
83
|
-
await StripeSubscriptionService.pauseSubscription({ subscriptionId: subscription.id });
|
|
84
|
-
onSubscriptionChange();
|
|
85
|
-
} catch (error) {
|
|
86
|
-
console.error("[SubscriptionDetails] Failed to pause subscription:", error);
|
|
87
|
-
} finally {
|
|
88
|
-
setIsProcessing(false);
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
|
|
92
80
|
const handleResume = async () => {
|
|
93
81
|
setIsProcessing(true);
|
|
94
82
|
try {
|
|
@@ -110,7 +98,6 @@ export function SubscriptionDetails({
|
|
|
110
98
|
}
|
|
111
99
|
};
|
|
112
100
|
|
|
113
|
-
const canPause = subscription.status === SubscriptionStatus.ACTIVE;
|
|
114
101
|
const canResume = subscription.status === SubscriptionStatus.PAUSED;
|
|
115
102
|
const canCancel =
|
|
116
103
|
subscription.status === SubscriptionStatus.ACTIVE ||
|
|
@@ -187,12 +174,6 @@ export function SubscriptionDetails({
|
|
|
187
174
|
</Button>
|
|
188
175
|
)}
|
|
189
176
|
|
|
190
|
-
{canPause && (
|
|
191
|
-
<Button variant="outline" onClick={handlePause} disabled={isProcessing}>
|
|
192
|
-
{isProcessing ? t("billing.ui.subscription.pausing") : t("billing.ui.subscription.pause")}
|
|
193
|
-
</Button>
|
|
194
|
-
)}
|
|
195
|
-
|
|
196
177
|
{canResume && (
|
|
197
178
|
<Button variant="outline" onClick={handleResume} disabled={isProcessing}>
|
|
198
179
|
{isProcessing ? t("billing.ui.subscription.resuming") : t("billing.ui.subscription.resume")}
|