@burdenoff/microfe-billing 2026.625.4 → 2026.626.1
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/modules/addons/pages/AddonBrowseDetailPage.js +192 -187
- package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonCreatePage.js +322 -317
- package/dist/billing/modules/addons/pages/AddonCreatePage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonDetailPage.js +190 -185
- package/dist/billing/modules/addons/pages/AddonDetailPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonEditPage.js +297 -292
- package/dist/billing/modules/addons/pages/AddonEditPage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +60 -75
- package/dist/billing/modules/addons/pages/AddonsBrowsePage.js.map +1 -1
- package/dist/billing/modules/addons/pages/AddonsListPage.js +86 -101
- package/dist/billing/modules/addons/pages/AddonsListPage.js.map +1 -1
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +124 -121
- package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js +103 -111
- package/dist/billing/modules/analytics/pages/AnalyticsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +196 -160
- package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/InvoicesListPage.js +58 -73
- package/dist/billing/modules/billing/pages/InvoicesListPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +65 -75
- package/dist/billing/modules/billing/pages/PaymentMethodsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/RefundsPage.js +399 -399
- package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/TransactionsPage.js +49 -48
- package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
- package/dist/billing/modules/billing/pages/UserRefundsPage.js +144 -151
- package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
- package/dist/billing/modules/checkout/pages/CheckoutPage.js +430 -425
- package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js +121 -93
- package/dist/billing/modules/coupons/pages/CouponDetailPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CouponsListPage.js +154 -152
- package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js +467 -462
- package/dist/billing/modules/coupons/pages/CreateCouponPage.js.map +1 -1
- package/dist/billing/modules/coupons/pages/EditCouponPage.js +294 -286
- package/dist/billing/modules/coupons/pages/EditCouponPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js +123 -117
- package/dist/billing/modules/credits/pages/AdminCreditsPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +43 -42
- package/dist/billing/modules/credits/pages/CreditTransactionsPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +192 -207
- package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -1
- package/dist/billing/modules/credits/pages/CreditsPage.js +40 -56
- package/dist/billing/modules/credits/pages/CreditsPage.js.map +1 -1
- package/dist/billing/modules/dashboard/pages/OverviewPage.js +128 -121
- package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js +165 -180
- package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/EarningsPage.js +103 -100
- package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +175 -175
- package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
- package/dist/billing/modules/earnings/pages/PayoutsPage.js +96 -96
- package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +42 -40
- package/dist/billing/modules/plans/pages/PlanAssignFreePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +45 -38
- package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanCreatePage.js +339 -334
- package/dist/billing/modules/plans/pages/PlanCreatePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanDetailPage.js +80 -74
- package/dist/billing/modules/plans/pages/PlanDetailPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlanEditPage.js +342 -337
- package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js +38 -53
- package/dist/billing/modules/plans/pages/PlansBrowsePage.js.map +1 -1
- package/dist/billing/modules/plans/pages/PlansListPage.js +60 -75
- package/dist/billing/modules/plans/pages/PlansListPage.js.map +1 -1
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +242 -237
- package/dist/billing/modules/promotions/pages/CreatePromotionPage.js.map +1 -1
- package/dist/billing/modules/promotions/pages/PromotionsListPage.js +29 -39
- package/dist/billing/modules/promotions/pages/PromotionsListPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaPage.js +1 -0
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +299 -294
- package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +191 -186
- package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +308 -303
- package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js.map +1 -1
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +57 -78
- package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/SettingsPage.js +79 -78
- package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +15 -13
- package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +338 -299
- package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +82 -103
- package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js.map +1 -1
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +59 -54
- package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
- package/dist/billing/modules/usage/pages/UsagePage.js +172 -215
- package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
- package/package.json +2 -2
|
@@ -13,21 +13,22 @@ import { useEffect as l, useState as u } from "react";
|
|
|
13
13
|
import { useParams as d } from "react-router-dom";
|
|
14
14
|
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
15
15
|
import { useI18n as m } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
16
|
+
import { PagePurpose as h } from "@burdenoff/fe-libs/ui";
|
|
16
17
|
//#region src/billing/modules/quota/pages/QuotaTemplateEditPage.tsx
|
|
17
|
-
var
|
|
18
|
-
let { t:
|
|
19
|
-
let n =
|
|
18
|
+
var g = () => {
|
|
19
|
+
let { t: g } = m(), _ = (e, t) => {
|
|
20
|
+
let n = g(e);
|
|
20
21
|
return n === e ? t : n;
|
|
21
|
-
}, { quotaId:
|
|
22
|
+
}, { quotaId: v } = d(), y = o(), b = a(), { quota: x, isLoading: S, error: C, refetch: w } = s(v), { updateQuota: T, isUpdating: E } = c(), [D, O] = u(""), [k, A] = u(""), [j, M] = u(""), [N, P] = u("numeric"), [F, I] = u(""), [L, R] = u(""), [z, B] = u(!1), [V, H] = u(r.NEVER), [U, W] = u(!0), [G, K] = u(null), [q, J] = u(!1);
|
|
22
23
|
return l(() => {
|
|
23
|
-
if (
|
|
24
|
-
|
|
25
|
-
let e =
|
|
26
|
-
|
|
27
|
-
let t =
|
|
28
|
-
|
|
24
|
+
if (x) {
|
|
25
|
+
O(x.name ?? ""), B(x.reusable ?? !1), H(x.resetPeriod ?? r.NEVER), W(x.isActive ?? !0);
|
|
26
|
+
let e = x.limits;
|
|
27
|
+
P(e?.type ?? "numeric"), I(String(e?.value ?? "")), R(e?.unit ?? "");
|
|
28
|
+
let t = x.context;
|
|
29
|
+
A(t?.displayName ?? ""), M(t?.description ?? "");
|
|
29
30
|
}
|
|
30
|
-
}, [
|
|
31
|
+
}, [x]), b.canManageQuotas ? S ? /* @__PURE__ */ p("div", {
|
|
31
32
|
className: "space-y-6 p-6",
|
|
32
33
|
children: [/* @__PURE__ */ f("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ f("div", {
|
|
33
34
|
className: "max-w-2xl space-y-4",
|
|
@@ -38,322 +39,326 @@ var h = () => {
|
|
|
38
39
|
4
|
|
39
40
|
].map((e) => /* @__PURE__ */ f("div", { className: "h-16 bg-bg-sunken animate-pulse rounded" }, e))
|
|
40
41
|
})]
|
|
41
|
-
}) :
|
|
42
|
+
}) : C && i(C) ? /* @__PURE__ */ f("div", {
|
|
42
43
|
className: "p-6",
|
|
43
44
|
children: /* @__PURE__ */ f(n, {
|
|
44
45
|
title: "Server Unavailable",
|
|
45
46
|
message: "Unable to load quota. The server might be down or experiencing issues.",
|
|
46
|
-
onRetry: () =>
|
|
47
|
+
onRetry: () => w(),
|
|
47
48
|
showRetry: !0
|
|
48
49
|
})
|
|
49
|
-
}) :
|
|
50
|
+
}) : x ? /* @__PURE__ */ p("div", {
|
|
50
51
|
className: "space-y-6 p-6",
|
|
51
|
-
children: [
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
if (!I.trim()) {
|
|
65
|
-
G("Unit is required (e.g., bots, GB, seats)");
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
let t = {
|
|
69
|
-
id: _,
|
|
70
|
-
name: E.trim(),
|
|
71
|
-
limits: {
|
|
72
|
-
type: M,
|
|
73
|
-
value: Number(P),
|
|
74
|
-
unit: I.trim()
|
|
75
|
-
},
|
|
76
|
-
reusable: R,
|
|
77
|
-
isActive: H,
|
|
78
|
-
resetPeriod: B,
|
|
79
|
-
context: {
|
|
80
|
-
displayName: O.trim() || E.trim(),
|
|
81
|
-
description: A.trim()
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ f(t, {
|
|
54
|
+
title: `Edit Quota: ${x.context?.displayName ?? x.name}`,
|
|
55
|
+
description: "Update the quota template configuration"
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ f(h, { children: "Adjust this quota template's configuration. Changes apply wherever the template is referenced, so review which plans and add-ons use it before changing its type or unit." }),
|
|
58
|
+
/* @__PURE__ */ p("form", {
|
|
59
|
+
onSubmit: async (e) => {
|
|
60
|
+
if (e.preventDefault(), K(null), J(!1), !D.trim()) {
|
|
61
|
+
K("Quota name is required");
|
|
62
|
+
return;
|
|
82
63
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
64
|
+
if (!F || isNaN(Number(F)) || Number(F) < 0) {
|
|
65
|
+
K("Valid limit value is required");
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (!L.trim()) {
|
|
69
|
+
K("Unit is required (e.g., bots, GB, seats)");
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
let t = {
|
|
73
|
+
id: v,
|
|
74
|
+
name: D.trim(),
|
|
75
|
+
limits: {
|
|
76
|
+
type: N,
|
|
77
|
+
value: Number(F),
|
|
78
|
+
unit: L.trim()
|
|
79
|
+
},
|
|
80
|
+
reusable: z,
|
|
81
|
+
isActive: U,
|
|
82
|
+
resetPeriod: V,
|
|
83
|
+
context: {
|
|
84
|
+
displayName: k.trim() || D.trim(),
|
|
85
|
+
description: j.trim()
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
try {
|
|
89
|
+
await T(t), J(!0), setTimeout(() => y(`/quotas/${v}`), 1500);
|
|
90
|
+
} catch (e) {
|
|
91
|
+
K(e instanceof Error ? e.message : "Failed to update quota");
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
className: "max-w-2xl space-y-6",
|
|
95
|
+
children: [
|
|
96
|
+
G && /* @__PURE__ */ f("div", {
|
|
97
|
+
className: "p-4 bg-status-error-bg-subtle border border-border-subtle rounded-lg",
|
|
98
|
+
children: /* @__PURE__ */ f("p", {
|
|
99
|
+
className: "text-sm text-status-error-text",
|
|
100
|
+
children: G
|
|
113
101
|
})
|
|
114
|
-
}),
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
"
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
102
|
+
}),
|
|
103
|
+
q && /* @__PURE__ */ f("div", {
|
|
104
|
+
className: "p-4 bg-status-success-bg-subtle border border-border-subtle rounded-lg",
|
|
105
|
+
children: /* @__PURE__ */ f("p", {
|
|
106
|
+
className: "text-sm text-status-success-text",
|
|
107
|
+
children: "Quota updated successfully! Redirecting…"
|
|
108
|
+
})
|
|
109
|
+
}),
|
|
110
|
+
/* @__PURE__ */ p("div", {
|
|
111
|
+
className: "border border-border-seam rounded-card bg-bg-surface overflow-hidden shadow-[var(--shadow-elevation-1)]",
|
|
112
|
+
children: [/* @__PURE__ */ f("div", {
|
|
113
|
+
className: "p-4 border-b border-border-subtle bg-bg-sunken/30",
|
|
114
|
+
children: /* @__PURE__ */ f("h2", {
|
|
115
|
+
className: "font-semibold text-text-primary",
|
|
116
|
+
children: "Basic Information"
|
|
117
|
+
})
|
|
118
|
+
}), /* @__PURE__ */ p("div", {
|
|
119
|
+
className: "p-4 space-y-4",
|
|
120
|
+
children: [
|
|
121
|
+
/* @__PURE__ */ p("div", { children: [
|
|
122
|
+
/* @__PURE__ */ f("label", {
|
|
123
|
+
htmlFor: "name",
|
|
124
|
+
className: "block text-sm font-medium text-text-primary mb-1",
|
|
125
|
+
children: "Quota Key *"
|
|
126
|
+
}),
|
|
127
|
+
/* @__PURE__ */ f("input", {
|
|
128
|
+
id: "name",
|
|
129
|
+
type: "text",
|
|
130
|
+
value: D,
|
|
131
|
+
onChange: (e) => O(e.target.value),
|
|
132
|
+
className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] font-mono text-sm",
|
|
133
|
+
placeholder: "e.g., sessions-started, tunnels-created",
|
|
134
|
+
required: !0
|
|
135
|
+
}),
|
|
136
|
+
/* @__PURE__ */ p("p", {
|
|
137
|
+
className: "text-xs text-text-muted mt-1",
|
|
138
|
+
children: [
|
|
139
|
+
"Internal machine key, must match the ",
|
|
140
|
+
/* @__PURE__ */ f("code", { children: "quotaName" }),
|
|
141
|
+
" used in",
|
|
142
|
+
" ",
|
|
143
|
+
/* @__PURE__ */ f("code", { children: "@usage" }),
|
|
144
|
+
" directives. Never shown to users."
|
|
145
|
+
]
|
|
146
|
+
})
|
|
147
|
+
] }),
|
|
148
|
+
/* @__PURE__ */ p("div", { children: [
|
|
149
|
+
/* @__PURE__ */ f("label", {
|
|
150
|
+
htmlFor: "displayName",
|
|
151
|
+
className: "block text-sm font-medium text-text-primary mb-1",
|
|
152
|
+
children: "Display Name *"
|
|
153
|
+
}),
|
|
154
|
+
/* @__PURE__ */ f("input", {
|
|
155
|
+
id: "displayName",
|
|
156
|
+
type: "text",
|
|
157
|
+
value: k,
|
|
158
|
+
onChange: (e) => A(e.target.value),
|
|
159
|
+
className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
160
|
+
placeholder: "e.g., Tunnels, Session Starts, Webhooks",
|
|
161
|
+
required: !0
|
|
162
|
+
}),
|
|
163
|
+
/* @__PURE__ */ f("p", {
|
|
164
|
+
className: "text-xs text-text-muted mt-1",
|
|
165
|
+
children: "Human-readable name shown to users in billing and usage UI."
|
|
166
|
+
})
|
|
167
|
+
] }),
|
|
168
|
+
/* @__PURE__ */ p("div", { children: [
|
|
169
|
+
/* @__PURE__ */ f("label", {
|
|
170
|
+
htmlFor: "description",
|
|
171
|
+
className: "block text-sm font-medium text-text-primary mb-1",
|
|
172
|
+
children: "Description"
|
|
173
|
+
}),
|
|
174
|
+
/* @__PURE__ */ f("textarea", {
|
|
175
|
+
id: "description",
|
|
176
|
+
value: j,
|
|
177
|
+
onChange: (e) => M(e.target.value),
|
|
178
|
+
rows: 2,
|
|
179
|
+
className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] resize-none",
|
|
180
|
+
placeholder: "e.g., Active tunnels created through VibeControls (slot freed on delete)"
|
|
181
|
+
}),
|
|
182
|
+
/* @__PURE__ */ f("p", {
|
|
183
|
+
className: "text-xs text-text-muted mt-1",
|
|
184
|
+
children: "Short explanation shown in billing and usage detail views."
|
|
185
|
+
})
|
|
186
|
+
] }),
|
|
187
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
167
188
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
168
|
-
children: "
|
|
169
|
-
}),
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
189
|
+
children: "Quota Type"
|
|
190
|
+
}), /* @__PURE__ */ p("div", {
|
|
191
|
+
className: "px-3 py-2 border border-border-subtle rounded-md bg-bg-sunken/50 text-text-muted",
|
|
192
|
+
children: [x.quotaType === "POOLED" ? "Pooled" : "Product Specific", /* @__PURE__ */ f("span", {
|
|
193
|
+
className: "text-xs ml-2",
|
|
194
|
+
children: "(cannot be changed)"
|
|
195
|
+
})]
|
|
196
|
+
})] }),
|
|
197
|
+
/* @__PURE__ */ p("div", {
|
|
198
|
+
className: "flex items-center gap-3",
|
|
199
|
+
children: [/* @__PURE__ */ f("input", {
|
|
200
|
+
id: "reusable",
|
|
201
|
+
type: "checkbox",
|
|
202
|
+
checked: z,
|
|
203
|
+
onChange: (e) => B(e.target.checked),
|
|
204
|
+
className: "size-4 rounded border-border-subtle text-text-link focus:ring-[var(--color-focus-ring)]"
|
|
205
|
+
}), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
206
|
+
htmlFor: "reusable",
|
|
207
|
+
className: "text-sm font-medium text-text-primary",
|
|
208
|
+
children: "Reusable Quota"
|
|
209
|
+
}), /* @__PURE__ */ f("p", {
|
|
210
|
+
className: "text-xs text-text-muted",
|
|
211
|
+
children: "Enable for quotas like seats or bots that can be freed up"
|
|
212
|
+
})] })]
|
|
177
213
|
}),
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
|
|
180
|
-
|
|
214
|
+
/* @__PURE__ */ p("div", { children: [
|
|
215
|
+
/* @__PURE__ */ f("label", {
|
|
216
|
+
htmlFor: "resetPeriod",
|
|
217
|
+
className: "block text-sm font-medium text-text-primary mb-1",
|
|
218
|
+
children: "Reset Period"
|
|
219
|
+
}),
|
|
220
|
+
/* @__PURE__ */ p("select", {
|
|
221
|
+
id: "resetPeriod",
|
|
222
|
+
value: V,
|
|
223
|
+
onChange: (e) => H(e.target.value),
|
|
224
|
+
className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
225
|
+
children: [
|
|
226
|
+
/* @__PURE__ */ f("option", {
|
|
227
|
+
value: r.NEVER,
|
|
228
|
+
children: "Never (one-time limit)"
|
|
229
|
+
}),
|
|
230
|
+
/* @__PURE__ */ f("option", {
|
|
231
|
+
value: r.DAILY,
|
|
232
|
+
children: "Daily (resets every day)"
|
|
233
|
+
}),
|
|
234
|
+
/* @__PURE__ */ f("option", {
|
|
235
|
+
value: r.MONTHLY,
|
|
236
|
+
children: "Monthly (resets every month)"
|
|
237
|
+
})
|
|
238
|
+
]
|
|
239
|
+
}),
|
|
240
|
+
/* @__PURE__ */ f("p", {
|
|
241
|
+
className: "text-xs text-text-muted mt-1",
|
|
242
|
+
children: "How often the quota usage counter is reset to zero"
|
|
243
|
+
})
|
|
244
|
+
] }),
|
|
245
|
+
/* @__PURE__ */ p("div", {
|
|
246
|
+
className: "flex items-center gap-3",
|
|
247
|
+
children: [/* @__PURE__ */ f("input", {
|
|
248
|
+
id: "isActive",
|
|
249
|
+
type: "checkbox",
|
|
250
|
+
checked: U,
|
|
251
|
+
onChange: (e) => W(e.target.checked),
|
|
252
|
+
className: "size-4 rounded border-border-subtle text-text-link focus:ring-[var(--color-focus-ring)]"
|
|
253
|
+
}), /* @__PURE__ */ f("label", {
|
|
254
|
+
htmlFor: "isActive",
|
|
255
|
+
className: "text-sm font-medium text-text-primary",
|
|
256
|
+
children: "Quota is active"
|
|
257
|
+
})]
|
|
181
258
|
})
|
|
182
|
-
]
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
})
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
checked: R,
|
|
199
|
-
onChange: (e) => z(e.target.checked),
|
|
200
|
-
className: "size-4 rounded border-border-subtle text-text-link focus:ring-[var(--color-focus-ring)]"
|
|
201
|
-
}), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
202
|
-
htmlFor: "reusable",
|
|
203
|
-
className: "text-sm font-medium text-text-primary",
|
|
204
|
-
children: "Reusable Quota"
|
|
205
|
-
}), /* @__PURE__ */ f("p", {
|
|
206
|
-
className: "text-xs text-text-muted",
|
|
207
|
-
children: "Enable for quotas like seats or bots that can be freed up"
|
|
208
|
-
})] })]
|
|
209
|
-
}),
|
|
210
|
-
/* @__PURE__ */ p("div", { children: [
|
|
211
|
-
/* @__PURE__ */ f("label", {
|
|
212
|
-
htmlFor: "resetPeriod",
|
|
259
|
+
]
|
|
260
|
+
})]
|
|
261
|
+
}),
|
|
262
|
+
/* @__PURE__ */ p("div", {
|
|
263
|
+
className: "border border-border-seam rounded-card bg-bg-surface overflow-hidden shadow-[var(--shadow-elevation-1)]",
|
|
264
|
+
children: [/* @__PURE__ */ f("div", {
|
|
265
|
+
className: "p-4 border-b border-border-subtle bg-bg-sunken/30",
|
|
266
|
+
children: /* @__PURE__ */ f("h2", {
|
|
267
|
+
className: "font-semibold text-text-primary",
|
|
268
|
+
children: "Limits Configuration"
|
|
269
|
+
})
|
|
270
|
+
}), /* @__PURE__ */ p("div", {
|
|
271
|
+
className: "p-4 space-y-4",
|
|
272
|
+
children: [
|
|
273
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
274
|
+
htmlFor: "limitType",
|
|
213
275
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
214
|
-
children: "
|
|
215
|
-
}),
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
onChange: (e) => V(e.target.value),
|
|
276
|
+
children: "Limit Type *"
|
|
277
|
+
}), /* @__PURE__ */ p("select", {
|
|
278
|
+
id: "limitType",
|
|
279
|
+
value: N,
|
|
280
|
+
onChange: (e) => P(e.target.value),
|
|
220
281
|
className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
221
282
|
children: [
|
|
222
283
|
/* @__PURE__ */ f("option", {
|
|
223
|
-
value:
|
|
224
|
-
children: "
|
|
284
|
+
value: "numeric",
|
|
285
|
+
children: "Numeric (count)"
|
|
225
286
|
}),
|
|
226
287
|
/* @__PURE__ */ f("option", {
|
|
227
|
-
value:
|
|
228
|
-
children: "
|
|
288
|
+
value: "storage",
|
|
289
|
+
children: "Storage (bytes)"
|
|
229
290
|
}),
|
|
230
291
|
/* @__PURE__ */ f("option", {
|
|
231
|
-
value:
|
|
232
|
-
children: "
|
|
292
|
+
value: "duration",
|
|
293
|
+
children: "Duration (seconds)"
|
|
294
|
+
}),
|
|
295
|
+
/* @__PURE__ */ f("option", {
|
|
296
|
+
value: "percentage",
|
|
297
|
+
children: "Percentage"
|
|
233
298
|
})
|
|
234
299
|
]
|
|
235
|
-
}),
|
|
236
|
-
/* @__PURE__ */
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
/* @__PURE__ */ p("div", {
|
|
242
|
-
className: "flex items-center gap-3",
|
|
243
|
-
children: [/* @__PURE__ */ f("input", {
|
|
244
|
-
id: "isActive",
|
|
245
|
-
type: "checkbox",
|
|
246
|
-
checked: H,
|
|
247
|
-
onChange: (e) => U(e.target.checked),
|
|
248
|
-
className: "size-4 rounded border-border-subtle text-text-link focus:ring-[var(--color-focus-ring)]"
|
|
249
|
-
}), /* @__PURE__ */ f("label", {
|
|
250
|
-
htmlFor: "isActive",
|
|
251
|
-
className: "text-sm font-medium text-text-primary",
|
|
252
|
-
children: "Quota is active"
|
|
253
|
-
})]
|
|
254
|
-
})
|
|
255
|
-
]
|
|
256
|
-
})]
|
|
257
|
-
}),
|
|
258
|
-
/* @__PURE__ */ p("div", {
|
|
259
|
-
className: "border border-border-seam rounded-card bg-bg-surface overflow-hidden shadow-[var(--shadow-elevation-1)]",
|
|
260
|
-
children: [/* @__PURE__ */ f("div", {
|
|
261
|
-
className: "p-4 border-b border-border-subtle bg-bg-sunken/30",
|
|
262
|
-
children: /* @__PURE__ */ f("h2", {
|
|
263
|
-
className: "font-semibold text-text-primary",
|
|
264
|
-
children: "Limits Configuration"
|
|
265
|
-
})
|
|
266
|
-
}), /* @__PURE__ */ p("div", {
|
|
267
|
-
className: "p-4 space-y-4",
|
|
268
|
-
children: [
|
|
269
|
-
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
270
|
-
htmlFor: "limitType",
|
|
271
|
-
className: "block text-sm font-medium text-text-primary mb-1",
|
|
272
|
-
children: "Limit Type *"
|
|
273
|
-
}), /* @__PURE__ */ p("select", {
|
|
274
|
-
id: "limitType",
|
|
275
|
-
value: M,
|
|
276
|
-
onChange: (e) => N(e.target.value),
|
|
277
|
-
className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
278
|
-
children: [
|
|
279
|
-
/* @__PURE__ */ f("option", {
|
|
280
|
-
value: "numeric",
|
|
281
|
-
children: "Numeric (count)"
|
|
300
|
+
})] }),
|
|
301
|
+
/* @__PURE__ */ p("div", { children: [
|
|
302
|
+
/* @__PURE__ */ f("label", {
|
|
303
|
+
htmlFor: "limitValue",
|
|
304
|
+
className: "block text-sm font-medium text-text-primary mb-1",
|
|
305
|
+
children: "Limit Value *"
|
|
282
306
|
}),
|
|
283
|
-
/* @__PURE__ */ f("
|
|
284
|
-
|
|
285
|
-
|
|
307
|
+
/* @__PURE__ */ f("input", {
|
|
308
|
+
id: "limitValue",
|
|
309
|
+
type: "number",
|
|
310
|
+
min: "0",
|
|
311
|
+
value: F,
|
|
312
|
+
onChange: (e) => I(e.target.value),
|
|
313
|
+
className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
314
|
+
placeholder: "1000",
|
|
315
|
+
required: !0
|
|
286
316
|
}),
|
|
287
|
-
/* @__PURE__ */ f("
|
|
288
|
-
|
|
289
|
-
children: "
|
|
317
|
+
/* @__PURE__ */ f("p", {
|
|
318
|
+
className: "text-xs text-text-muted mt-1",
|
|
319
|
+
children: "The maximum limit value for this quota"
|
|
320
|
+
})
|
|
321
|
+
] }),
|
|
322
|
+
/* @__PURE__ */ p("div", { children: [
|
|
323
|
+
/* @__PURE__ */ f("label", {
|
|
324
|
+
htmlFor: "unit",
|
|
325
|
+
className: "block text-sm font-medium text-text-primary mb-1",
|
|
326
|
+
children: "Unit *"
|
|
290
327
|
}),
|
|
291
|
-
/* @__PURE__ */ f("
|
|
292
|
-
|
|
293
|
-
|
|
328
|
+
/* @__PURE__ */ f("input", {
|
|
329
|
+
id: "unit",
|
|
330
|
+
type: "text",
|
|
331
|
+
value: L,
|
|
332
|
+
onChange: (e) => R(e.target.value),
|
|
333
|
+
className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
334
|
+
placeholder: "e.g., bots, GB, MB, seats, workflow runs",
|
|
335
|
+
required: !0
|
|
336
|
+
}),
|
|
337
|
+
/* @__PURE__ */ f("p", {
|
|
338
|
+
className: "text-xs text-text-muted mt-1",
|
|
339
|
+
children: "The unit of measurement displayed with usage values (e.g., \"2/6 bots\")"
|
|
294
340
|
})
|
|
295
|
-
]
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
})
|
|
317
|
-
] }),
|
|
318
|
-
/* @__PURE__ */ p("div", { children: [
|
|
319
|
-
/* @__PURE__ */ f("label", {
|
|
320
|
-
htmlFor: "unit",
|
|
321
|
-
className: "block text-sm font-medium text-text-primary mb-1",
|
|
322
|
-
children: "Unit *"
|
|
323
|
-
}),
|
|
324
|
-
/* @__PURE__ */ f("input", {
|
|
325
|
-
id: "unit",
|
|
326
|
-
type: "text",
|
|
327
|
-
value: I,
|
|
328
|
-
onChange: (e) => L(e.target.value),
|
|
329
|
-
className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
330
|
-
placeholder: "e.g., bots, GB, MB, seats, workflow runs",
|
|
331
|
-
required: !0
|
|
332
|
-
}),
|
|
333
|
-
/* @__PURE__ */ f("p", {
|
|
334
|
-
className: "text-xs text-text-muted mt-1",
|
|
335
|
-
children: "The unit of measurement displayed with usage values (e.g., \"2/6 bots\")"
|
|
336
|
-
})
|
|
337
|
-
] })
|
|
338
|
-
]
|
|
339
|
-
})]
|
|
340
|
-
}),
|
|
341
|
-
/* @__PURE__ */ p("div", {
|
|
342
|
-
className: "flex items-center gap-3 pt-4",
|
|
343
|
-
children: [/* @__PURE__ */ f("button", {
|
|
344
|
-
type: "submit",
|
|
345
|
-
disabled: T,
|
|
346
|
-
className: "px-6 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors disabled:opacity-50",
|
|
347
|
-
children: T ? g("billing.quota.saving", "Saving...") : g("billing.quota.saveChanges", "Save Changes")
|
|
348
|
-
}), /* @__PURE__ */ f("button", {
|
|
349
|
-
type: "button",
|
|
350
|
-
onClick: () => v(`/quotas/${_}`),
|
|
351
|
-
className: "px-6 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
|
|
352
|
-
children: "Cancel"
|
|
353
|
-
})]
|
|
354
|
-
})
|
|
355
|
-
]
|
|
356
|
-
})]
|
|
341
|
+
] })
|
|
342
|
+
]
|
|
343
|
+
})]
|
|
344
|
+
}),
|
|
345
|
+
/* @__PURE__ */ p("div", {
|
|
346
|
+
className: "flex items-center gap-3 pt-4",
|
|
347
|
+
children: [/* @__PURE__ */ f("button", {
|
|
348
|
+
type: "submit",
|
|
349
|
+
disabled: E,
|
|
350
|
+
className: "px-6 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors disabled:opacity-50",
|
|
351
|
+
children: E ? _("billing.quota.saving", "Saving...") : _("billing.quota.saveChanges", "Save Changes")
|
|
352
|
+
}), /* @__PURE__ */ f("button", {
|
|
353
|
+
type: "button",
|
|
354
|
+
onClick: () => y(`/quotas/${v}`),
|
|
355
|
+
className: "px-6 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",
|
|
356
|
+
children: "Cancel"
|
|
357
|
+
})]
|
|
358
|
+
})
|
|
359
|
+
]
|
|
360
|
+
})
|
|
361
|
+
]
|
|
357
362
|
}) : /* @__PURE__ */ f("div", {
|
|
358
363
|
className: "flex items-center justify-center h-full min-h-[400px]",
|
|
359
364
|
children: /* @__PURE__ */ p("div", {
|
|
@@ -363,7 +368,7 @@ var h = () => {
|
|
|
363
368
|
children: "Quota not found"
|
|
364
369
|
}), /* @__PURE__ */ f("button", {
|
|
365
370
|
type: "button",
|
|
366
|
-
onClick: () =>
|
|
371
|
+
onClick: () => y("/quotas"),
|
|
367
372
|
className: "px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover",
|
|
368
373
|
children: "Back to Quotas"
|
|
369
374
|
})]
|
|
@@ -371,6 +376,6 @@ var h = () => {
|
|
|
371
376
|
}) : /* @__PURE__ */ f(e, { message: "You don't have permission to edit quotas." });
|
|
372
377
|
};
|
|
373
378
|
//#endregion
|
|
374
|
-
export {
|
|
379
|
+
export { g as QuotaTemplateEditPage };
|
|
375
380
|
|
|
376
381
|
//# sourceMappingURL=QuotaTemplateEditPage.js.map
|