@dashadmin/dash-admin 1.3.50 → 1.3.52
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/components/avatar/Avatar.js +10 -1
- package/dist/components/currency/Format.js +3 -1
- package/dist/components/i18n/BridgedLocalesMenuButton.js +4 -2
- package/dist/components/misc/NoResults.js +3 -1
- package/dist/components/permission/PermissionsSelector.js +34 -14
- package/dist/components/permission/PermissionsSelectorList.js +11 -1
- package/dist/components/selects/RASearchableSelect.js +8 -6
- package/dist/components/selects/RASearchableSelectChips.js +8 -6
- package/dist/components/selects/SearchableSelect.js +8 -6
- package/dist/components/subscription/PlanAddonsSettings.js +88 -17
- package/dist/components/subscription/PlanAuditLog.js +41 -21
- package/dist/components/subscription/PlanFeaturesSettings.js +35 -6
- package/dist/components/subscription/PlanMetadataSettings.js +78 -42
- package/dist/components/subscription/PlanPricesSettings.js +20 -8
- package/dist/components/tenant/TenantSelector.js +8 -6
- package/dist/components/user/UserPreferences.js +77 -22
- package/dist/default-theme/DashThemeContext.js +3 -8
- package/dist/pages/DASHLightWeightLogin.js +7 -5
- package/dist/pages/Profile.js +5 -3
- package/dist/pages/RecoverPassword.js +28 -14
- package/dist/schemas/subscription/components/SubscriptionPaymentHistory.js +14 -2
- package/dist/schemas/subscription/components/SubscriptionPlanFeatures.js +37 -25
- package/dist/schemas/subscription/components/SubscriptionPlanPreview.js +47 -28
- package/dist/schemas/subscription/components/SubscriptionPlanStats.js +127 -37
- package/package.json +3 -3
- package/src/DASHAdmin.tsx +1 -0
- package/src/components/avatar/Avatar.tsx +8 -4
- package/src/components/currency/Format.tsx +8 -6
- package/src/components/i18n/BridgedLocalesMenuButton.tsx +4 -2
- package/src/components/misc/DASHGlobalErrorHandler.tsx +1 -1
- package/src/components/misc/NoResults.tsx +7 -4
- package/src/components/permission/AvailablePermissionsContext.tsx +1 -1
- package/src/components/permission/PermissionsSelector.tsx +48 -33
- package/src/components/permission/PermissionsSelectorList.tsx +7 -2
- package/src/components/selects/RASearchableSelect.tsx +22 -19
- package/src/components/selects/RASearchableSelectChips.tsx +23 -19
- package/src/components/selects/SearchableSelect.tsx +22 -18
- package/src/components/subscription/PlanAddonsSettings.tsx +61 -20
- package/src/components/subscription/PlanAuditLog.tsx +22 -8
- package/src/components/subscription/PlanFeaturesSettings.tsx +28 -8
- package/src/components/subscription/PlanMetadataSettings.tsx +29 -7
- package/src/components/subscription/PlanPricesSettings.tsx +30 -18
- package/src/components/tenant/TenantAttributesContext.tsx +1 -1
- package/src/components/tenant/TenantSelector.tsx +20 -17
- package/src/components/tenant/TenantSettingsContext.tsx +1 -1
- package/src/components/user/UserPreferences.tsx +56 -21
- package/src/contexts/SystemRequestsCache.tsx +1 -1
- package/src/default-theme/DASHAppProviders.tsx +1 -1
- package/src/default-theme/DashThemeContext.tsx +5 -14
- package/src/default-theme/menu/AppMenuComponents/expanded/CollapsableSidebarMenu.tsx +3 -3
- package/src/default-theme/menu/SidebarActions.tsx +6 -6
- package/src/pages/DASHLightWeightLogin.tsx +8 -7
- package/src/pages/Profile.tsx +10 -9
- package/src/pages/RecoverPassword.tsx +15 -6
- package/src/schemas/subscription/components/SubscriptionPaymentHistory.tsx +9 -2
- package/src/schemas/subscription/components/SubscriptionPlanFeatures.tsx +10 -3
- package/src/schemas/subscription/components/SubscriptionPlanPreview.tsx +25 -12
- package/src/schemas/subscription/components/SubscriptionPlanStats.tsx +64 -14
- package/src/theme/AppSidebarLogo.tsx +7 -7
|
@@ -40,30 +40,40 @@ const EditComponent = ({ method, attribute, resourceConfig }) => {
|
|
|
40
40
|
};
|
|
41
41
|
return /* @__PURE__ */ jsxs(Box, { children: [
|
|
42
42
|
/* @__PURE__ */ jsx(Typography, { variant: "h6", gutterBottom: true, children: "Caracter\xEDsticas del Plan" }),
|
|
43
|
-
/* @__PURE__ */ jsxs(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
{
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
43
|
+
/* @__PURE__ */ jsxs(
|
|
44
|
+
Box,
|
|
45
|
+
{
|
|
46
|
+
sx: {
|
|
47
|
+
display: "flex",
|
|
48
|
+
gap: 1,
|
|
49
|
+
mb: 2
|
|
50
|
+
},
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ jsx(
|
|
53
|
+
TextField,
|
|
54
|
+
{
|
|
55
|
+
fullWidth: true,
|
|
56
|
+
size: "small",
|
|
57
|
+
label: "Nueva caracter\xEDstica",
|
|
58
|
+
value: newFeature,
|
|
59
|
+
onChange: (e) => setNewFeature(e.target.value),
|
|
60
|
+
onKeyPress: handleKeyPress,
|
|
61
|
+
placeholder: "Ej: Acceso ilimitado, Soporte 24/7"
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
/* @__PURE__ */ jsx(
|
|
65
|
+
Button,
|
|
66
|
+
{
|
|
67
|
+
variant: "contained",
|
|
68
|
+
startIcon: /* @__PURE__ */ jsx(AddIcon, {}),
|
|
69
|
+
onClick: handleAddFeature,
|
|
70
|
+
disabled: !newFeature.trim(),
|
|
71
|
+
children: "Agregar"
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
),
|
|
67
77
|
features.length > 0 ? /* @__PURE__ */ jsx(Paper, { variant: "outlined", children: /* @__PURE__ */ jsx(List, { dense: true, children: features.map((feature, index) => /* @__PURE__ */ jsxs(ListItem, { children: [
|
|
68
78
|
/* @__PURE__ */ jsx(ListItemText, { primary: feature }),
|
|
69
79
|
/* @__PURE__ */ jsx(ListItemSecondaryAction, { children: /* @__PURE__ */ jsx(
|
|
@@ -77,7 +87,9 @@ const EditComponent = ({ method, attribute, resourceConfig }) => {
|
|
|
77
87
|
}
|
|
78
88
|
) })
|
|
79
89
|
] }, index)) }) }) : /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", style: { fontStyle: "italic" }, children: "No hay caracter\xEDsticas definidas para este plan" }),
|
|
80
|
-
/* @__PURE__ */ jsx(Box, {
|
|
90
|
+
/* @__PURE__ */ jsx(Box, { sx: {
|
|
91
|
+
mt: 2
|
|
92
|
+
}, children: /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", children: "Las caracter\xEDsticas se mostrar\xE1n a los usuarios al seleccionar este plan de suscripci\xF3n." }) })
|
|
81
93
|
] });
|
|
82
94
|
};
|
|
83
95
|
const ViewComponent = ({ method, attribute, resourceConfig }) => {
|
|
@@ -24,31 +24,46 @@ const SubscriptionPlanPreview = ({ method, attribute, resourceConfig }) => {
|
|
|
24
24
|
const getBillingCycleText = (cycle) => {
|
|
25
25
|
return cycle === "monthly" ? "mes" : "a\xF1o";
|
|
26
26
|
};
|
|
27
|
-
return /* @__PURE__ */ jsx(Box, {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
27
|
+
return /* @__PURE__ */ jsx(Box, { sx: {
|
|
28
|
+
maxWidth: 400
|
|
29
|
+
}, children: /* @__PURE__ */ jsx(Card, { elevation: 3, children: /* @__PURE__ */ jsxs(CardContent, { children: [
|
|
30
|
+
/* @__PURE__ */ jsxs(
|
|
31
|
+
Box,
|
|
32
|
+
{
|
|
33
|
+
sx: {
|
|
34
|
+
textAlign: "center",
|
|
35
|
+
mb: 2
|
|
36
|
+
},
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h5", component: "h2", gutterBottom: true, children: record.name }),
|
|
39
|
+
record.has_trial && /* @__PURE__ */ jsx(
|
|
40
|
+
Chip,
|
|
41
|
+
{
|
|
42
|
+
icon: /* @__PURE__ */ jsx(StarIcon, {}),
|
|
43
|
+
label: `${record.trial_days} d\xEDas gratis`,
|
|
44
|
+
color: "primary",
|
|
45
|
+
size: "small",
|
|
46
|
+
sx: { mb: 1 }
|
|
47
|
+
}
|
|
48
|
+
),
|
|
49
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h3", component: "div", color: "primary", children: formatPrice(record.price) }),
|
|
50
|
+
/* @__PURE__ */ jsxs(Typography, { variant: "body2", color: "textSecondary", children: [
|
|
51
|
+
"por ",
|
|
52
|
+
getBillingCycleText(record.billing_cycle)
|
|
53
|
+
] }),
|
|
54
|
+
record.billing_cycle === "yearly" && /* @__PURE__ */ jsxs(Typography, { variant: "body2", sx: {
|
|
55
|
+
color: "success.main"
|
|
56
|
+
}, children: [
|
|
57
|
+
formatPrice(record.price_per_month),
|
|
58
|
+
" por mes"
|
|
59
|
+
] })
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
),
|
|
50
63
|
/* @__PURE__ */ jsx(Divider, { sx: { my: 2 } }),
|
|
51
|
-
record.description && /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary",
|
|
64
|
+
record.description && /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", sx: {
|
|
65
|
+
marginBottom: "16px"
|
|
66
|
+
}, children: record.description }),
|
|
52
67
|
record.features && record.features.length > 0 && /* @__PURE__ */ jsxs(Box, { children: [
|
|
53
68
|
/* @__PURE__ */ jsx(Typography, { variant: "h6", gutterBottom: true, children: "Caracter\xEDsticas incluidas:" }),
|
|
54
69
|
/* @__PURE__ */ jsx(List, { dense: true, children: record.features.map((feature, index) => /* @__PURE__ */ jsxs(ListItem, { disableGutters: true, children: [
|
|
@@ -57,7 +72,9 @@ const SubscriptionPlanPreview = ({ method, attribute, resourceConfig }) => {
|
|
|
57
72
|
ListItemText,
|
|
58
73
|
{
|
|
59
74
|
primary: feature,
|
|
60
|
-
|
|
75
|
+
slotProps: {
|
|
76
|
+
primary: { variant: "body2" }
|
|
77
|
+
}
|
|
61
78
|
}
|
|
62
79
|
)
|
|
63
80
|
] }, index)) })
|
|
@@ -78,9 +95,11 @@ const SubscriptionPlanPreview = ({ method, attribute, resourceConfig }) => {
|
|
|
78
95
|
{
|
|
79
96
|
variant: "caption",
|
|
80
97
|
color: "error",
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
98
|
+
sx: {
|
|
99
|
+
display: "block",
|
|
100
|
+
textAlign: "center",
|
|
101
|
+
mt: 1
|
|
102
|
+
},
|
|
84
103
|
children: "Plan no disponible"
|
|
85
104
|
}
|
|
86
105
|
)
|
|
@@ -71,7 +71,17 @@ const StatsView = ({ method, attribute, resourceConfig }) => {
|
|
|
71
71
|
return priceFormatter(amount, "CLP");
|
|
72
72
|
};
|
|
73
73
|
if (loading) {
|
|
74
|
-
return /* @__PURE__ */ jsx(
|
|
74
|
+
return /* @__PURE__ */ jsx(
|
|
75
|
+
Box,
|
|
76
|
+
{
|
|
77
|
+
sx: {
|
|
78
|
+
display: "flex",
|
|
79
|
+
justifyContent: "center",
|
|
80
|
+
p: 4
|
|
81
|
+
},
|
|
82
|
+
children: /* @__PURE__ */ jsx(CircularProgress, {})
|
|
83
|
+
}
|
|
84
|
+
);
|
|
75
85
|
}
|
|
76
86
|
if (!stats) {
|
|
77
87
|
return /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "error", children: "Error al cargar las estad\xEDsticas" });
|
|
@@ -80,60 +90,140 @@ const StatsView = ({ method, attribute, resourceConfig }) => {
|
|
|
80
90
|
/* @__PURE__ */ jsx(Typography, { variant: "h6", gutterBottom: true, children: "Estad\xEDsticas del Plan" }),
|
|
81
91
|
/* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
|
|
82
92
|
/* @__PURE__ */ jsx(Grid, { component: "div", item: true, size: { xs: 12, sm: 6, md: 3 }, children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, { children: [
|
|
83
|
-
/* @__PURE__ */ jsxs(
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
93
|
+
/* @__PURE__ */ jsxs(
|
|
94
|
+
Box,
|
|
95
|
+
{
|
|
96
|
+
sx: {
|
|
97
|
+
display: "flex",
|
|
98
|
+
alignItems: "center",
|
|
99
|
+
mb: 1
|
|
100
|
+
},
|
|
101
|
+
children: [
|
|
102
|
+
/* @__PURE__ */ jsx(PeopleIcon, { color: "primary", sx: { mr: 1 } }),
|
|
103
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h6", color: "primary", children: stats.total_subscriptions })
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
),
|
|
87
107
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", children: "Total Suscripciones" })
|
|
88
108
|
] }) }) }),
|
|
89
109
|
/* @__PURE__ */ jsx(Grid, { component: "div", item: true, size: { xs: 12, sm: 6, md: 3 }, children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, { children: [
|
|
90
|
-
/* @__PURE__ */ jsxs(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
110
|
+
/* @__PURE__ */ jsxs(
|
|
111
|
+
Box,
|
|
112
|
+
{
|
|
113
|
+
sx: {
|
|
114
|
+
display: "flex",
|
|
115
|
+
alignItems: "center",
|
|
116
|
+
mb: 1
|
|
117
|
+
},
|
|
118
|
+
children: [
|
|
119
|
+
/* @__PURE__ */ jsx(TrendingUpIcon, { color: "success", sx: { mr: 1 } }),
|
|
120
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h6", sx: {
|
|
121
|
+
color: "success.main"
|
|
122
|
+
}, children: stats.active_subscriptions })
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
),
|
|
94
126
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", children: "Suscripciones Activas" })
|
|
95
127
|
] }) }) }),
|
|
96
128
|
/* @__PURE__ */ jsx(Grid, { component: "div", item: true, size: { xs: 12, sm: 6, md: 3 }, children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, { children: [
|
|
97
|
-
/* @__PURE__ */ jsxs(
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
129
|
+
/* @__PURE__ */ jsxs(
|
|
130
|
+
Box,
|
|
131
|
+
{
|
|
132
|
+
sx: {
|
|
133
|
+
display: "flex",
|
|
134
|
+
alignItems: "center",
|
|
135
|
+
mb: 1
|
|
136
|
+
},
|
|
137
|
+
children: [
|
|
138
|
+
/* @__PURE__ */ jsx(TimelineIcon, { color: "info", sx: { mr: 1 } }),
|
|
139
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h6", sx: {
|
|
140
|
+
color: "info.main"
|
|
141
|
+
}, children: stats.trial_subscriptions })
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
),
|
|
101
145
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", children: "En Per\xEDodo de Prueba" })
|
|
102
146
|
] }) }) }),
|
|
103
147
|
/* @__PURE__ */ jsx(Grid, { component: "div", item: true, size: { xs: 12, sm: 6, md: 3 }, children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, { children: [
|
|
104
|
-
/* @__PURE__ */ jsx(
|
|
148
|
+
/* @__PURE__ */ jsx(
|
|
149
|
+
Box,
|
|
150
|
+
{
|
|
151
|
+
sx: {
|
|
152
|
+
display: "flex",
|
|
153
|
+
alignItems: "center",
|
|
154
|
+
mb: 1
|
|
155
|
+
},
|
|
156
|
+
children: /* @__PURE__ */ jsx(Typography, { variant: "h6", sx: {
|
|
157
|
+
color: "error.main"
|
|
158
|
+
}, children: stats.cancelled_subscriptions })
|
|
159
|
+
}
|
|
160
|
+
),
|
|
105
161
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", children: "Canceladas" })
|
|
106
162
|
] }) }) }),
|
|
107
163
|
/* @__PURE__ */ jsx(Grid, { component: "div", item: true, size: { xs: 12, sm: 6 }, children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, { children: [
|
|
108
|
-
/* @__PURE__ */ jsxs(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
164
|
+
/* @__PURE__ */ jsxs(
|
|
165
|
+
Box,
|
|
166
|
+
{
|
|
167
|
+
sx: {
|
|
168
|
+
display: "flex",
|
|
169
|
+
alignItems: "center",
|
|
170
|
+
mb: 1
|
|
171
|
+
},
|
|
172
|
+
children: [
|
|
173
|
+
/* @__PURE__ */ jsx(MoneyIcon, { color: "success", sx: { mr: 1 } }),
|
|
174
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h6", sx: {
|
|
175
|
+
color: "success.main"
|
|
176
|
+
}, children: formatCurrency(stats.total_revenue) })
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
),
|
|
112
180
|
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", children: "Ingresos Totales" })
|
|
113
181
|
] }) }) }),
|
|
114
182
|
/* @__PURE__ */ jsx(Grid, { component: "div", item: true, size: { xs: 12, sm: 6 }, children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, { children: [
|
|
115
|
-
/* @__PURE__ */ jsxs(
|
|
116
|
-
|
|
117
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h6", color: "primary", children: formatCurrency(stats.monthly_revenue) })
|
|
118
|
-
] }),
|
|
119
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", children: "Ingresos Mensuales" })
|
|
120
|
-
] }) }) }),
|
|
121
|
-
/* @__PURE__ */ jsx(Grid, { component: "div", item: true, size: 12, children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs(Box, { display: "flex", alignItems: "center", justifyContent: "space-between", children: [
|
|
122
|
-
/* @__PURE__ */ jsxs(Box, { children: [
|
|
123
|
-
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: "Tasa de Conversi\xF3n" }),
|
|
124
|
-
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", children: "De prueba a suscripci\xF3n pagada" })
|
|
125
|
-
] }),
|
|
126
|
-
/* @__PURE__ */ jsx(
|
|
127
|
-
Chip,
|
|
183
|
+
/* @__PURE__ */ jsxs(
|
|
184
|
+
Box,
|
|
128
185
|
{
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
186
|
+
sx: {
|
|
187
|
+
display: "flex",
|
|
188
|
+
alignItems: "center",
|
|
189
|
+
mb: 1
|
|
190
|
+
},
|
|
191
|
+
children: [
|
|
192
|
+
/* @__PURE__ */ jsx(MoneyIcon, { color: "primary", sx: { mr: 1 } }),
|
|
193
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h6", color: "primary", children: formatCurrency(stats.monthly_revenue) })
|
|
194
|
+
]
|
|
132
195
|
}
|
|
133
|
-
)
|
|
134
|
-
|
|
196
|
+
),
|
|
197
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", children: "Ingresos Mensuales" })
|
|
198
|
+
] }) }) }),
|
|
199
|
+
/* @__PURE__ */ jsx(Grid, { component: "div", item: true, size: 12, children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs(
|
|
200
|
+
Box,
|
|
201
|
+
{
|
|
202
|
+
sx: {
|
|
203
|
+
display: "flex",
|
|
204
|
+
alignItems: "center",
|
|
205
|
+
justifyContent: "space-between"
|
|
206
|
+
},
|
|
207
|
+
children: [
|
|
208
|
+
/* @__PURE__ */ jsxs(Box, { children: [
|
|
209
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h6", children: "Tasa de Conversi\xF3n" }),
|
|
210
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "textSecondary", children: "De prueba a suscripci\xF3n pagada" })
|
|
211
|
+
] }),
|
|
212
|
+
/* @__PURE__ */ jsx(
|
|
213
|
+
Chip,
|
|
214
|
+
{
|
|
215
|
+
label: `${stats.conversion_rate.toFixed(1)}%`,
|
|
216
|
+
color: stats.conversion_rate > 50 ? "success" : stats.conversion_rate > 25 ? "warning" : "error",
|
|
217
|
+
size: "medium"
|
|
218
|
+
}
|
|
219
|
+
)
|
|
220
|
+
]
|
|
221
|
+
}
|
|
222
|
+
) }) }) })
|
|
135
223
|
] }),
|
|
136
|
-
/* @__PURE__ */ jsxs(Box, {
|
|
224
|
+
/* @__PURE__ */ jsxs(Box, { sx: {
|
|
225
|
+
mt: 3
|
|
226
|
+
}, children: [
|
|
137
227
|
/* @__PURE__ */ jsx(Typography, { variant: "h6", gutterBottom: true, children: "Informaci\xF3n Adicional" }),
|
|
138
228
|
/* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
|
|
139
229
|
/* @__PURE__ */ jsx(Grid, { component: "div", item: true, size: { xs: 12, sm: 6 }, children: /* @__PURE__ */ jsxs(Typography, { variant: "body2", color: "textSecondary", children: [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dashadmin/dash-admin",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.52",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@tanstack/react-query-persist-client": "latest",
|
|
33
33
|
"@emotion/react": "latest",
|
|
34
34
|
"@emotion/styled": "latest",
|
|
35
|
-
"@mui/material": "^
|
|
35
|
+
"@mui/material": "^9.3.0",
|
|
36
36
|
"@rollup/plugin-alias": "latest",
|
|
37
37
|
"@rollup/plugin-commonjs": "latest",
|
|
38
38
|
"@rollup/plugin-node-resolve": "latest",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"query-string": "latest",
|
|
49
49
|
"ra-input-rich-text": "5.14.6",
|
|
50
50
|
"react": "latest",
|
|
51
|
-
"react-admin": "5.
|
|
51
|
+
"react-admin": "5.15.1",
|
|
52
52
|
"react-custom-scrollbars-2": "latest",
|
|
53
53
|
"react-hook-form": "^7.54.0",
|
|
54
54
|
"react-loading-overlay-ts": "latest",
|
package/src/DASHAdmin.tsx
CHANGED
|
@@ -397,6 +397,7 @@ const DASHAdminApp: React.FC<IDASHAdmin<unknown, unknown, unknown, unknown>> = R
|
|
|
397
397
|
// are present it triggers createThemeWithVars which can produce a theme with undefined
|
|
398
398
|
// breakpoints.internal_mediaKeys, crashing MUI v9's responsive sx prop handling.
|
|
399
399
|
const { colorSchemes: _cs, cssVariables: _cv, defaultColorScheme: _dcs, ...safeAdminThemeOptions } = themeOptions as any;
|
|
400
|
+
|
|
400
401
|
// Memoize AdminContext props
|
|
401
402
|
const adminContextProps = {
|
|
402
403
|
dataProvider: customDataProvider || dataProvider,
|
|
@@ -47,10 +47,14 @@ export const AvatarDisplay: React.FC<AvatarComponent> = (props) => {
|
|
|
47
47
|
const imageUrl = record?.[_attributeName];
|
|
48
48
|
|
|
49
49
|
return (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
<Box
|
|
51
|
+
sx={{
|
|
52
|
+
display: "flex",
|
|
53
|
+
alignItems: "center"
|
|
54
|
+
}}>
|
|
55
|
+
<AvatarMui src={imageUrl} alt="avatar" />
|
|
56
|
+
</Box>
|
|
57
|
+
);
|
|
54
58
|
};
|
|
55
59
|
|
|
56
60
|
const Avatar = ({ method, attribute,resourceConfig }: IDashAutoAdminCustomFieldComponent) => {
|
|
@@ -45,19 +45,21 @@ const ComponentEdit: React.FC<IDashAutoAdminCustomFieldComponent> = ({
|
|
|
45
45
|
}, [format, symbol]);
|
|
46
46
|
|
|
47
47
|
return (
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
<>
|
|
49
|
+
<TextField
|
|
50
50
|
label='Probar formateo'
|
|
51
51
|
value={rawText}
|
|
52
52
|
onChange={({ target: { value } }) => formatNumber(value)}
|
|
53
53
|
/>
|
|
54
|
-
|
|
54
|
+
<TextField
|
|
55
55
|
label='Valor formateado'
|
|
56
56
|
value={formattedNumber}
|
|
57
|
-
|
|
57
|
+
slotProps={{
|
|
58
|
+
htmlInput: { readOnly: true }
|
|
59
|
+
}}
|
|
58
60
|
/>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
+
</>
|
|
62
|
+
);
|
|
61
63
|
};
|
|
62
64
|
|
|
63
65
|
const FormatCurrency = ({
|
|
@@ -137,8 +137,10 @@ const BridgedLocalesMenuButton: React.FC<BridgedLocalesMenuButtonProps> = ({
|
|
|
137
137
|
anchorEl={anchorEl}
|
|
138
138
|
open={open}
|
|
139
139
|
onClose={handleClose}
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
slotProps={{
|
|
141
|
+
list: {
|
|
142
|
+
'aria-labelledby': 'locale-button',
|
|
143
|
+
}
|
|
142
144
|
}}
|
|
143
145
|
>
|
|
144
146
|
{locales.map((localeOption) => (
|
|
@@ -80,7 +80,7 @@ const _checkError = (errorData: any): IDashGlobalError => {
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
// Handle legacy error format
|
|
83
|
-
let e: IDashGlobalError = { ...errorData?.error ? errorData.error : {} };
|
|
83
|
+
let e: IDashGlobalError = { ...(errorData?.error ? errorData.error : {}) };
|
|
84
84
|
|
|
85
85
|
let _extra = "";
|
|
86
86
|
if (e.status >= 400 && e.status < 499) {
|
|
@@ -12,14 +12,17 @@ export const NoResults: React.FC<INoResults> = (props) => {
|
|
|
12
12
|
const { title, description, children } = props;
|
|
13
13
|
|
|
14
14
|
return (
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
<Card sx={{ p: 0 }}>
|
|
16
|
+
<CardContent sx={{ display: 'flex', flexDirection: 'column', alignItems: 'left', gap: 2 }}>
|
|
17
17
|
<div style={{ display: 'flex', alignItems: 'center', gap: 2 }}>
|
|
18
18
|
<InfoIcon sx={{ fontSize: 32 }} />
|
|
19
19
|
{title ? <Typography variant="h5">{title}</Typography> : "No hay registros"}
|
|
20
20
|
</div>
|
|
21
|
-
{description && <Typography variant="body1"
|
|
21
|
+
{description && <Typography variant="body1" sx={{
|
|
22
|
+
color: "text.secondary"
|
|
23
|
+
}}>{description}</Typography>}
|
|
22
24
|
{children ? children : <></>}
|
|
23
25
|
</CardContent>
|
|
24
|
-
|
|
26
|
+
</Card>
|
|
27
|
+
);
|
|
25
28
|
};
|
|
@@ -71,7 +71,7 @@ export const AvailablePermissionsContext: React.FC<{children: React.ReactNode}>
|
|
|
71
71
|
if (!LAST_FETCH_TIME) {
|
|
72
72
|
try {
|
|
73
73
|
// Try to get last fetch time from IndexedDB
|
|
74
|
-
LAST_FETCH_TIME = await idbGet("system_available_permissions_cache") || 0;
|
|
74
|
+
LAST_FETCH_TIME = (await idbGet("system_available_permissions_cache")) || 0;
|
|
75
75
|
} catch (error) {
|
|
76
76
|
console.error("Error reading from IndexedDB:", error);
|
|
77
77
|
}
|