@dashadmin/dash-admin 1.3.74-srcfree.3 → 1.3.74
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.
|
@@ -19,7 +19,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
19
19
|
});
|
|
20
20
|
};
|
|
21
21
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
22
|
-
import { useCallback, useEffect, useState } from "react";
|
|
22
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
23
23
|
import { Loading, useNotify, useRecordContext, useRefresh, useTranslate } from "react-admin";
|
|
24
24
|
import {
|
|
25
25
|
Alert,
|
|
@@ -52,10 +52,10 @@ import CloseIcon from "@mui/icons-material/Close";
|
|
|
52
52
|
import useAxios from "../../hooks/axios";
|
|
53
53
|
const prettyKey = (key) => key.replace(/^max_/, "Max ").replace(/_/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
|
54
54
|
const formatDate = (iso) => iso ? new Date(iso).toLocaleDateString() : "\u2014";
|
|
55
|
-
const formatPrice = (prices, fallback) => {
|
|
55
|
+
const formatPrice = (prices, fallback, freeLabel = "Free") => {
|
|
56
56
|
const entries = Object.entries(prices != null ? prices : {});
|
|
57
57
|
if (!entries.length) {
|
|
58
|
-
return fallback ? String(fallback) :
|
|
58
|
+
return fallback ? String(fallback) : freeLabel;
|
|
59
59
|
}
|
|
60
60
|
return entries.map(([code, value]) => {
|
|
61
61
|
const amount = code === "CLP" ? value : value / 100;
|
|
@@ -80,11 +80,16 @@ const statusColor = (status) => {
|
|
|
80
80
|
return (_a = { active: "success", trial: "info", trialing: "info", past_due: "warning", canceled: "error", cancelled: "error" }[(status != null ? status : "").toLowerCase()]) != null ? _a : "default";
|
|
81
81
|
};
|
|
82
82
|
const TenancyPlanPanel = ({ tenancyId }) => {
|
|
83
|
-
var _a, _b, _c, _d, _e
|
|
84
|
-
const { axios } = useAxios();
|
|
83
|
+
var _a, _b, _c, _d, _e;
|
|
84
|
+
const { axios: freshAxios } = useAxios();
|
|
85
|
+
const axiosRef = useRef(freshAxios);
|
|
86
|
+
const axios = axiosRef.current;
|
|
85
87
|
const notify = useNotify();
|
|
86
88
|
const refresh = useRefresh();
|
|
87
89
|
const translate = useTranslate();
|
|
90
|
+
const tv = (group, value) => value ? translate(`tenancy.plan.${group}.${String(value).toLowerCase()}`, { _: String(value) }) : "";
|
|
91
|
+
const price = (prices, fallback) => formatPrice(prices, fallback, translate("tenancy.plan.free", { _: "Free" }));
|
|
92
|
+
const cycle = (c) => tv("cycle", c != null ? c : "monthly");
|
|
88
93
|
const [data, setData] = useState(null);
|
|
89
94
|
const [error, setError] = useState(null);
|
|
90
95
|
const [drawerOpen, setDrawerOpen] = useState(false);
|
|
@@ -99,9 +104,9 @@ const TenancyPlanPanel = ({ tenancyId }) => {
|
|
|
99
104
|
setData((_b2 = (_a2 = res.data) == null ? void 0 : _a2.data) != null ? _b2 : null);
|
|
100
105
|
setError(null);
|
|
101
106
|
} catch (e) {
|
|
102
|
-
setError(((_d2 = (_c2 = e == null ? void 0 : e.response) == null ? void 0 : _c2.data) == null ? void 0 : _d2.message) || "Could not load the plan");
|
|
107
|
+
setError(((_d2 = (_c2 = e == null ? void 0 : e.response) == null ? void 0 : _c2.data) == null ? void 0 : _d2.message) || translate("tenancy.plan.load_failed", { _: "Could not load the plan" }));
|
|
103
108
|
}
|
|
104
|
-
}), [
|
|
109
|
+
}), [tenancyId]);
|
|
105
110
|
useEffect(() => {
|
|
106
111
|
load();
|
|
107
112
|
}, [load]);
|
|
@@ -137,8 +142,17 @@ const TenancyPlanPanel = ({ tenancyId }) => {
|
|
|
137
142
|
/* @__PURE__ */ jsx(Card, { variant: "outlined", sx: { maxWidth: 720 }, children: /* @__PURE__ */ jsx(CardActionArea, { onClick: () => setDrawerOpen(true), children: /* @__PURE__ */ jsxs(CardContent, { children: [
|
|
138
143
|
/* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, useFlexGap: true, sx: { mb: 1, alignItems: "center", flexWrap: "wrap" }, children: [
|
|
139
144
|
/* @__PURE__ */ jsx(Typography, { variant: "overline", color: "text.secondary", children: translate("tenancy.plan.current", { _: "Current plan" }) }),
|
|
140
|
-
subscription && /* @__PURE__ */ jsx(Chip, { size: "small", color: statusColor(subscription.status), label: subscription.status }),
|
|
141
|
-
(subscription == null ? void 0 : subscription.subscription_state) && /* @__PURE__ */ jsx(Chip, { size: "small", variant: "outlined", label: subscription.subscription_state }),
|
|
145
|
+
subscription && /* @__PURE__ */ jsx(Chip, { size: "small", color: statusColor(subscription.status), label: tv("status", subscription.status) }),
|
|
146
|
+
(subscription == null ? void 0 : subscription.subscription_state) && /* @__PURE__ */ jsx(Chip, { size: "small", variant: "outlined", label: tv("status", subscription.subscription_state) }),
|
|
147
|
+
(plan == null ? void 0 : plan.subscription_plan_type) && /* @__PURE__ */ jsx(
|
|
148
|
+
Chip,
|
|
149
|
+
{
|
|
150
|
+
size: "small",
|
|
151
|
+
variant: "outlined",
|
|
152
|
+
color: plan.subscription_plan_type === "internal" ? "secondary" : "default",
|
|
153
|
+
label: tv("type", plan.subscription_plan_type)
|
|
154
|
+
}
|
|
155
|
+
),
|
|
142
156
|
(subscription == null ? void 0 : subscription.pending_plan) && /* @__PURE__ */ jsx(
|
|
143
157
|
Chip,
|
|
144
158
|
{
|
|
@@ -149,7 +163,7 @@ const TenancyPlanPanel = ({ tenancyId }) => {
|
|
|
149
163
|
)
|
|
150
164
|
] }),
|
|
151
165
|
/* @__PURE__ */ jsx(Typography, { variant: "h5", children: (_a = plan == null ? void 0 : plan.name) != null ? _a : translate("tenancy.plan.none", { _: "No plan" }) }),
|
|
152
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "text.secondary", sx: { mt: 0.5 }, children: plan ? `${
|
|
166
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "text.secondary", sx: { mt: 0.5 }, children: plan ? `${price(plan.prices, plan.price)} / ${cycle(plan.billing_cycle)}` : "" }),
|
|
153
167
|
/* @__PURE__ */ jsxs(Typography, { variant: "body2", color: "text.secondary", sx: { mt: 1.5 }, children: [
|
|
154
168
|
translate("tenancy.plan.renews", { _: "Current period ends" }),
|
|
155
169
|
": ",
|
|
@@ -168,26 +182,31 @@ const TenancyPlanPanel = ({ tenancyId }) => {
|
|
|
168
182
|
sx: { zIndex: (theme) => theme.zIndex.modal + 2 },
|
|
169
183
|
children: /* @__PURE__ */ jsxs(Box, { sx: { width: { xs: "100vw", sm: 560 }, p: 2 }, children: [
|
|
170
184
|
/* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", mb: 1 }, children: [
|
|
171
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: (
|
|
172
|
-
/* @__PURE__ */ jsx(IconButton, { onClick: () => setDrawerOpen(false), size: "small", "aria-label": "Close", children: /* @__PURE__ */ jsx(CloseIcon, {}) })
|
|
185
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: (_b = plan == null ? void 0 : plan.name) != null ? _b : "\u2014" }),
|
|
186
|
+
/* @__PURE__ */ jsx(IconButton, { onClick: () => setDrawerOpen(false), size: "small", "aria-label": translate("ra.action.close", { _: "Close" }), children: /* @__PURE__ */ jsx(CloseIcon, {}) })
|
|
173
187
|
] }),
|
|
174
188
|
/* @__PURE__ */ jsx(Divider, { sx: { mb: 2 } }),
|
|
175
189
|
/* @__PURE__ */ jsx(Typography, { variant: "subtitle2", gutterBottom: true, children: translate("tenancy.plan.subscription", { _: "Subscription" }) }),
|
|
176
190
|
/* @__PURE__ */ jsx(Table, { size: "small", sx: { mb: 3 }, children: /* @__PURE__ */ jsx(TableBody, { children: [
|
|
177
|
-
["Status", subscription == null ? void 0 : subscription.status],
|
|
178
|
-
["State", subscription == null ? void 0 : subscription.subscription_state],
|
|
179
|
-
["Account", data.tenancy.account_status],
|
|
180
|
-
["
|
|
181
|
-
[
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
["
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
+
["status", "Status", tv("status", subscription == null ? void 0 : subscription.status)],
|
|
192
|
+
["state", "State", tv("status", subscription == null ? void 0 : subscription.subscription_state)],
|
|
193
|
+
["account", "Account", tv("status", data.tenancy.account_status)],
|
|
194
|
+
["plan_type", "Plan type", tv("type", plan == null ? void 0 : plan.subscription_plan_type)],
|
|
195
|
+
[
|
|
196
|
+
"gateway",
|
|
197
|
+
"Payment gateway",
|
|
198
|
+
tv("gateway", (_d = (_c = subscription == null ? void 0 : subscription.payment_gateway) != null ? _c : data.tenancy.gateway_type) != null ? _d : "internal")
|
|
199
|
+
],
|
|
200
|
+
["period_start", "Period start", formatDate(subscription == null ? void 0 : subscription.current_period_start)],
|
|
201
|
+
["period_end", "Period end", formatDate(subscription == null ? void 0 : subscription.current_period_end)],
|
|
202
|
+
["trial_ends", "Trial ends", formatDate(subscription == null ? void 0 : subscription.trial_ends_at)],
|
|
203
|
+
["cancels_at", "Cancels at", formatDate(subscription == null ? void 0 : subscription.cancels_at)],
|
|
204
|
+
["tier", "Plan tier", plan == null ? void 0 : plan.tier],
|
|
205
|
+
["trial_days", "Trial days (plan)", plan == null ? void 0 : plan.trial_days]
|
|
206
|
+
].map(([key, label, v]) => /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
207
|
+
/* @__PURE__ */ jsx(TableCell, { sx: { color: "text.secondary", width: "45%" }, children: translate(`tenancy.plan.field.${key}`, { _: String(label) }) }),
|
|
208
|
+
/* @__PURE__ */ jsx(TableCell, { children: v === "" || v == null ? "\u2014" : v })
|
|
209
|
+
] }, String(key))) }) }),
|
|
191
210
|
/* @__PURE__ */ jsx(Typography, { variant: "subtitle2", gutterBottom: true, children: translate("tenancy.plan.limits", { _: "Limits" }) }),
|
|
192
211
|
/* @__PURE__ */ jsxs(Table, { size: "small", sx: { mb: 3 }, children: [
|
|
193
212
|
/* @__PURE__ */ jsx(TableHead, { children: /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
@@ -200,8 +219,8 @@ const TenancyPlanPanel = ({ tenancyId }) => {
|
|
|
200
219
|
data.usage.map((u) => {
|
|
201
220
|
var _a2;
|
|
202
221
|
return /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
203
|
-
/* @__PURE__ */ jsx(TableCell, { children: prettyKey(u.key) }),
|
|
204
|
-
/* @__PURE__ */ jsx(TableCell, { align: "right", children: u.unlimited ? "Unlimited" : u.limit }),
|
|
222
|
+
/* @__PURE__ */ jsx(TableCell, { children: translate(`tenancy.plan.limit_name.${u.key}`, { _: prettyKey(u.key) }) }),
|
|
223
|
+
/* @__PURE__ */ jsx(TableCell, { align: "right", children: u.unlimited ? translate("tenancy.plan.unlimited", { _: "Unlimited" }) : u.limit }),
|
|
205
224
|
/* @__PURE__ */ jsx(TableCell, { align: "right", children: (_a2 = u.current) != null ? _a2 : "\u2014" })
|
|
206
225
|
] }, u.key);
|
|
207
226
|
})
|
|
@@ -211,7 +230,14 @@ const TenancyPlanPanel = ({ tenancyId }) => {
|
|
|
211
230
|
/* @__PURE__ */ jsx(Box, { sx: { mb: 3, display: "flex", gap: 0.5, flexWrap: "wrap" }, children: (() => {
|
|
212
231
|
const addons = plan == null ? void 0 : plan.addons;
|
|
213
232
|
const enabled = Array.isArray(addons) ? addons : Object.entries(addons != null ? addons : {}).filter(([, on]) => !!on).map(([k]) => k);
|
|
214
|
-
return enabled.length ? enabled.map((a) => /* @__PURE__ */ jsx(
|
|
233
|
+
return enabled.length ? enabled.map((a) => /* @__PURE__ */ jsx(
|
|
234
|
+
Chip,
|
|
235
|
+
{
|
|
236
|
+
size: "small",
|
|
237
|
+
label: translate(`tenancy.plan.addon.${String(a)}`, { _: prettyKey(String(a)) })
|
|
238
|
+
},
|
|
239
|
+
String(a)
|
|
240
|
+
)) : /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "text.secondary", children: "\u2014" });
|
|
215
241
|
})() }),
|
|
216
242
|
/* @__PURE__ */ jsx(Typography, { variant: "subtitle2", gutterBottom: true, children: translate("tenancy.plan.payments", { _: "Recent payments" }) }),
|
|
217
243
|
/* @__PURE__ */ jsx(Table, { size: "small", children: /* @__PURE__ */ jsxs(TableBody, { children: [
|
|
@@ -220,7 +246,7 @@ const TenancyPlanPanel = ({ tenancyId }) => {
|
|
|
220
246
|
var _a2;
|
|
221
247
|
return /* @__PURE__ */ jsxs(TableRow, { children: [
|
|
222
248
|
/* @__PURE__ */ jsx(TableCell, { children: formatDate(p.created_at) }),
|
|
223
|
-
/* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(Chip, { size: "small", label: p.status }) }),
|
|
249
|
+
/* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(Chip, { size: "small", label: tv("status", p.status) }) }),
|
|
224
250
|
/* @__PURE__ */ jsx(TableCell, { align: "right", children: p.amount != null ? `${(_a2 = p.currency) != null ? _a2 : ""} ${p.amount}` : "\u2014" })
|
|
225
251
|
] }, p.id);
|
|
226
252
|
})
|
|
@@ -244,7 +270,7 @@ const TenancyPlanPanel = ({ tenancyId }) => {
|
|
|
244
270
|
" \xB7 ",
|
|
245
271
|
translate("tenancy.plan.current", { _: "Current plan" }),
|
|
246
272
|
": ",
|
|
247
|
-
/* @__PURE__ */ jsx("b", { children: (
|
|
273
|
+
/* @__PURE__ */ jsx("b", { children: (_e = plan == null ? void 0 : plan.name) != null ? _e : "\u2014" })
|
|
248
274
|
] }),
|
|
249
275
|
/* @__PURE__ */ jsx(
|
|
250
276
|
TextField,
|
|
@@ -255,16 +281,29 @@ const TenancyPlanPanel = ({ tenancyId }) => {
|
|
|
255
281
|
value: targetPlan,
|
|
256
282
|
onChange: (e) => setTargetPlan(e.target.value),
|
|
257
283
|
sx: { mb: 2 },
|
|
284
|
+
slotProps: { select: { MenuProps: { sx: { zIndex: (theme) => theme.zIndex.modal + 5 } } } },
|
|
258
285
|
children: data.available_plans.map((p) => {
|
|
259
286
|
var _a2;
|
|
260
|
-
return /* @__PURE__ */
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
287
|
+
return /* @__PURE__ */ jsx(MenuItem, { value: String(p.id), disabled: String(p.id) === String(plan == null ? void 0 : plan.id), children: /* @__PURE__ */ jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: 1, width: "100%" }, children: [
|
|
288
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
289
|
+
p.name,
|
|
290
|
+
" \u2014 ",
|
|
291
|
+
price(p.prices, p.price),
|
|
292
|
+
" / ",
|
|
293
|
+
cycle(p.billing_cycle),
|
|
294
|
+
String(p.id) === String(plan == null ? void 0 : plan.id) ? ` (${translate("tenancy.plan.current_short", { _: "current" })})` : ""
|
|
295
|
+
] }),
|
|
296
|
+
/* @__PURE__ */ jsx(
|
|
297
|
+
Chip,
|
|
298
|
+
{
|
|
299
|
+
size: "small",
|
|
300
|
+
variant: "outlined",
|
|
301
|
+
color: p.subscription_plan_type === "internal" ? "secondary" : "default",
|
|
302
|
+
label: tv("type", (_a2 = p.subscription_plan_type) != null ? _a2 : "public"),
|
|
303
|
+
sx: { ml: "auto" }
|
|
304
|
+
}
|
|
305
|
+
)
|
|
306
|
+
] }) }, String(p.id));
|
|
268
307
|
})
|
|
269
308
|
}
|
|
270
309
|
),
|
|
@@ -306,6 +306,98 @@ declare const _default: {
|
|
|
306
306
|
};
|
|
307
307
|
tenancy_role_warning: string;
|
|
308
308
|
};
|
|
309
|
+
tenancy: {
|
|
310
|
+
plan: {
|
|
311
|
+
current: string;
|
|
312
|
+
current_short: string;
|
|
313
|
+
details: string;
|
|
314
|
+
change: string;
|
|
315
|
+
new_plan: string;
|
|
316
|
+
apply: string;
|
|
317
|
+
none: string;
|
|
318
|
+
free: string;
|
|
319
|
+
unlimited: string;
|
|
320
|
+
pending: string;
|
|
321
|
+
changed: string;
|
|
322
|
+
failed: string;
|
|
323
|
+
load_failed: string;
|
|
324
|
+
subscription: string;
|
|
325
|
+
limits: string;
|
|
326
|
+
limit: string;
|
|
327
|
+
allowed: string;
|
|
328
|
+
used: string;
|
|
329
|
+
addons: string;
|
|
330
|
+
payments: string;
|
|
331
|
+
renews: string;
|
|
332
|
+
trial_ends: string;
|
|
333
|
+
no_charge: string;
|
|
334
|
+
charge_help: string;
|
|
335
|
+
assign_help: string;
|
|
336
|
+
gateway_warning: string;
|
|
337
|
+
downgrade_note: string;
|
|
338
|
+
type: {
|
|
339
|
+
public: string;
|
|
340
|
+
internal: string;
|
|
341
|
+
};
|
|
342
|
+
cycle: {
|
|
343
|
+
monthly: string;
|
|
344
|
+
yearly: string;
|
|
345
|
+
annual: string;
|
|
346
|
+
weekly: string;
|
|
347
|
+
daily: string;
|
|
348
|
+
};
|
|
349
|
+
status: {
|
|
350
|
+
active: string;
|
|
351
|
+
trial: string;
|
|
352
|
+
trialing: string;
|
|
353
|
+
past_due: string;
|
|
354
|
+
canceled: string;
|
|
355
|
+
cancelled: string;
|
|
356
|
+
expired: string;
|
|
357
|
+
inactive: string;
|
|
358
|
+
suspended: string;
|
|
359
|
+
pending: string;
|
|
360
|
+
paid: string;
|
|
361
|
+
failed: string;
|
|
362
|
+
refunded: string;
|
|
363
|
+
};
|
|
364
|
+
gateway: {
|
|
365
|
+
internal: string;
|
|
366
|
+
flow: string;
|
|
367
|
+
rebill: string;
|
|
368
|
+
none: string;
|
|
369
|
+
};
|
|
370
|
+
field: {
|
|
371
|
+
status: string;
|
|
372
|
+
state: string;
|
|
373
|
+
account: string;
|
|
374
|
+
plan_type: string;
|
|
375
|
+
gateway: string;
|
|
376
|
+
period_start: string;
|
|
377
|
+
period_end: string;
|
|
378
|
+
trial_ends: string;
|
|
379
|
+
cancels_at: string;
|
|
380
|
+
tier: string;
|
|
381
|
+
trial_days: string;
|
|
382
|
+
};
|
|
383
|
+
limit_name: {
|
|
384
|
+
max_tenants: string;
|
|
385
|
+
max_users_per_tenant: string;
|
|
386
|
+
max_products_per_tenant: string;
|
|
387
|
+
max_product_categories: string;
|
|
388
|
+
max_monthly_orders: string;
|
|
389
|
+
max_tabs_per_day: string;
|
|
390
|
+
max_storage_mb: string;
|
|
391
|
+
max_media_files: string;
|
|
392
|
+
max_monthly_emails: string;
|
|
393
|
+
max_monthly_sms: string;
|
|
394
|
+
max_inamaps: string;
|
|
395
|
+
max_layouts_per_inamap: string;
|
|
396
|
+
max_locations: string;
|
|
397
|
+
max_active_route_sessions: string;
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
};
|
|
309
401
|
resource: {
|
|
310
402
|
tenancy: {
|
|
311
403
|
serviceAccounts: {
|
|
@@ -335,6 +335,85 @@ const dashEnglish = {
|
|
|
335
335
|
// tenant in the account, so the tenant field stops being a boundary.
|
|
336
336
|
tenancy_role_warning: "This role grants access to every tenant in the account. The selected tenant is informational, not a security boundary."
|
|
337
337
|
},
|
|
338
|
+
// Tenancy plan tab (System): current plan card, details drawer and change-plan dialog
|
|
339
|
+
tenancy: {
|
|
340
|
+
plan: {
|
|
341
|
+
current: "Current plan",
|
|
342
|
+
current_short: "current",
|
|
343
|
+
details: "View details",
|
|
344
|
+
change: "Change plan",
|
|
345
|
+
new_plan: "New plan",
|
|
346
|
+
apply: "Apply",
|
|
347
|
+
none: "No plan",
|
|
348
|
+
free: "Free",
|
|
349
|
+
unlimited: "Unlimited",
|
|
350
|
+
pending: "Pending",
|
|
351
|
+
changed: "Plan updated",
|
|
352
|
+
failed: "Could not change the plan",
|
|
353
|
+
load_failed: "Could not load the plan",
|
|
354
|
+
subscription: "Subscription",
|
|
355
|
+
limits: "Limits",
|
|
356
|
+
limit: "Limit",
|
|
357
|
+
allowed: "Allowed",
|
|
358
|
+
used: "Used",
|
|
359
|
+
addons: "Add-ons",
|
|
360
|
+
payments: "Recent payments",
|
|
361
|
+
renews: "Current period ends",
|
|
362
|
+
trial_ends: "Trial ends",
|
|
363
|
+
no_charge: "Assign now, without charging",
|
|
364
|
+
charge_help: "Normal flow: a paid plan stays pending until the payment gateway confirms it.",
|
|
365
|
+
assign_help: "Applied immediately, whatever the plan's price. No payment is requested.",
|
|
366
|
+
gateway_warning: "This account has a subscription at an external payment gateway. Assigning here does not change it: it keeps billing the plan it has there.",
|
|
367
|
+
downgrade_note: "Moving to a free plan.",
|
|
368
|
+
type: { public: "Public", internal: "Internal" },
|
|
369
|
+
cycle: { monthly: "monthly", yearly: "yearly", annual: "yearly", weekly: "weekly", daily: "daily" },
|
|
370
|
+
status: {
|
|
371
|
+
active: "Active",
|
|
372
|
+
trial: "Trial",
|
|
373
|
+
trialing: "In trial",
|
|
374
|
+
past_due: "Past due",
|
|
375
|
+
canceled: "Canceled",
|
|
376
|
+
cancelled: "Canceled",
|
|
377
|
+
expired: "Expired",
|
|
378
|
+
inactive: "Inactive",
|
|
379
|
+
suspended: "Suspended",
|
|
380
|
+
pending: "Pending",
|
|
381
|
+
paid: "Paid",
|
|
382
|
+
failed: "Failed",
|
|
383
|
+
refunded: "Refunded"
|
|
384
|
+
},
|
|
385
|
+
gateway: { internal: "Internal", flow: "Flow", rebill: "Rebill", none: "None" },
|
|
386
|
+
field: {
|
|
387
|
+
status: "Status",
|
|
388
|
+
state: "State",
|
|
389
|
+
account: "Account",
|
|
390
|
+
plan_type: "Plan type",
|
|
391
|
+
gateway: "Payment gateway",
|
|
392
|
+
period_start: "Period start",
|
|
393
|
+
period_end: "Period end",
|
|
394
|
+
trial_ends: "Trial ends",
|
|
395
|
+
cancels_at: "Cancels at",
|
|
396
|
+
tier: "Plan tier",
|
|
397
|
+
trial_days: "Trial days (plan)"
|
|
398
|
+
},
|
|
399
|
+
limit_name: {
|
|
400
|
+
max_tenants: "Max accounts",
|
|
401
|
+
max_users_per_tenant: "Max users per account",
|
|
402
|
+
max_products_per_tenant: "Max products per account",
|
|
403
|
+
max_product_categories: "Max product categories",
|
|
404
|
+
max_monthly_orders: "Max monthly orders",
|
|
405
|
+
max_tabs_per_day: "Max tabs per day",
|
|
406
|
+
max_storage_mb: "Max storage (MB)",
|
|
407
|
+
max_media_files: "Max media files",
|
|
408
|
+
max_monthly_emails: "Max monthly emails",
|
|
409
|
+
max_monthly_sms: "Max monthly SMS",
|
|
410
|
+
max_inamaps: "Max INAMAPs",
|
|
411
|
+
max_layouts_per_inamap: "Max layouts per INAMAP",
|
|
412
|
+
max_locations: "Max locations",
|
|
413
|
+
max_active_route_sessions: "Max active route sessions"
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
},
|
|
338
417
|
// Resource labels for admin panel
|
|
339
418
|
resource: {
|
|
340
419
|
tenancy: {
|
|
@@ -342,6 +342,85 @@ const dashSpanish = {
|
|
|
342
342
|
// tenant in the account, so the tenant field stops being a boundary.
|
|
343
343
|
tenancy_role_warning: "Este rol otorga acceso a todos los locales de la cuenta. El local seleccionado es informativo, no un l\xEDmite de seguridad."
|
|
344
344
|
},
|
|
345
|
+
// Pestaña de plan de la cuenta (System): plan actual, detalle en panel lateral y cambio de plan
|
|
346
|
+
tenancy: {
|
|
347
|
+
plan: {
|
|
348
|
+
current: "Plan actual",
|
|
349
|
+
current_short: "actual",
|
|
350
|
+
details: "Ver detalle",
|
|
351
|
+
change: "Cambiar plan",
|
|
352
|
+
new_plan: "Nuevo plan",
|
|
353
|
+
apply: "Aplicar",
|
|
354
|
+
none: "Sin plan",
|
|
355
|
+
free: "Gratis",
|
|
356
|
+
unlimited: "Ilimitado",
|
|
357
|
+
pending: "Pendiente",
|
|
358
|
+
changed: "Plan actualizado",
|
|
359
|
+
failed: "No se pudo cambiar el plan",
|
|
360
|
+
load_failed: "No se pudo cargar el plan",
|
|
361
|
+
subscription: "Suscripci\xF3n",
|
|
362
|
+
limits: "L\xEDmites",
|
|
363
|
+
limit: "L\xEDmite",
|
|
364
|
+
allowed: "Permitido",
|
|
365
|
+
used: "Usado",
|
|
366
|
+
addons: "Complementos",
|
|
367
|
+
payments: "Pagos recientes",
|
|
368
|
+
renews: "El per\xEDodo actual termina",
|
|
369
|
+
trial_ends: "La prueba termina",
|
|
370
|
+
no_charge: "Asignar ahora, sin cobrar",
|
|
371
|
+
charge_help: "Flujo normal: un plan de pago queda pendiente hasta que la pasarela de pago lo confirme.",
|
|
372
|
+
assign_help: "Se aplica de inmediato, sin importar el precio del plan. No se solicita ning\xFAn pago.",
|
|
373
|
+
gateway_warning: "Esta cuenta tiene una suscripci\xF3n en una pasarela de pago externa. Asignar aqu\xED no la cambia: seguir\xE1 cobrando el plan que tiene all\xE1.",
|
|
374
|
+
downgrade_note: "Pasa a un plan gratuito.",
|
|
375
|
+
type: { public: "P\xFAblico", internal: "Interno" },
|
|
376
|
+
cycle: { monthly: "mensual", yearly: "anual", annual: "anual", weekly: "semanal", daily: "diario" },
|
|
377
|
+
status: {
|
|
378
|
+
active: "Activo",
|
|
379
|
+
trial: "Prueba",
|
|
380
|
+
trialing: "En prueba",
|
|
381
|
+
past_due: "Vencido",
|
|
382
|
+
canceled: "Cancelado",
|
|
383
|
+
cancelled: "Cancelado",
|
|
384
|
+
expired: "Expirado",
|
|
385
|
+
inactive: "Inactivo",
|
|
386
|
+
suspended: "Suspendido",
|
|
387
|
+
pending: "Pendiente",
|
|
388
|
+
paid: "Pagado",
|
|
389
|
+
failed: "Fallido",
|
|
390
|
+
refunded: "Reembolsado"
|
|
391
|
+
},
|
|
392
|
+
gateway: { internal: "Interna", flow: "Flow", rebill: "Rebill", none: "Ninguna" },
|
|
393
|
+
field: {
|
|
394
|
+
status: "Estado",
|
|
395
|
+
state: "Situaci\xF3n",
|
|
396
|
+
account: "Cuenta",
|
|
397
|
+
plan_type: "Tipo de plan",
|
|
398
|
+
gateway: "Pasarela de pago",
|
|
399
|
+
period_start: "Inicio del per\xEDodo",
|
|
400
|
+
period_end: "Fin del per\xEDodo",
|
|
401
|
+
trial_ends: "Fin de la prueba",
|
|
402
|
+
cancels_at: "Se cancela el",
|
|
403
|
+
tier: "Nivel del plan",
|
|
404
|
+
trial_days: "D\xEDas de prueba (plan)"
|
|
405
|
+
},
|
|
406
|
+
limit_name: {
|
|
407
|
+
max_tenants: "M\xE1x. cuentas",
|
|
408
|
+
max_users_per_tenant: "M\xE1x. usuarios por cuenta",
|
|
409
|
+
max_products_per_tenant: "M\xE1x. productos por cuenta",
|
|
410
|
+
max_product_categories: "M\xE1x. categor\xEDas de productos",
|
|
411
|
+
max_monthly_orders: "M\xE1x. pedidos al mes",
|
|
412
|
+
max_tabs_per_day: "M\xE1x. cuentas abiertas por d\xEDa",
|
|
413
|
+
max_storage_mb: "M\xE1x. almacenamiento (MB)",
|
|
414
|
+
max_media_files: "M\xE1x. archivos multimedia",
|
|
415
|
+
max_monthly_emails: "M\xE1x. correos al mes",
|
|
416
|
+
max_monthly_sms: "M\xE1x. SMS al mes",
|
|
417
|
+
max_inamaps: "M\xE1x. INAMAPs",
|
|
418
|
+
max_layouts_per_inamap: "M\xE1x. planos por INAMAP",
|
|
419
|
+
max_locations: "M\xE1x. ubicaciones",
|
|
420
|
+
max_active_route_sessions: "M\xE1x. sesiones de ruta activas"
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
},
|
|
345
424
|
// Resource labels for admin panel
|
|
346
425
|
resource: {
|
|
347
426
|
tenancy: {
|
|
@@ -306,6 +306,98 @@ export declare const en: {
|
|
|
306
306
|
};
|
|
307
307
|
tenancy_role_warning: string;
|
|
308
308
|
};
|
|
309
|
+
tenancy: {
|
|
310
|
+
plan: {
|
|
311
|
+
current: string;
|
|
312
|
+
current_short: string;
|
|
313
|
+
details: string;
|
|
314
|
+
change: string;
|
|
315
|
+
new_plan: string;
|
|
316
|
+
apply: string;
|
|
317
|
+
none: string;
|
|
318
|
+
free: string;
|
|
319
|
+
unlimited: string;
|
|
320
|
+
pending: string;
|
|
321
|
+
changed: string;
|
|
322
|
+
failed: string;
|
|
323
|
+
load_failed: string;
|
|
324
|
+
subscription: string;
|
|
325
|
+
limits: string;
|
|
326
|
+
limit: string;
|
|
327
|
+
allowed: string;
|
|
328
|
+
used: string;
|
|
329
|
+
addons: string;
|
|
330
|
+
payments: string;
|
|
331
|
+
renews: string;
|
|
332
|
+
trial_ends: string;
|
|
333
|
+
no_charge: string;
|
|
334
|
+
charge_help: string;
|
|
335
|
+
assign_help: string;
|
|
336
|
+
gateway_warning: string;
|
|
337
|
+
downgrade_note: string;
|
|
338
|
+
type: {
|
|
339
|
+
public: string;
|
|
340
|
+
internal: string;
|
|
341
|
+
};
|
|
342
|
+
cycle: {
|
|
343
|
+
monthly: string;
|
|
344
|
+
yearly: string;
|
|
345
|
+
annual: string;
|
|
346
|
+
weekly: string;
|
|
347
|
+
daily: string;
|
|
348
|
+
};
|
|
349
|
+
status: {
|
|
350
|
+
active: string;
|
|
351
|
+
trial: string;
|
|
352
|
+
trialing: string;
|
|
353
|
+
past_due: string;
|
|
354
|
+
canceled: string;
|
|
355
|
+
cancelled: string;
|
|
356
|
+
expired: string;
|
|
357
|
+
inactive: string;
|
|
358
|
+
suspended: string;
|
|
359
|
+
pending: string;
|
|
360
|
+
paid: string;
|
|
361
|
+
failed: string;
|
|
362
|
+
refunded: string;
|
|
363
|
+
};
|
|
364
|
+
gateway: {
|
|
365
|
+
internal: string;
|
|
366
|
+
flow: string;
|
|
367
|
+
rebill: string;
|
|
368
|
+
none: string;
|
|
369
|
+
};
|
|
370
|
+
field: {
|
|
371
|
+
status: string;
|
|
372
|
+
state: string;
|
|
373
|
+
account: string;
|
|
374
|
+
plan_type: string;
|
|
375
|
+
gateway: string;
|
|
376
|
+
period_start: string;
|
|
377
|
+
period_end: string;
|
|
378
|
+
trial_ends: string;
|
|
379
|
+
cancels_at: string;
|
|
380
|
+
tier: string;
|
|
381
|
+
trial_days: string;
|
|
382
|
+
};
|
|
383
|
+
limit_name: {
|
|
384
|
+
max_tenants: string;
|
|
385
|
+
max_users_per_tenant: string;
|
|
386
|
+
max_products_per_tenant: string;
|
|
387
|
+
max_product_categories: string;
|
|
388
|
+
max_monthly_orders: string;
|
|
389
|
+
max_tabs_per_day: string;
|
|
390
|
+
max_storage_mb: string;
|
|
391
|
+
max_media_files: string;
|
|
392
|
+
max_monthly_emails: string;
|
|
393
|
+
max_monthly_sms: string;
|
|
394
|
+
max_inamaps: string;
|
|
395
|
+
max_layouts_per_inamap: string;
|
|
396
|
+
max_locations: string;
|
|
397
|
+
max_active_route_sessions: string;
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
};
|
|
309
401
|
resource: {
|
|
310
402
|
tenancy: {
|
|
311
403
|
serviceAccounts: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dashadmin/dash-admin",
|
|
3
|
-
"version": "1.3.74
|
|
3
|
+
"version": "1.3.74",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -39,11 +39,11 @@
|
|
|
39
39
|
"@rollup/plugin-node-resolve": "latest",
|
|
40
40
|
"@rollup/plugin-replace": "latest",
|
|
41
41
|
"@rollup/plugin-typescript": "latest",
|
|
42
|
-
"@dashadmin/dash-admin-state": "1.3.74
|
|
43
|
-
"@dashadmin/dash-auto-admin": "1.3.74
|
|
44
|
-
"@dashadmin/dash-constants": "1.3.74
|
|
45
|
-
"@dashadmin/dash-dialog": "1.3.74
|
|
46
|
-
"@dashadmin/dash-styles": "1.3.74
|
|
42
|
+
"@dashadmin/dash-admin-state": "1.3.74",
|
|
43
|
+
"@dashadmin/dash-auto-admin": "1.3.74",
|
|
44
|
+
"@dashadmin/dash-constants": "1.3.74",
|
|
45
|
+
"@dashadmin/dash-dialog": "1.3.74",
|
|
46
|
+
"@dashadmin/dash-styles": "1.3.74",
|
|
47
47
|
"framer-motion": "latest",
|
|
48
48
|
"prop-types": "latest",
|
|
49
49
|
"query-string": "latest",
|
|
@@ -62,11 +62,11 @@
|
|
|
62
62
|
"rollup-plugin-dts": "latest",
|
|
63
63
|
"rollup-plugin-peer-deps-external": "latest",
|
|
64
64
|
"rollup-plugin-svg": "latest",
|
|
65
|
-
"@dashadmin/dash-modal": "1.3.74
|
|
66
|
-
"@dashadmin/dash-components": "1.3.74
|
|
67
|
-
"@dashadmin/dash-axios-hook": "1.3.74
|
|
68
|
-
"@dashadmin/dash-utils": "1.3.74
|
|
69
|
-
"@dashadmin/dash-auth": "1.3.74
|
|
65
|
+
"@dashadmin/dash-modal": "1.3.74",
|
|
66
|
+
"@dashadmin/dash-components": "1.3.74",
|
|
67
|
+
"@dashadmin/dash-axios-hook": "1.3.74",
|
|
68
|
+
"@dashadmin/dash-utils": "1.3.74",
|
|
69
|
+
"@dashadmin/dash-auth": "1.3.74"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@babel/core": "latest",
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"@types/react-dom": "latest",
|
|
80
80
|
"@zerollup/ts-transform-paths": "latest",
|
|
81
81
|
"babel-loader": "latest",
|
|
82
|
-
"@dashadmin/dash-eslint": "1.3.74
|
|
83
|
-
"@dashadmin/dash-tsconfig": "1.3.74
|
|
82
|
+
"@dashadmin/dash-eslint": "1.3.74",
|
|
83
|
+
"@dashadmin/dash-tsconfig": "1.3.74",
|
|
84
84
|
"eslint": "latest",
|
|
85
85
|
"eslint-config-airbnb": "latest",
|
|
86
86
|
"eslint-config-airbnb-typescript": "latest",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"eslint-plugin-prettier": "latest",
|
|
95
95
|
"eslint-plugin-react": "latest",
|
|
96
96
|
"eslint-plugin-react-hooks": "latest",
|
|
97
|
-
"@dashadmin/dash-prettier": "1.3.74
|
|
97
|
+
"@dashadmin/dash-prettier": "1.3.74",
|
|
98
98
|
"query-string": "latest",
|
|
99
99
|
"react-dom": "19.2.8",
|
|
100
100
|
"rollup": "latest",
|