@burdenoff/microfe-billing 2026.624.3 → 2026.625.2
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/BillingAdminRoutes.js +1 -1
- package/dist/billing/BillingAdminRoutes.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonCreatePage.js +2 -2
- package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonDetailPage.js +4 -4
- package/dist/billing/modules/addons/pages/AddonDetailPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonEditPage.js +2 -2
- package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonsListPage.js +1 -1
- package/dist/billing/modules/addons/pages/AddonsListPage.js.map +1 -1
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +98 -99
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js +88 -85
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +6 -6
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoicesListPage.js +2 -2
- package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/RefundsPage.js +360 -370
- package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/UserRefundsPage.js +2 -2
- package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
- package/dist/billing/modules/checkout/components/BillingAccountSelector.js +1 -1
- package/dist/billing/modules/checkout/components/BillingAccountSelector.js.map +1 -1
- package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js +1 -1
- package/dist/billing/modules/checkout/components/CompleteBillingAccountModal.js.map +1 -1
- package/dist/billing/modules/checkout/components/SubscriptionSelector.js +1 -1
- package/dist/billing/modules/checkout/components/SubscriptionSelector.js.map +1 -1
- package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js +2 -2
- package/dist/billing/modules/checkout/components/WorkspaceQuotaAssignmentModal.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js +102 -104
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CouponsListPage.js +5 -5
- package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js +1 -1
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +1 -1
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditsPage.js +29 -28
- package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -1
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js +2 -2
- package/dist/billing/modules/dashboard/components/ActiveSubscriptionCard.js.map +1 -1
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js +1 -1
- package/dist/billing/modules/dashboard/components/AddPaymentMethodModal.js.map +1 -1
- package/dist/billing/modules/dashboard/components/BillingAccountCard.js +3 -3
- package/dist/billing/modules/dashboard/components/BillingAccountCard.js.map +1 -1
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js +2 -2
- package/dist/billing/modules/dashboard/components/CreateBillingAccountModal.js.map +1 -1
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js +1 -1
- package/dist/billing/modules/dashboard/components/PaymentMethodsSection.js.map +1 -1
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js +1 -1
- package/dist/billing/modules/dashboard/components/RecommendedAddonsSection.js.map +1 -1
- package/dist/billing/modules/dashboard/pages/OverviewPage.js +139 -142
- package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js +6 -6
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +4 -4
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +1 -1
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +142 -133
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanCreatePage.js +2 -2
- package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanDetailPage.js +4 -4
- package/dist/billing/modules/plans/pages/PlanDetailPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanEditPage.js +2 -2
- package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js +4 -4
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansListPage.js +2 -2
- package/dist/billing/modules/plans/pages/PlansListPage.js.map +1 -1
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +4 -4
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js.map +1 -1
- package/dist/billing/modules/promotions/pages/PromotionsListPage.js +2 -2
- package/dist/billing/modules/promotions/pages/PromotionsListPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +2 -2
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +5 -5
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +2 -2
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +259 -265
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +7 -7
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js.map +1 -1
- package/dist/billing/modules/usage/pages/UsagePage.js +13 -13
- package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
- package/dist/billing/shared/ui/Card.js +1 -1
- package/dist/billing/shared/ui/Card.js.map +1 -1
- package/dist/billing/shared/ui/MetricCard.js +28 -21
- package/dist/billing/shared/ui/MetricCard.js.map +1 -1
- package/package.json +2 -2
|
@@ -6,71 +6,72 @@ import "../../../shared/ui/index.js";
|
|
|
6
6
|
import { useBillingEventEmitter as i } from "../../../hooks/useBillingEventEmitter.js";
|
|
7
7
|
import { useBillingAccountSelection as a } from "../../../hooks/useBillingAccountSelection.js";
|
|
8
8
|
import { PricingModel as o } from "../../../shared/types/graphql.js";
|
|
9
|
-
import { formatBytes as s, formatCurrency as c, formatDate as l, formatPercentage as u, formatPlanDuration as d, formatSubscriptionStatus as
|
|
10
|
-
import { getQuotaProgressColor as
|
|
11
|
-
import { useBillingPermissions as
|
|
12
|
-
import { useGetDefaultBillingAccountDashboardQuery as
|
|
13
|
-
import { useBillingNavigate as
|
|
14
|
-
import { withBillingAccountId as
|
|
15
|
-
import { useWorkspaceQuotaOverview as
|
|
16
|
-
import { WorkspaceQuotaAssignmentModal as
|
|
17
|
-
import { useSubscription as
|
|
9
|
+
import { formatBytes as s, formatCurrency as c, formatDate as l, formatPercentage as u, formatPlanDuration as d, formatSubscriptionStatus as ee } from "../../../shared/utils/format.js";
|
|
10
|
+
import { getQuotaProgressColor as f, getSubscriptionStatusColor as te } from "../../../shared/utils/status.js";
|
|
11
|
+
import { useBillingPermissions as ne } from "../../../hooks/useBillingPermissions.js";
|
|
12
|
+
import { useGetDefaultBillingAccountDashboardQuery as re } from "../../../../generated/global-operations.js";
|
|
13
|
+
import { useBillingNavigate as ie } from "../../../hooks/useBillingNavigate.js";
|
|
14
|
+
import { withBillingAccountId as p } from "../../../shared/utils/navigation.js";
|
|
15
|
+
import { useWorkspaceQuotaOverview as ae } from "../../usage/hooks/useUsage.js";
|
|
16
|
+
import { WorkspaceQuotaAssignmentModal as oe } from "../../checkout/components/WorkspaceQuotaAssignmentModal.js";
|
|
17
|
+
import { useSubscription as se, useSubscriptionMutations as m } from "../hooks/useSubscriptions.js";
|
|
18
18
|
import "../hooks/index.js";
|
|
19
|
-
import { ManageSeatsModal as
|
|
20
|
-
import { useState as
|
|
21
|
-
import { useParams as
|
|
22
|
-
import { jsx as
|
|
23
|
-
import { useI18n as
|
|
19
|
+
import { ManageSeatsModal as h } from "../components/ManageSeatsModal.js";
|
|
20
|
+
import { useState as g } from "react";
|
|
21
|
+
import { useParams as ce } from "react-router-dom";
|
|
22
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
23
|
+
import { useI18n as le } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
24
|
+
import { CTAOverflowMenu as ue, EmphasisPanel as de } from "@burdenoff/fe-libs/ui";
|
|
24
25
|
//#region src/billing/modules/subscriptions/pages/SubscriptionDetailPage.tsx
|
|
25
|
-
function
|
|
26
|
+
function y(e, t) {
|
|
26
27
|
if (t?.displayName && typeof t.displayName == "string") return t.displayName;
|
|
27
28
|
if (t?.label && typeof t.label == "string") return t.label;
|
|
28
29
|
let n = e.split(".");
|
|
29
30
|
return (n.length > 1 ? n.slice(1) : n).map((e) => e.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase())).join(" ");
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
+
function b(e) {
|
|
32
33
|
return e === "DAILY" ? "Resets daily" : e === "MONTHLY" ? "Resets monthly" : "";
|
|
33
34
|
}
|
|
34
|
-
var
|
|
35
|
-
let { t: s } =
|
|
35
|
+
var x = () => {
|
|
36
|
+
let { t: s } = le(), u = (e, t) => {
|
|
36
37
|
let n = s(e);
|
|
37
38
|
return n === e ? t : n;
|
|
38
|
-
}, { subscriptionId:
|
|
39
|
-
orgId:
|
|
39
|
+
}, { subscriptionId: f } = ce(), y = ie(), { emit: b } = i(), { orgId: x } = e(), S = ne(), { selectedAccountId: _e } = a({
|
|
40
|
+
orgId: x,
|
|
40
41
|
syncFromUrl: !0,
|
|
41
42
|
urlParamName: "billingAccountId"
|
|
42
|
-
}), { data:
|
|
43
|
-
if (
|
|
43
|
+
}), { data: ve } = re({ fetchPolicy: "cache-first" }), C = _e ?? ve?.getDefaultBillingAccount?.id ?? void 0, { subscription: w, isLoading: ye, error: T, refetch: E } = se(f, C), { cancelSubscription: D, isCanceling: O, updateSubscriptionSeats: k, isUpdatingSeats: A } = m(), { workspaceId: j } = e(), { overview: M, refetch: N } = ae(j ?? void 0), [P, F] = g(!1), [I, L] = g(!1), [be, R] = g(!1), [z, B] = g(""), [V, H] = g(null), xe = async () => {
|
|
44
|
+
if (w) {
|
|
44
45
|
H(null);
|
|
45
46
|
try {
|
|
46
|
-
await
|
|
47
|
-
billingAccountId:
|
|
48
|
-
subscriptionId:
|
|
47
|
+
await D({
|
|
48
|
+
billingAccountId: C ?? w.billingAccountId,
|
|
49
|
+
subscriptionId: w.id,
|
|
49
50
|
reason: z || "User requested cancellation"
|
|
50
|
-
}),
|
|
51
|
+
}), b("billing.subscription.cancelled", {
|
|
51
52
|
route: "/billing/subscriptions",
|
|
52
|
-
entityId:
|
|
53
|
+
entityId: w.id,
|
|
53
54
|
source: "subscription-detail",
|
|
54
55
|
reason: z || "User requested cancellation"
|
|
55
|
-
}),
|
|
56
|
+
}), F(!1), B(""), await E();
|
|
56
57
|
} catch (e) {
|
|
57
58
|
H(e instanceof Error ? e.message : "Failed to cancel subscription");
|
|
58
59
|
}
|
|
59
60
|
}
|
|
60
61
|
};
|
|
61
|
-
if (!
|
|
62
|
+
if (!S.canViewSubscriptions) return /* @__PURE__ */ _("div", {
|
|
62
63
|
className: "flex items-center justify-center h-full min-h-[400px]",
|
|
63
|
-
children: /* @__PURE__ */
|
|
64
|
+
children: /* @__PURE__ */ v("div", {
|
|
64
65
|
className: "text-center space-y-2",
|
|
65
66
|
children: [
|
|
66
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ _("div", {
|
|
67
68
|
className: "size-12 mx-auto rounded-full bg-[var(--color-accent-soft)] flex items-center justify-center",
|
|
68
|
-
children: /* @__PURE__ */
|
|
69
|
+
children: /* @__PURE__ */ _("svg", {
|
|
69
70
|
className: "size-6 text-text-secondary",
|
|
70
71
|
fill: "none",
|
|
71
72
|
viewBox: "0 0 24 24",
|
|
72
73
|
stroke: "currentColor",
|
|
73
|
-
children: /* @__PURE__ */
|
|
74
|
+
children: /* @__PURE__ */ _("path", {
|
|
74
75
|
strokeLinecap: "round",
|
|
75
76
|
strokeLinejoin: "round",
|
|
76
77
|
strokeWidth: 2,
|
|
@@ -78,46 +79,46 @@ var S = () => {
|
|
|
78
79
|
})
|
|
79
80
|
})
|
|
80
81
|
}),
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ _("h2", {
|
|
82
83
|
className: "text-lg font-semibold text-text-primary",
|
|
83
84
|
children: "Access Denied"
|
|
84
85
|
}),
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ _("p", {
|
|
86
87
|
className: "text-sm text-text-secondary max-w-sm",
|
|
87
88
|
children: "You don't have permission to view this subscription."
|
|
88
89
|
})
|
|
89
90
|
]
|
|
90
91
|
})
|
|
91
92
|
});
|
|
92
|
-
if (
|
|
93
|
+
if (ye) return /* @__PURE__ */ v("div", {
|
|
93
94
|
className: "space-y-6 px-6 lg:px-8 py-6",
|
|
94
|
-
children: [/* @__PURE__ */
|
|
95
|
+
children: [/* @__PURE__ */ v("div", {
|
|
95
96
|
className: "flex items-center gap-4",
|
|
96
|
-
children: [/* @__PURE__ */
|
|
97
|
-
}), /* @__PURE__ */
|
|
97
|
+
children: [/* @__PURE__ */ _("div", { className: "size-10 bg-bg-sunken animate-pulse rounded-button" }), /* @__PURE__ */ _("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" })]
|
|
98
|
+
}), /* @__PURE__ */ _("div", {
|
|
98
99
|
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
99
|
-
children: /* @__PURE__ */
|
|
100
|
+
children: /* @__PURE__ */ _("div", {
|
|
100
101
|
className: "lg:col-span-2 space-y-6",
|
|
101
|
-
children: /* @__PURE__ */
|
|
102
|
-
className: "border border-border-
|
|
103
|
-
children: [/* @__PURE__ */
|
|
102
|
+
children: /* @__PURE__ */ v("div", {
|
|
103
|
+
className: "border border-border-seam rounded-card bg-bg-surface shadow-elevation-1 p-5 space-y-4",
|
|
104
|
+
children: [/* @__PURE__ */ _("div", { className: "h-6 w-32 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ _("div", { className: "h-4 w-full bg-bg-sunken animate-pulse rounded" })]
|
|
104
105
|
})
|
|
105
106
|
})
|
|
106
107
|
})]
|
|
107
108
|
});
|
|
108
|
-
if (
|
|
109
|
+
if (T || !w) return /* @__PURE__ */ _("div", {
|
|
109
110
|
className: "flex items-center justify-center h-full min-h-[400px]",
|
|
110
|
-
children: /* @__PURE__ */
|
|
111
|
+
children: /* @__PURE__ */ v("div", {
|
|
111
112
|
className: "text-center space-y-4",
|
|
112
113
|
children: [
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ _("div", {
|
|
114
115
|
className: "size-12 mx-auto rounded-full bg-status-error-bg-subtle flex items-center justify-center",
|
|
115
|
-
children: /* @__PURE__ */
|
|
116
|
+
children: /* @__PURE__ */ _("svg", {
|
|
116
117
|
className: "size-6 text-status-error-text",
|
|
117
118
|
fill: "none",
|
|
118
119
|
viewBox: "0 0 24 24",
|
|
119
120
|
stroke: "currentColor",
|
|
120
|
-
children: /* @__PURE__ */
|
|
121
|
+
children: /* @__PURE__ */ _("path", {
|
|
121
122
|
strokeLinecap: "round",
|
|
122
123
|
strokeLinejoin: "round",
|
|
123
124
|
strokeWidth: 2,
|
|
@@ -125,127 +126,120 @@ var S = () => {
|
|
|
125
126
|
})
|
|
126
127
|
})
|
|
127
128
|
}),
|
|
128
|
-
/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ _("h2", {
|
|
129
130
|
className: "text-lg font-semibold text-text-primary",
|
|
130
131
|
children: u("billing.subscriptions.notFound", "Subscription not found")
|
|
131
132
|
}),
|
|
132
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ _("p", {
|
|
133
134
|
className: "text-sm text-text-secondary",
|
|
134
|
-
children:
|
|
135
|
+
children: T?.message || "The subscription you are looking for does not exist."
|
|
135
136
|
}),
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ _("button", {
|
|
137
138
|
type: "button",
|
|
138
|
-
onClick: () =>
|
|
139
|
+
onClick: () => y(p("/subscriptions", C)),
|
|
139
140
|
className: "px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors duration-200",
|
|
140
141
|
children: "Back to Subscriptions"
|
|
141
142
|
})
|
|
142
143
|
]
|
|
143
144
|
})
|
|
144
145
|
});
|
|
145
|
-
let U =
|
|
146
|
-
return /* @__PURE__ */
|
|
146
|
+
let U = w.plan, W = w.quotas || [], G = w.addonSubscriptions || [], K = w.transactions || [], q = w.history || [], Se = te(w.status), J = w.status === "active", Y = M.filter((e) => e.assignment.subscriptionId === w.id && e.assignment.isActive), X = !!w.assignedWorkspaceId || Y.length > 0, Z = new Date(w.endDate), Ce = new Date(w.startDate), we = /* @__PURE__ */ new Date(), Q = Math.ceil((Z.getTime() - Ce.getTime()) / (1e3 * 60 * 60 * 24)), $ = Math.max(0, Math.ceil((Z.getTime() - we.getTime()) / (1e3 * 60 * 60 * 24))), Te = Math.round((Q - $) / Q * 100);
|
|
147
|
+
return /* @__PURE__ */ v("div", {
|
|
147
148
|
className: "space-y-6 px-6 lg:px-8 py-6",
|
|
148
149
|
children: [
|
|
149
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ v("div", {
|
|
150
151
|
className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
|
|
151
|
-
children: [/* @__PURE__ */
|
|
152
|
+
children: [/* @__PURE__ */ v("div", {
|
|
152
153
|
className: "flex items-start gap-4",
|
|
153
|
-
children: [/* @__PURE__ */
|
|
154
|
+
children: [/* @__PURE__ */ _("button", {
|
|
154
155
|
type: "button",
|
|
155
156
|
"aria-label": "Back to subscriptions",
|
|
156
|
-
onClick: () =>
|
|
157
|
+
onClick: () => y(p("/subscriptions", C)),
|
|
157
158
|
className: "p-2 -ml-2 text-text-secondary hover:text-text-primary hover:bg-bg-sunken rounded-button transition-colors duration-200",
|
|
158
|
-
children: /* @__PURE__ */
|
|
159
|
+
children: /* @__PURE__ */ _("svg", {
|
|
159
160
|
className: "size-5",
|
|
160
161
|
fill: "none",
|
|
161
162
|
viewBox: "0 0 24 24",
|
|
162
163
|
stroke: "currentColor",
|
|
163
|
-
children: /* @__PURE__ */
|
|
164
|
+
children: /* @__PURE__ */ _("path", {
|
|
164
165
|
strokeLinecap: "round",
|
|
165
166
|
strokeLinejoin: "round",
|
|
166
167
|
strokeWidth: 2,
|
|
167
168
|
d: "M15 19l-7-7 7-7"
|
|
168
169
|
})
|
|
169
170
|
})
|
|
170
|
-
}), /* @__PURE__ */
|
|
171
|
+
}), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ v("div", {
|
|
171
172
|
className: "flex items-center gap-3 flex-wrap",
|
|
172
|
-
children: [/* @__PURE__ */
|
|
173
|
+
children: [/* @__PURE__ */ _("h1", {
|
|
173
174
|
className: "text-2xl md:text-3xl font-semibold tracking-tight text-text-primary",
|
|
174
175
|
children: U?.name || "Subscription"
|
|
175
|
-
}), /* @__PURE__ */
|
|
176
|
-
status:
|
|
176
|
+
}), /* @__PURE__ */ _(n, {
|
|
177
|
+
status: Se,
|
|
177
178
|
dot: !0,
|
|
178
|
-
children:
|
|
179
|
+
children: ee(w.status)
|
|
179
180
|
})]
|
|
180
|
-
}), /* @__PURE__ */
|
|
181
|
+
}), /* @__PURE__ */ _("p", {
|
|
181
182
|
className: "text-sm text-text-secondary mt-1",
|
|
182
|
-
children: U?.pricingModel === o.PER_SEAT && U.pricePerSeat ? `${c(U.pricePerSeat, U.currency)} / seat / ${d(U.duration)} · ${
|
|
183
|
+
children: U?.pricingModel === o.PER_SEAT && U.pricePerSeat ? `${c(U.pricePerSeat, U.currency)} / seat / ${d(U.duration)} · ${w.seatCount ?? U.minSeats ?? 1} seats = ${c(U.pricePerSeat * (w.seatCount ?? U.minSeats ?? 1), U.currency)} / ${d(U.duration)}` : U ? `${c(U.price, U.currency)} / ${d(U.duration)}` : "Unknown plan"
|
|
183
184
|
})] })]
|
|
184
|
-
}), /* @__PURE__ */
|
|
185
|
+
}), /* @__PURE__ */ v("div", {
|
|
185
186
|
className: "flex items-center gap-2",
|
|
186
|
-
children: [
|
|
187
|
-
J &&
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
children: k ? "Canceling..." : "Cancel Subscription"
|
|
205
|
-
}),
|
|
206
|
-
E.canceledAt && /* @__PURE__ */ v("span", {
|
|
207
|
-
className: "px-4 py-2 text-sm font-medium text-status-warning-text bg-status-warning-bg-subtle rounded-button",
|
|
208
|
-
children: "Cancellation Scheduled"
|
|
209
|
-
})
|
|
210
|
-
]
|
|
187
|
+
children: [/* @__PURE__ */ _(ue, {
|
|
188
|
+
primary: J && S.canUpdateSubscription ? {
|
|
189
|
+
label: "Change Plan",
|
|
190
|
+
onSelect: () => y(p(`/subscriptions/${w.id}/upgrade`, C ?? w.billingAccountId))
|
|
191
|
+
} : void 0,
|
|
192
|
+
actions: [...J && S.canUpdateSubscription && U?.pricingModel === o.PER_SEAT ? [{
|
|
193
|
+
label: "Manage Seats",
|
|
194
|
+
onSelect: () => L(!0)
|
|
195
|
+
}] : [], ...J && S.canCancelSubscription && !w.canceledAt ? [{
|
|
196
|
+
label: O ? "Canceling…" : "Cancel Subscription",
|
|
197
|
+
onSelect: () => F(!0),
|
|
198
|
+
disabled: O,
|
|
199
|
+
intent: "destructive"
|
|
200
|
+
}] : []]
|
|
201
|
+
}), w.canceledAt && /* @__PURE__ */ _("span", {
|
|
202
|
+
className: "px-4 py-2 text-sm font-medium text-status-warning-text bg-status-warning-bg-subtle rounded-button",
|
|
203
|
+
children: "Cancellation Scheduled"
|
|
204
|
+
})]
|
|
211
205
|
})]
|
|
212
206
|
}),
|
|
213
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ v("div", {
|
|
214
208
|
className: "grid grid-cols-1 lg:grid-cols-3 gap-6",
|
|
215
|
-
children: [/* @__PURE__ */
|
|
209
|
+
children: [/* @__PURE__ */ v("div", {
|
|
216
210
|
className: "lg:col-span-2 space-y-6",
|
|
217
211
|
children: [
|
|
218
|
-
J && /* @__PURE__ */
|
|
212
|
+
J && /* @__PURE__ */ v(de, {
|
|
219
213
|
className: "p-5",
|
|
220
|
-
children: [/* @__PURE__ */
|
|
214
|
+
children: [/* @__PURE__ */ v("div", {
|
|
221
215
|
className: "flex items-center justify-between mb-4",
|
|
222
|
-
children: [/* @__PURE__ */
|
|
216
|
+
children: [/* @__PURE__ */ _("h2", {
|
|
223
217
|
className: "text-base font-semibold text-text-primary",
|
|
224
218
|
children: "Current Period"
|
|
225
|
-
}), /* @__PURE__ */
|
|
219
|
+
}), /* @__PURE__ */ v("span", {
|
|
226
220
|
className: "text-sm text-text-secondary tabular-nums",
|
|
227
221
|
children: [$, " days remaining"]
|
|
228
222
|
})]
|
|
229
|
-
}), /* @__PURE__ */
|
|
223
|
+
}), /* @__PURE__ */ v("div", {
|
|
230
224
|
className: "space-y-2",
|
|
231
|
-
children: [/* @__PURE__ */
|
|
232
|
-
value:
|
|
225
|
+
children: [/* @__PURE__ */ _(r, {
|
|
226
|
+
value: Te,
|
|
233
227
|
status: "primary",
|
|
234
228
|
size: "md",
|
|
235
229
|
"aria-label": "Billing period progress"
|
|
236
|
-
}), /* @__PURE__ */
|
|
230
|
+
}), /* @__PURE__ */ v("div", {
|
|
237
231
|
className: "flex items-center justify-between text-sm text-text-secondary",
|
|
238
|
-
children: [/* @__PURE__ */
|
|
232
|
+
children: [/* @__PURE__ */ _("span", { children: l(w.startDate, "short") }), /* @__PURE__ */ _("span", { children: l(w.endDate, "short") })]
|
|
239
233
|
})]
|
|
240
234
|
})]
|
|
241
235
|
}),
|
|
242
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ v(t, {
|
|
243
237
|
className: "overflow-hidden",
|
|
244
|
-
children: [/* @__PURE__ */
|
|
238
|
+
children: [/* @__PURE__ */ v("div", {
|
|
245
239
|
className: "p-5 border-b border-border-subtle",
|
|
246
|
-
children: [/* @__PURE__ */
|
|
240
|
+
children: [/* @__PURE__ */ v("h2", {
|
|
247
241
|
className: "text-base font-semibold text-text-primary",
|
|
248
|
-
children: ["Plan Quotas", W.length > 0 && /* @__PURE__ */
|
|
242
|
+
children: ["Plan Quotas", W.length > 0 && /* @__PURE__ */ v("span", {
|
|
249
243
|
className: "ml-2 text-sm font-normal text-text-muted tabular-nums",
|
|
250
244
|
children: [
|
|
251
245
|
"(",
|
|
@@ -253,84 +247,84 @@ var S = () => {
|
|
|
253
247
|
")"
|
|
254
248
|
]
|
|
255
249
|
})]
|
|
256
|
-
}), /* @__PURE__ */
|
|
250
|
+
}), /* @__PURE__ */ _("p", {
|
|
257
251
|
className: "text-sm text-text-secondary mt-0.5",
|
|
258
252
|
children: "Limits included in your plan"
|
|
259
253
|
})]
|
|
260
|
-
}), /* @__PURE__ */
|
|
254
|
+
}), /* @__PURE__ */ _("div", {
|
|
261
255
|
className: "p-5",
|
|
262
|
-
children: W.length === 0 ? /* @__PURE__ */
|
|
256
|
+
children: W.length === 0 ? /* @__PURE__ */ _("p", {
|
|
263
257
|
className: "text-sm text-text-secondary",
|
|
264
258
|
children: "No quotas assigned to this subscription."
|
|
265
|
-
}) : /* @__PURE__ */
|
|
259
|
+
}) : /* @__PURE__ */ _("div", {
|
|
266
260
|
className: "space-y-3",
|
|
267
|
-
children: W.map((e) => /* @__PURE__ */
|
|
261
|
+
children: W.map((e) => /* @__PURE__ */ _(fe, { quota: e }, e.id))
|
|
268
262
|
})
|
|
269
263
|
})]
|
|
270
264
|
}),
|
|
271
|
-
J &&
|
|
265
|
+
J && j && /* @__PURE__ */ v(t, {
|
|
272
266
|
className: "overflow-hidden",
|
|
273
267
|
children: [
|
|
274
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ v("div", {
|
|
275
269
|
className: "p-5 border-b border-border-subtle flex items-center justify-between gap-4",
|
|
276
|
-
children: [/* @__PURE__ */
|
|
270
|
+
children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("h2", {
|
|
277
271
|
className: "text-base font-semibold text-text-primary",
|
|
278
272
|
children: "Workspace Quotas"
|
|
279
|
-
}), /* @__PURE__ */
|
|
273
|
+
}), /* @__PURE__ */ _("p", {
|
|
280
274
|
className: "text-sm text-text-secondary mt-0.5",
|
|
281
275
|
children: "Active limits for your workspace"
|
|
282
|
-
})] }), X ? /* @__PURE__ */
|
|
276
|
+
})] }), X ? /* @__PURE__ */ _(n, {
|
|
283
277
|
status: "success",
|
|
284
278
|
dot: !0,
|
|
285
279
|
children: "Active"
|
|
286
|
-
}) : /* @__PURE__ */
|
|
280
|
+
}) : /* @__PURE__ */ _("button", {
|
|
287
281
|
type: "button",
|
|
288
282
|
onClick: () => R(!0),
|
|
289
283
|
className: "px-3 py-1.5 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors duration-200",
|
|
290
284
|
children: "Activate for Workspace"
|
|
291
285
|
})]
|
|
292
286
|
}),
|
|
293
|
-
/* @__PURE__ */
|
|
287
|
+
/* @__PURE__ */ _("div", {
|
|
294
288
|
className: "p-5",
|
|
295
|
-
children: X ? Y.length > 0 ? /* @__PURE__ */
|
|
289
|
+
children: X ? Y.length > 0 ? /* @__PURE__ */ _("div", {
|
|
296
290
|
className: "space-y-3",
|
|
297
|
-
children: Y.map((e) => /* @__PURE__ */
|
|
298
|
-
}) : /* @__PURE__ */
|
|
291
|
+
children: Y.map((e) => /* @__PURE__ */ _(pe, { item: e }, e.assignment.id))
|
|
292
|
+
}) : /* @__PURE__ */ v("p", {
|
|
299
293
|
className: "text-sm text-text-secondary",
|
|
300
294
|
children: [
|
|
301
295
|
"Quotas are activated on workspace",
|
|
302
296
|
" ",
|
|
303
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ _("span", {
|
|
304
298
|
className: "font-mono text-xs text-text-primary bg-bg-sunken/60 rounded px-1.5 py-0.5",
|
|
305
|
-
children:
|
|
299
|
+
children: w.assignedWorkspaceId
|
|
306
300
|
}),
|
|
307
301
|
". Usage data will appear here once quotas are consumed."
|
|
308
302
|
]
|
|
309
|
-
}) : /* @__PURE__ */
|
|
303
|
+
}) : /* @__PURE__ */ v("div", {
|
|
310
304
|
className: "flex items-start gap-3",
|
|
311
|
-
children: [/* @__PURE__ */
|
|
305
|
+
children: [/* @__PURE__ */ _("div", {
|
|
312
306
|
className: "size-8 rounded-full bg-status-warning-bg-subtle flex items-center justify-center shrink-0 mt-0.5",
|
|
313
|
-
children: /* @__PURE__ */
|
|
307
|
+
children: /* @__PURE__ */ _("svg", {
|
|
314
308
|
className: "size-4 text-status-warning-text",
|
|
315
309
|
fill: "none",
|
|
316
310
|
viewBox: "0 0 24 24",
|
|
317
311
|
stroke: "currentColor",
|
|
318
|
-
children: /* @__PURE__ */
|
|
312
|
+
children: /* @__PURE__ */ _("path", {
|
|
319
313
|
strokeLinecap: "round",
|
|
320
314
|
strokeLinejoin: "round",
|
|
321
315
|
strokeWidth: 2,
|
|
322
316
|
d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
|
|
323
317
|
})
|
|
324
318
|
})
|
|
325
|
-
}), /* @__PURE__ */
|
|
319
|
+
}), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
326
320
|
className: "text-sm font-medium text-text-primary",
|
|
327
321
|
children: "Workspace quotas not activated yet"
|
|
328
|
-
}), /* @__PURE__ */
|
|
322
|
+
}), /* @__PURE__ */ v("p", {
|
|
329
323
|
className: "text-sm text-text-secondary mt-0.5",
|
|
330
324
|
children: [
|
|
331
325
|
"Click",
|
|
332
326
|
" ",
|
|
333
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ _("button", {
|
|
334
328
|
type: "button",
|
|
335
329
|
onClick: () => R(!0),
|
|
336
330
|
className: "text-text-link hover:underline font-medium",
|
|
@@ -342,32 +336,32 @@ var S = () => {
|
|
|
342
336
|
})] })]
|
|
343
337
|
})
|
|
344
338
|
}),
|
|
345
|
-
|
|
346
|
-
billingAccountId:
|
|
347
|
-
subscriptionId:
|
|
339
|
+
be && /* @__PURE__ */ _(oe, {
|
|
340
|
+
billingAccountId: C ?? w.billingAccountId,
|
|
341
|
+
subscriptionId: w.id,
|
|
348
342
|
quotas: [],
|
|
349
343
|
workspaces: [{
|
|
350
|
-
id:
|
|
344
|
+
id: j,
|
|
351
345
|
name: "Current workspace"
|
|
352
346
|
}],
|
|
353
|
-
currentWorkspaceId:
|
|
347
|
+
currentWorkspaceId: j,
|
|
354
348
|
onAssigned: () => {
|
|
355
|
-
R(!1),
|
|
349
|
+
R(!1), E(), N();
|
|
356
350
|
},
|
|
357
351
|
onSkip: () => R(!1)
|
|
358
352
|
})
|
|
359
353
|
]
|
|
360
354
|
}),
|
|
361
|
-
G.length > 0 && /* @__PURE__ */
|
|
355
|
+
G.length > 0 && /* @__PURE__ */ v(t, {
|
|
362
356
|
className: "overflow-hidden",
|
|
363
|
-
children: [/* @__PURE__ */
|
|
357
|
+
children: [/* @__PURE__ */ _("div", {
|
|
364
358
|
className: "p-5 border-b border-border-subtle",
|
|
365
|
-
children: /* @__PURE__ */
|
|
359
|
+
children: /* @__PURE__ */ v("h2", {
|
|
366
360
|
className: "text-base font-semibold text-text-primary",
|
|
367
361
|
children: [
|
|
368
362
|
"Addons",
|
|
369
363
|
" ",
|
|
370
|
-
/* @__PURE__ */
|
|
364
|
+
/* @__PURE__ */ v("span", {
|
|
371
365
|
className: "text-sm font-normal text-text-muted tabular-nums",
|
|
372
366
|
children: [
|
|
373
367
|
"(",
|
|
@@ -377,31 +371,31 @@ var S = () => {
|
|
|
377
371
|
})
|
|
378
372
|
]
|
|
379
373
|
})
|
|
380
|
-
}), /* @__PURE__ */
|
|
374
|
+
}), /* @__PURE__ */ _("div", {
|
|
381
375
|
className: "p-5",
|
|
382
|
-
children: /* @__PURE__ */
|
|
376
|
+
children: /* @__PURE__ */ _("div", {
|
|
383
377
|
className: "space-y-3",
|
|
384
|
-
children: G.map((e) => /* @__PURE__ */
|
|
378
|
+
children: G.map((e) => /* @__PURE__ */ _(me, { addonSubscription: e }, e.id))
|
|
385
379
|
})
|
|
386
380
|
})]
|
|
387
381
|
}),
|
|
388
|
-
K.length > 0 && /* @__PURE__ */
|
|
382
|
+
K.length > 0 && /* @__PURE__ */ v(t, {
|
|
389
383
|
className: "overflow-hidden",
|
|
390
384
|
children: [
|
|
391
|
-
/* @__PURE__ */
|
|
385
|
+
/* @__PURE__ */ _("div", {
|
|
392
386
|
className: "p-5 border-b border-border-subtle",
|
|
393
|
-
children: /* @__PURE__ */
|
|
387
|
+
children: /* @__PURE__ */ _("h2", {
|
|
394
388
|
className: "text-base font-semibold text-text-primary",
|
|
395
389
|
children: "Recent Transactions"
|
|
396
390
|
})
|
|
397
391
|
}),
|
|
398
|
-
/* @__PURE__ */
|
|
392
|
+
/* @__PURE__ */ _("div", {
|
|
399
393
|
className: "divide-y divide-border-subtle",
|
|
400
|
-
children: K.slice(0, 5).map((e) => /* @__PURE__ */
|
|
394
|
+
children: K.slice(0, 5).map((e) => /* @__PURE__ */ _(he, { transaction: e }, e.id))
|
|
401
395
|
}),
|
|
402
|
-
K.length > 5 && /* @__PURE__ */
|
|
396
|
+
K.length > 5 && /* @__PURE__ */ _("div", {
|
|
403
397
|
className: "p-4 text-center border-t border-border-subtle",
|
|
404
|
-
children: /* @__PURE__ */
|
|
398
|
+
children: /* @__PURE__ */ _("button", {
|
|
405
399
|
type: "button",
|
|
406
400
|
className: "text-sm text-text-link hover:underline",
|
|
407
401
|
children: "View all transactions"
|
|
@@ -410,140 +404,140 @@ var S = () => {
|
|
|
410
404
|
]
|
|
411
405
|
})
|
|
412
406
|
]
|
|
413
|
-
}), /* @__PURE__ */
|
|
414
|
-
className: "space-y-6",
|
|
415
|
-
children: [/* @__PURE__ */
|
|
407
|
+
}), /* @__PURE__ */ v("div", {
|
|
408
|
+
className: "space-y-6 lg:sticky lg:top-6 lg:self-start",
|
|
409
|
+
children: [/* @__PURE__ */ v(t, {
|
|
416
410
|
className: "overflow-hidden",
|
|
417
|
-
children: [/* @__PURE__ */
|
|
411
|
+
children: [/* @__PURE__ */ _("div", {
|
|
418
412
|
className: "p-5 border-b border-border-subtle",
|
|
419
|
-
children: /* @__PURE__ */
|
|
413
|
+
children: /* @__PURE__ */ _("h2", {
|
|
420
414
|
className: "text-base font-semibold text-text-primary",
|
|
421
415
|
children: "Details"
|
|
422
416
|
})
|
|
423
|
-
}), /* @__PURE__ */
|
|
417
|
+
}), /* @__PURE__ */ v("div", {
|
|
424
418
|
className: "p-5 space-y-4",
|
|
425
419
|
children: [
|
|
426
|
-
/* @__PURE__ */
|
|
420
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
427
421
|
className: "text-sm text-text-secondary",
|
|
428
422
|
children: "Subscription ID"
|
|
429
|
-
}), /* @__PURE__ */
|
|
423
|
+
}), /* @__PURE__ */ _("p", {
|
|
430
424
|
className: "font-mono text-sm text-text-primary mt-0.5 break-all",
|
|
431
|
-
children:
|
|
425
|
+
children: w.id
|
|
432
426
|
})] }),
|
|
433
|
-
/* @__PURE__ */
|
|
427
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
434
428
|
className: "text-sm text-text-secondary",
|
|
435
429
|
children: "Plan"
|
|
436
|
-
}), /* @__PURE__ */
|
|
430
|
+
}), /* @__PURE__ */ _("p", {
|
|
437
431
|
className: "text-sm text-text-primary mt-0.5",
|
|
438
432
|
children: U?.name || "Unknown"
|
|
439
433
|
})] }),
|
|
440
|
-
/* @__PURE__ */
|
|
434
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
441
435
|
className: "text-sm text-text-secondary",
|
|
442
436
|
children: "Billing Account"
|
|
443
|
-
}), /* @__PURE__ */
|
|
437
|
+
}), /* @__PURE__ */ _("p", {
|
|
444
438
|
className: "text-sm text-text-primary mt-0.5",
|
|
445
|
-
children:
|
|
439
|
+
children: w.billingAccount?.name || "Unknown"
|
|
446
440
|
})] }),
|
|
447
|
-
/* @__PURE__ */
|
|
441
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
448
442
|
className: "text-sm text-text-secondary",
|
|
449
443
|
children: "Start Date"
|
|
450
|
-
}), /* @__PURE__ */
|
|
444
|
+
}), /* @__PURE__ */ _("p", {
|
|
451
445
|
className: "text-sm text-text-primary mt-0.5",
|
|
452
|
-
children: l(
|
|
446
|
+
children: l(w.startDate)
|
|
453
447
|
})] }),
|
|
454
|
-
/* @__PURE__ */
|
|
448
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
455
449
|
className: "text-sm text-text-secondary",
|
|
456
450
|
children: "End Date"
|
|
457
|
-
}), /* @__PURE__ */
|
|
451
|
+
}), /* @__PURE__ */ _("p", {
|
|
458
452
|
className: "text-sm text-text-primary mt-0.5",
|
|
459
|
-
children: l(
|
|
453
|
+
children: l(w.endDate)
|
|
460
454
|
})] }),
|
|
461
|
-
|
|
455
|
+
w.nextBillingDate && /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
462
456
|
className: "text-sm text-text-secondary",
|
|
463
457
|
children: "Next Billing"
|
|
464
|
-
}), /* @__PURE__ */
|
|
458
|
+
}), /* @__PURE__ */ _("p", {
|
|
465
459
|
className: "text-sm text-text-primary mt-0.5",
|
|
466
|
-
children: l(
|
|
460
|
+
children: l(w.nextBillingDate)
|
|
467
461
|
})] }),
|
|
468
|
-
/* @__PURE__ */
|
|
462
|
+
/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
469
463
|
className: "text-sm text-text-secondary",
|
|
470
464
|
children: "Auto Renewal"
|
|
471
|
-
}), /* @__PURE__ */
|
|
465
|
+
}), /* @__PURE__ */ _("p", {
|
|
472
466
|
className: "text-sm text-text-primary mt-0.5",
|
|
473
|
-
children:
|
|
467
|
+
children: w.autoRenewal ? "Enabled" : "Disabled"
|
|
474
468
|
})] }),
|
|
475
|
-
|
|
469
|
+
w.paymentGateway && /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
476
470
|
className: "text-sm text-text-secondary",
|
|
477
471
|
children: "Payment Gateway"
|
|
478
|
-
}), /* @__PURE__ */
|
|
472
|
+
}), /* @__PURE__ */ _("p", {
|
|
479
473
|
className: "text-sm text-text-primary mt-0.5 capitalize",
|
|
480
|
-
children:
|
|
474
|
+
children: w.paymentGateway
|
|
481
475
|
})] })
|
|
482
476
|
]
|
|
483
477
|
})]
|
|
484
|
-
}), q.length > 0 && /* @__PURE__ */
|
|
478
|
+
}), q.length > 0 && /* @__PURE__ */ v(t, {
|
|
485
479
|
className: "overflow-hidden",
|
|
486
|
-
children: [/* @__PURE__ */
|
|
480
|
+
children: [/* @__PURE__ */ _("div", {
|
|
487
481
|
className: "p-5 border-b border-border-subtle",
|
|
488
|
-
children: /* @__PURE__ */
|
|
482
|
+
children: /* @__PURE__ */ _("h2", {
|
|
489
483
|
className: "text-base font-semibold text-text-primary",
|
|
490
484
|
children: "History"
|
|
491
485
|
})
|
|
492
|
-
}), /* @__PURE__ */
|
|
486
|
+
}), /* @__PURE__ */ _("div", {
|
|
493
487
|
className: "p-5",
|
|
494
|
-
children: /* @__PURE__ */
|
|
488
|
+
children: /* @__PURE__ */ _("div", {
|
|
495
489
|
className: "space-y-3",
|
|
496
|
-
children: q.slice(0, 5).map((e) => /* @__PURE__ */
|
|
490
|
+
children: q.slice(0, 5).map((e) => /* @__PURE__ */ _(ge, { item: e }, e.id))
|
|
497
491
|
})
|
|
498
492
|
})]
|
|
499
493
|
})]
|
|
500
494
|
})]
|
|
501
495
|
}),
|
|
502
|
-
|
|
503
|
-
subscription:
|
|
496
|
+
I && w && /* @__PURE__ */ _(h, {
|
|
497
|
+
subscription: w,
|
|
504
498
|
onClose: () => L(!1),
|
|
505
499
|
onConfirm: async (e) => {
|
|
506
|
-
await
|
|
507
|
-
subscriptionId:
|
|
500
|
+
await k({
|
|
501
|
+
subscriptionId: w.id,
|
|
508
502
|
seatCount: e
|
|
509
|
-
}), await
|
|
503
|
+
}), await E();
|
|
510
504
|
},
|
|
511
|
-
isLoading:
|
|
505
|
+
isLoading: A
|
|
512
506
|
}),
|
|
513
|
-
|
|
507
|
+
P && /* @__PURE__ */ v("div", {
|
|
514
508
|
className: "fixed inset-0 z-50 flex items-center justify-center",
|
|
515
|
-
children: [/* @__PURE__ */
|
|
509
|
+
children: [/* @__PURE__ */ _("div", {
|
|
516
510
|
className: "absolute inset-0 bg-overlay-scrim",
|
|
517
|
-
onClick: () =>
|
|
518
|
-
}), /* @__PURE__ */
|
|
519
|
-
className: "relative bg-bg-elevated border border-border-
|
|
511
|
+
onClick: () => F(!1)
|
|
512
|
+
}), /* @__PURE__ */ v("div", {
|
|
513
|
+
className: "relative bg-bg-elevated border border-border-seam rounded-card shadow-[var(--shadow-elevation-4)] w-full max-w-md mx-4 p-6",
|
|
520
514
|
role: "dialog",
|
|
521
515
|
"aria-modal": "true",
|
|
522
516
|
"aria-labelledby": "cancel-subscription-title",
|
|
523
517
|
children: [
|
|
524
|
-
/* @__PURE__ */
|
|
518
|
+
/* @__PURE__ */ _("h3", {
|
|
525
519
|
id: "cancel-subscription-title",
|
|
526
520
|
className: "text-lg font-semibold text-text-primary mb-2",
|
|
527
521
|
children: "Cancel Subscription"
|
|
528
522
|
}),
|
|
529
|
-
/* @__PURE__ */
|
|
523
|
+
/* @__PURE__ */ v("p", {
|
|
530
524
|
className: "text-sm text-text-secondary mb-4",
|
|
531
525
|
children: [
|
|
532
526
|
"Are you sure you want to cancel this subscription? Your subscription will remain active until",
|
|
533
527
|
" ",
|
|
534
|
-
/* @__PURE__ */
|
|
528
|
+
/* @__PURE__ */ _("span", {
|
|
535
529
|
className: "font-medium text-text-primary",
|
|
536
|
-
children: l(
|
|
530
|
+
children: l(w.endDate)
|
|
537
531
|
}),
|
|
538
532
|
", but will not renew automatically."
|
|
539
533
|
]
|
|
540
534
|
}),
|
|
541
|
-
/* @__PURE__ */
|
|
535
|
+
/* @__PURE__ */ v("div", {
|
|
542
536
|
className: "mb-4",
|
|
543
|
-
children: [/* @__PURE__ */
|
|
537
|
+
children: [/* @__PURE__ */ _("label", {
|
|
544
538
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
545
539
|
children: "Reason for cancellation (optional)"
|
|
546
|
-
}), /* @__PURE__ */
|
|
540
|
+
}), /* @__PURE__ */ _("textarea", {
|
|
547
541
|
value: z,
|
|
548
542
|
onChange: (e) => B(e.target.value),
|
|
549
543
|
placeholder: "Please share why you're canceling...",
|
|
@@ -551,28 +545,28 @@ var S = () => {
|
|
|
551
545
|
rows: 3
|
|
552
546
|
})]
|
|
553
547
|
}),
|
|
554
|
-
V && /* @__PURE__ */
|
|
548
|
+
V && /* @__PURE__ */ _("div", {
|
|
555
549
|
className: "mb-4 p-3 bg-status-error-bg-subtle border border-status-error-border rounded-card",
|
|
556
|
-
children: /* @__PURE__ */
|
|
550
|
+
children: /* @__PURE__ */ _("p", {
|
|
557
551
|
className: "text-sm text-status-error-text",
|
|
558
552
|
children: V
|
|
559
553
|
})
|
|
560
554
|
}),
|
|
561
|
-
/* @__PURE__ */
|
|
555
|
+
/* @__PURE__ */ v("div", {
|
|
562
556
|
className: "flex items-center justify-end gap-3",
|
|
563
|
-
children: [/* @__PURE__ */
|
|
557
|
+
children: [/* @__PURE__ */ _("button", {
|
|
564
558
|
type: "button",
|
|
565
559
|
onClick: () => {
|
|
566
|
-
|
|
560
|
+
F(!1), B(""), H(null);
|
|
567
561
|
},
|
|
568
562
|
className: "px-4 py-2 text-sm font-medium text-text-secondary hover:text-text-primary transition-colors",
|
|
569
563
|
children: "Keep Subscription"
|
|
570
|
-
}), /* @__PURE__ */
|
|
564
|
+
}), /* @__PURE__ */ _("button", {
|
|
571
565
|
type: "button",
|
|
572
|
-
onClick:
|
|
573
|
-
disabled:
|
|
566
|
+
onClick: xe,
|
|
567
|
+
disabled: O,
|
|
574
568
|
className: "px-4 py-2 text-sm font-medium bg-action-danger-bg text-action-danger-text rounded-button hover:bg-action-danger-bgHover transition-colors duration-200 disabled:opacity-50",
|
|
575
|
-
children:
|
|
569
|
+
children: O ? "Canceling..." : "Confirm Cancellation"
|
|
576
570
|
})]
|
|
577
571
|
})
|
|
578
572
|
]
|
|
@@ -580,23 +574,23 @@ var S = () => {
|
|
|
580
574
|
})
|
|
581
575
|
]
|
|
582
576
|
});
|
|
583
|
-
},
|
|
584
|
-
let t = e.context, n =
|
|
585
|
-
return /* @__PURE__ */
|
|
586
|
-
className: "p-4 rounded-card border border-border-
|
|
577
|
+
}, fe = ({ quota: e }) => {
|
|
578
|
+
let t = e.context, n = y(e.name, t), r = t?.description && typeof t.description == "string" ? t.description : null, i = e.limits?.value ?? 0, a = e.currentUsageSum ?? 0, o = i > 0 ? Math.min(100, a / i * 100) : 0, c = e.name.includes("bytes") || e.name.includes("storage"), d = e.quotaType === "POOLED";
|
|
579
|
+
return /* @__PURE__ */ v("div", {
|
|
580
|
+
className: "p-4 rounded-card border border-border-seam bg-bg-surface",
|
|
587
581
|
children: [
|
|
588
|
-
/* @__PURE__ */
|
|
582
|
+
/* @__PURE__ */ v("div", {
|
|
589
583
|
className: "flex items-start justify-between gap-4 mb-2",
|
|
590
|
-
children: [/* @__PURE__ */
|
|
584
|
+
children: [/* @__PURE__ */ v("div", {
|
|
591
585
|
className: "min-w-0",
|
|
592
|
-
children: [/* @__PURE__ */
|
|
586
|
+
children: [/* @__PURE__ */ _("p", {
|
|
593
587
|
className: "font-medium text-text-primary truncate",
|
|
594
588
|
children: n
|
|
595
|
-
}), r && /* @__PURE__ */
|
|
589
|
+
}), r && /* @__PURE__ */ _("p", {
|
|
596
590
|
className: "text-xs text-text-secondary mt-0.5 line-clamp-2",
|
|
597
591
|
children: r
|
|
598
592
|
})]
|
|
599
|
-
}), /* @__PURE__ */
|
|
593
|
+
}), /* @__PURE__ */ v("span", {
|
|
600
594
|
className: "text-sm font-medium text-text-primary shrink-0 tabular-nums",
|
|
601
595
|
children: [
|
|
602
596
|
c ? s(a) : a.toLocaleString(),
|
|
@@ -605,21 +599,21 @@ var S = () => {
|
|
|
605
599
|
]
|
|
606
600
|
})]
|
|
607
601
|
}),
|
|
608
|
-
i > 0 && /* @__PURE__ */
|
|
602
|
+
i > 0 && /* @__PURE__ */ _("div", {
|
|
609
603
|
className: "h-1.5 rounded-full bg-bg-sunken overflow-hidden mb-2",
|
|
610
|
-
children: /* @__PURE__ */
|
|
611
|
-
className: `h-full rounded-full transition-all duration-300 ${
|
|
604
|
+
children: /* @__PURE__ */ _("div", {
|
|
605
|
+
className: `h-full rounded-full transition-all duration-300 ${f(o)}`,
|
|
612
606
|
style: { width: `${o}%` }
|
|
613
607
|
})
|
|
614
608
|
}),
|
|
615
|
-
/* @__PURE__ */
|
|
609
|
+
/* @__PURE__ */ v("div", {
|
|
616
610
|
className: "flex items-center justify-between text-xs text-text-secondary",
|
|
617
|
-
children: [/* @__PURE__ */
|
|
611
|
+
children: [/* @__PURE__ */ _("span", {
|
|
618
612
|
className: "px-1.5 py-0.5 rounded bg-bg-sunken font-medium",
|
|
619
613
|
children: d ? "Shared" : "Per Workspace"
|
|
620
|
-
}), /* @__PURE__ */
|
|
614
|
+
}), /* @__PURE__ */ v("div", {
|
|
621
615
|
className: "flex items-center gap-3",
|
|
622
|
-
children: [e.endtime && /* @__PURE__ */
|
|
616
|
+
children: [e.endtime && /* @__PURE__ */ v("span", { children: ["Expires ", l(e.endtime, "short")] }), i > 0 && /* @__PURE__ */ v("span", {
|
|
623
617
|
className: o >= 90 ? "text-status-error-text font-medium" : o >= 70 ? "text-status-warning-text font-medium" : "",
|
|
624
618
|
children: [u(o), " used"]
|
|
625
619
|
})]
|
|
@@ -627,23 +621,23 @@ var S = () => {
|
|
|
627
621
|
})
|
|
628
622
|
]
|
|
629
623
|
});
|
|
630
|
-
},
|
|
631
|
-
let { assignment: t, effectiveUsed: n, usagePercentage: r } = e, i =
|
|
632
|
-
return /* @__PURE__ */
|
|
633
|
-
className: "p-4 rounded-card border border-border-
|
|
624
|
+
}, pe = ({ item: e }) => {
|
|
625
|
+
let { assignment: t, effectiveUsed: n, usagePercentage: r } = e, i = y(t.quotaName), a = !t.noLimit && t.limit !== null, o = t.limit ?? 0, c = t.quotaName.includes("bytes") || t.quotaName.includes("storage"), d = b(t.resetPeriod);
|
|
626
|
+
return /* @__PURE__ */ v("div", {
|
|
627
|
+
className: "p-4 rounded-card border border-border-seam bg-bg-surface",
|
|
634
628
|
children: [
|
|
635
|
-
/* @__PURE__ */
|
|
629
|
+
/* @__PURE__ */ v("div", {
|
|
636
630
|
className: "flex items-start justify-between gap-4 mb-2",
|
|
637
|
-
children: [/* @__PURE__ */
|
|
631
|
+
children: [/* @__PURE__ */ v("div", {
|
|
638
632
|
className: "min-w-0",
|
|
639
|
-
children: [/* @__PURE__ */
|
|
633
|
+
children: [/* @__PURE__ */ _("p", {
|
|
640
634
|
className: "font-medium text-text-primary truncate",
|
|
641
635
|
children: i
|
|
642
|
-
}), /* @__PURE__ */
|
|
636
|
+
}), /* @__PURE__ */ v("p", {
|
|
643
637
|
className: "text-xs text-text-secondary mt-0.5",
|
|
644
638
|
children: [t.quotaMode === "pooled" ? "Pooled across workspaces" : "Dedicated", d && ` · ${d}`]
|
|
645
639
|
})]
|
|
646
|
-
}), /* @__PURE__ */
|
|
640
|
+
}), /* @__PURE__ */ v("span", {
|
|
647
641
|
className: "text-sm font-medium text-text-primary shrink-0 tabular-nums",
|
|
648
642
|
children: [
|
|
649
643
|
c ? s(n) : n.toLocaleString(),
|
|
@@ -652,83 +646,83 @@ var S = () => {
|
|
|
652
646
|
]
|
|
653
647
|
})]
|
|
654
648
|
}),
|
|
655
|
-
a && /* @__PURE__ */
|
|
649
|
+
a && /* @__PURE__ */ _("div", {
|
|
656
650
|
className: "h-1.5 rounded-full bg-bg-sunken overflow-hidden mb-2",
|
|
657
|
-
children: /* @__PURE__ */
|
|
658
|
-
className: `h-full rounded-full transition-all duration-300 ${
|
|
651
|
+
children: /* @__PURE__ */ _("div", {
|
|
652
|
+
className: `h-full rounded-full transition-all duration-300 ${f(r)}`,
|
|
659
653
|
style: { width: `${Math.min(100, r)}%` }
|
|
660
654
|
})
|
|
661
655
|
}),
|
|
662
|
-
/* @__PURE__ */
|
|
656
|
+
/* @__PURE__ */ v("div", {
|
|
663
657
|
className: "flex items-center justify-between text-xs text-text-secondary",
|
|
664
|
-
children: [/* @__PURE__ */
|
|
658
|
+
children: [/* @__PURE__ */ v("span", { children: ["Since ", l(t.createdAt, "short")] }), a && /* @__PURE__ */ v("span", {
|
|
665
659
|
className: r >= 90 ? "text-status-error-text font-medium" : r >= 70 ? "text-status-warning-text font-medium" : "",
|
|
666
660
|
children: [u(r), " used"]
|
|
667
661
|
})]
|
|
668
662
|
})
|
|
669
663
|
]
|
|
670
664
|
});
|
|
671
|
-
},
|
|
665
|
+
}, me = ({ addonSubscription: e }) => {
|
|
672
666
|
let t = e.addon;
|
|
673
|
-
return /* @__PURE__ */
|
|
674
|
-
className: "flex items-center justify-between p-3 rounded-card border border-border-
|
|
675
|
-
children: [/* @__PURE__ */
|
|
667
|
+
return /* @__PURE__ */ v("div", {
|
|
668
|
+
className: "flex items-center justify-between p-3 rounded-card border border-border-seam bg-bg-sunken",
|
|
669
|
+
children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
676
670
|
className: "font-medium text-text-primary",
|
|
677
671
|
children: t?.name || "Unknown Addon"
|
|
678
|
-
}), /* @__PURE__ */
|
|
672
|
+
}), /* @__PURE__ */ v("p", {
|
|
679
673
|
className: "text-sm text-text-secondary",
|
|
680
674
|
children: ["Qty: ", e.quantity]
|
|
681
|
-
})] }), t && /* @__PURE__ */
|
|
675
|
+
})] }), t && /* @__PURE__ */ _("p", {
|
|
682
676
|
className: "text-sm font-medium text-text-primary tabular-nums",
|
|
683
677
|
children: c(t.price * e.quantity, t.currency)
|
|
684
678
|
})]
|
|
685
679
|
});
|
|
686
|
-
},
|
|
680
|
+
}, he = ({ transaction: e }) => /* @__PURE__ */ v("div", {
|
|
687
681
|
className: "flex items-center justify-between px-5 py-4 hover:bg-bg-sunken transition-colors",
|
|
688
|
-
children: [/* @__PURE__ */
|
|
682
|
+
children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
|
|
689
683
|
className: "font-medium text-text-primary capitalize",
|
|
690
684
|
children: e.type
|
|
691
|
-
}), /* @__PURE__ */
|
|
685
|
+
}), /* @__PURE__ */ _("p", {
|
|
692
686
|
className: "text-sm text-text-secondary",
|
|
693
687
|
children: l(e.createdAt, "short")
|
|
694
|
-
})] }), /* @__PURE__ */
|
|
688
|
+
})] }), /* @__PURE__ */ v("div", {
|
|
695
689
|
className: "text-right",
|
|
696
|
-
children: [/* @__PURE__ */
|
|
690
|
+
children: [/* @__PURE__ */ v("p", {
|
|
697
691
|
className: `font-medium tabular-nums ${e.type === "refund" ? "text-status-error-text" : "text-text-primary"}`,
|
|
698
692
|
children: [e.type === "refund" ? "-" : "", c(e.amount, e.currency)]
|
|
699
|
-
}), /* @__PURE__ */
|
|
693
|
+
}), /* @__PURE__ */ _("p", {
|
|
700
694
|
className: "text-sm text-text-secondary capitalize",
|
|
701
695
|
children: e.status
|
|
702
696
|
})]
|
|
703
697
|
})]
|
|
704
|
-
}),
|
|
698
|
+
}), ge = ({ item: e }) => /* @__PURE__ */ v("div", {
|
|
705
699
|
className: "flex items-start gap-3",
|
|
706
|
-
children: [/* @__PURE__ */
|
|
707
|
-
/* @__PURE__ */
|
|
700
|
+
children: [/* @__PURE__ */ _("div", { className: "size-2 rounded-full bg-text-muted mt-2 shrink-0" }), /* @__PURE__ */ v("div", { children: [
|
|
701
|
+
/* @__PURE__ */ v("p", {
|
|
708
702
|
className: "text-sm text-text-primary",
|
|
709
703
|
children: [
|
|
710
|
-
/* @__PURE__ */
|
|
704
|
+
/* @__PURE__ */ _("span", {
|
|
711
705
|
className: "capitalize",
|
|
712
706
|
children: e.fromStatus
|
|
713
707
|
}),
|
|
714
708
|
" → ",
|
|
715
|
-
/* @__PURE__ */
|
|
709
|
+
/* @__PURE__ */ _("span", {
|
|
716
710
|
className: "capitalize font-medium",
|
|
717
711
|
children: e.toStatus
|
|
718
712
|
})
|
|
719
713
|
]
|
|
720
714
|
}),
|
|
721
|
-
e.reason && /* @__PURE__ */
|
|
715
|
+
e.reason && /* @__PURE__ */ _("p", {
|
|
722
716
|
className: "text-xs text-text-secondary mt-0.5",
|
|
723
717
|
children: e.reason
|
|
724
718
|
}),
|
|
725
|
-
/* @__PURE__ */
|
|
719
|
+
/* @__PURE__ */ _("p", {
|
|
726
720
|
className: "text-xs text-text-secondary mt-0.5",
|
|
727
721
|
children: l(e.createdAt, "short")
|
|
728
722
|
})
|
|
729
723
|
] })]
|
|
730
724
|
});
|
|
731
725
|
//#endregion
|
|
732
|
-
export {
|
|
726
|
+
export { x as SubscriptionDetailPage };
|
|
733
727
|
|
|
734
728
|
//# sourceMappingURL=SubscriptionDetailPage.js.map
|