@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/dist/billing/index.js
CHANGED
|
@@ -1322,17 +1322,6 @@ function SubscriptionDetails({
|
|
|
1322
1322
|
const fmt = _chunkEXG4ANC7js.useBillingFormatOptions.call(void 0, );
|
|
1323
1323
|
const [showCancel, setShowCancel] = _react.useState.call(void 0, false);
|
|
1324
1324
|
const [isProcessing, setIsProcessing] = _react.useState.call(void 0, false);
|
|
1325
|
-
const handlePause = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
|
|
1326
|
-
setIsProcessing(true);
|
|
1327
|
-
try {
|
|
1328
|
-
await _chunk3CSPHMVKjs.StripeSubscriptionService.pauseSubscription({ subscriptionId: subscription.id });
|
|
1329
|
-
onSubscriptionChange();
|
|
1330
|
-
} catch (error) {
|
|
1331
|
-
console.error("[SubscriptionDetails] Failed to pause subscription:", error);
|
|
1332
|
-
} finally {
|
|
1333
|
-
setIsProcessing(false);
|
|
1334
|
-
}
|
|
1335
|
-
}, "handlePause");
|
|
1336
1325
|
const handleResume = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
|
|
1337
1326
|
setIsProcessing(true);
|
|
1338
1327
|
try {
|
|
@@ -1352,7 +1341,6 @@ function SubscriptionDetails({
|
|
|
1352
1341
|
console.error("[SubscriptionDetails] Failed to create portal session:", error);
|
|
1353
1342
|
}
|
|
1354
1343
|
}, "handleManageViaPortal");
|
|
1355
|
-
const canPause = subscription.status === "active" /* ACTIVE */;
|
|
1356
1344
|
const canResume = subscription.status === "paused" /* PAUSED */;
|
|
1357
1345
|
const canCancel = subscription.status === "active" /* ACTIVE */ || subscription.status === "trialing" /* TRIALING */ || subscription.status === "paused" /* PAUSED */;
|
|
1358
1346
|
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
|
|
@@ -1399,7 +1387,6 @@ function SubscriptionDetails({
|
|
|
1399
1387
|
}) }) }),
|
|
1400
1388
|
/* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap gap-2 pt-4 border-t", children: [
|
|
1401
1389
|
onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEXG4ANC7js.Button, { variant: "default", onClick: () => onChangePlan(subscription), children: t("billing.ui.subscription.change_plan") }),
|
|
1402
|
-
canPause && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEXG4ANC7js.Button, { variant: "outline", onClick: handlePause, disabled: isProcessing, children: isProcessing ? t("billing.ui.subscription.pausing") : t("billing.ui.subscription.pause") }),
|
|
1403
1390
|
canResume && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEXG4ANC7js.Button, { variant: "outline", onClick: handleResume, disabled: isProcessing, children: isProcessing ? t("billing.ui.subscription.resuming") : t("billing.ui.subscription.resume") }),
|
|
1404
1391
|
canCancel && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEXG4ANC7js.Button, { variant: "destructive", onClick: () => setShowCancel(true), children: t("ui.buttons.cancel") }),
|
|
1405
1392
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEXG4ANC7js.Button, { variant: "outline", onClick: handleManageViaPortal, children: t("billing.ui.subscription.manage_portal") })
|