@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
package/src/pages/Profile.tsx
CHANGED
|
@@ -149,9 +149,9 @@ const Profile: FC = (_props) => {
|
|
|
149
149
|
};
|
|
150
150
|
|
|
151
151
|
return (
|
|
152
|
-
|
|
152
|
+
<div className='dash-profile'>
|
|
153
153
|
|
|
154
|
-
|
|
154
|
+
{user ? (
|
|
155
155
|
<Form
|
|
156
156
|
onSubmit={handleSubmit}
|
|
157
157
|
validate={validateUserCreation}
|
|
@@ -168,11 +168,12 @@ const Profile: FC = (_props) => {
|
|
|
168
168
|
>
|
|
169
169
|
{/* Profile Image Section */}
|
|
170
170
|
<Grid
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
171
|
+
size={{ xs: 12, md: 4 }}
|
|
172
|
+
sx={{
|
|
173
|
+
display: "flex",
|
|
174
|
+
justifyContent: "center",
|
|
175
|
+
alignItems: "center"
|
|
176
|
+
}}>
|
|
176
177
|
<CardContent
|
|
177
178
|
sx={{
|
|
178
179
|
height: '100%',
|
|
@@ -349,8 +350,8 @@ const Profile: FC = (_props) => {
|
|
|
349
350
|
) : (
|
|
350
351
|
<Loading />
|
|
351
352
|
)}
|
|
352
|
-
|
|
353
|
-
|
|
353
|
+
</div>
|
|
354
|
+
);
|
|
354
355
|
};
|
|
355
356
|
|
|
356
357
|
export default Profile;
|
|
@@ -55,8 +55,8 @@ const RecoverPassword = ({ }: { }) => {
|
|
|
55
55
|
}, [])
|
|
56
56
|
|
|
57
57
|
return (
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
<FullLayoutMarkup>
|
|
59
|
+
<Box
|
|
60
60
|
sx={{
|
|
61
61
|
//height: '100vh',
|
|
62
62
|
display: 'flex',
|
|
@@ -104,7 +104,14 @@ const RecoverPassword = ({ }: { }) => {
|
|
|
104
104
|
</Box>
|
|
105
105
|
) : (
|
|
106
106
|
<form onSubmit={handleSubmit} className='dash-app-login-form'>
|
|
107
|
-
<Grid
|
|
107
|
+
<Grid
|
|
108
|
+
container
|
|
109
|
+
spacing={2}
|
|
110
|
+
sx={{
|
|
111
|
+
alignItems: "center",
|
|
112
|
+
mb:4,
|
|
113
|
+
mt:2
|
|
114
|
+
}}>
|
|
108
115
|
{/* @ts-ignore */}
|
|
109
116
|
<Grid item xs={2}>
|
|
110
117
|
<IconButton
|
|
@@ -135,13 +142,15 @@ const RecoverPassword = ({ }: { }) => {
|
|
|
135
142
|
placeholder='Email'
|
|
136
143
|
required
|
|
137
144
|
value={email}
|
|
138
|
-
inputProps={{type:'email'}}
|
|
139
145
|
onChange={(e) => setEmail(e.target.value)}
|
|
140
146
|
className='dash-app-form-item-input'
|
|
141
147
|
autoComplete="username"
|
|
142
148
|
name="email"
|
|
143
149
|
type="email"
|
|
144
150
|
id="email"
|
|
151
|
+
slotProps={{
|
|
152
|
+
htmlInput: {type:'email'}
|
|
153
|
+
}}
|
|
145
154
|
/>
|
|
146
155
|
</div>
|
|
147
156
|
|
|
@@ -159,8 +168,8 @@ const RecoverPassword = ({ }: { }) => {
|
|
|
159
168
|
)}
|
|
160
169
|
</Box>
|
|
161
170
|
</Box>
|
|
162
|
-
|
|
163
|
-
|
|
171
|
+
</FullLayoutMarkup>
|
|
172
|
+
);
|
|
164
173
|
};
|
|
165
174
|
|
|
166
175
|
export default RecoverPassword;
|
|
@@ -53,7 +53,12 @@ const PaymentHistoryView: React.FC<IDashAutoAdminCustomFieldComponent> = () => {
|
|
|
53
53
|
|
|
54
54
|
if (loading) {
|
|
55
55
|
return (
|
|
56
|
-
<Box
|
|
56
|
+
<Box
|
|
57
|
+
sx={{
|
|
58
|
+
display: "flex",
|
|
59
|
+
justifyContent: "center",
|
|
60
|
+
p: 2
|
|
61
|
+
}}>
|
|
57
62
|
<CircularProgress />
|
|
58
63
|
</Box>
|
|
59
64
|
);
|
|
@@ -96,7 +101,9 @@ const PaymentHistoryView: React.FC<IDashAutoAdminCustomFieldComponent> = () => {
|
|
|
96
101
|
</Typography>
|
|
97
102
|
</TableCell>
|
|
98
103
|
<TableCell>
|
|
99
|
-
<Typography variant="body2"
|
|
104
|
+
<Typography variant="body2" sx={{
|
|
105
|
+
fontFamily: "monospace"
|
|
106
|
+
}}>
|
|
100
107
|
{payment.transaction_id}
|
|
101
108
|
</Typography>
|
|
102
109
|
</TableCell>
|
|
@@ -48,8 +48,13 @@ const EditComponent: React.FC<IDashAutoAdminCustomFieldComponent> = ({ method, a
|
|
|
48
48
|
<Typography variant="h6" gutterBottom>
|
|
49
49
|
Características del Plan
|
|
50
50
|
</Typography>
|
|
51
|
-
|
|
52
|
-
<Box
|
|
51
|
+
|
|
52
|
+
<Box
|
|
53
|
+
sx={{
|
|
54
|
+
display: "flex",
|
|
55
|
+
gap: 1,
|
|
56
|
+
mb: 2
|
|
57
|
+
}}>
|
|
53
58
|
<TextField
|
|
54
59
|
fullWidth
|
|
55
60
|
size="small"
|
|
@@ -95,7 +100,9 @@ const EditComponent: React.FC<IDashAutoAdminCustomFieldComponent> = ({ method, a
|
|
|
95
100
|
</Typography>
|
|
96
101
|
)}
|
|
97
102
|
|
|
98
|
-
<Box
|
|
103
|
+
<Box sx={{
|
|
104
|
+
mt: 2
|
|
105
|
+
}}>
|
|
99
106
|
<Typography variant="body2" color="textSecondary">
|
|
100
107
|
Las características se mostrarán a los usuarios al seleccionar este plan de suscripción.
|
|
101
108
|
</Typography>
|
|
@@ -31,11 +31,17 @@ const SubscriptionPlanPreview: React.FC<IDashAutoAdminCustomFieldComponent> = ({
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
return (
|
|
34
|
-
<Box
|
|
34
|
+
<Box sx={{
|
|
35
|
+
maxWidth: 400
|
|
36
|
+
}}>
|
|
35
37
|
<Card elevation={3}>
|
|
36
38
|
<CardContent>
|
|
37
39
|
{/* Header */}
|
|
38
|
-
<Box
|
|
40
|
+
<Box
|
|
41
|
+
sx={{
|
|
42
|
+
textAlign: "center",
|
|
43
|
+
mb: 2
|
|
44
|
+
}}>
|
|
39
45
|
<Typography variant="h5" component="h2" gutterBottom>
|
|
40
46
|
{record.name}
|
|
41
47
|
</Typography>
|
|
@@ -59,7 +65,9 @@ const SubscriptionPlanPreview: React.FC<IDashAutoAdminCustomFieldComponent> = ({
|
|
|
59
65
|
</Typography>
|
|
60
66
|
|
|
61
67
|
{record.billing_cycle === 'yearly' && (
|
|
62
|
-
<Typography variant="body2"
|
|
68
|
+
<Typography variant="body2" sx={{
|
|
69
|
+
color: "success.main"
|
|
70
|
+
}}>
|
|
63
71
|
{formatPrice(record.price_per_month)} por mes
|
|
64
72
|
</Typography>
|
|
65
73
|
)}
|
|
@@ -69,7 +77,9 @@ const SubscriptionPlanPreview: React.FC<IDashAutoAdminCustomFieldComponent> = ({
|
|
|
69
77
|
|
|
70
78
|
{/* Description */}
|
|
71
79
|
{record.description && (
|
|
72
|
-
<Typography variant="body2" color="textSecondary"
|
|
80
|
+
<Typography variant="body2" color="textSecondary" sx={{
|
|
81
|
+
marginBottom: "16px"
|
|
82
|
+
}}>
|
|
73
83
|
{record.description}
|
|
74
84
|
</Typography>
|
|
75
85
|
)}
|
|
@@ -88,7 +98,9 @@ const SubscriptionPlanPreview: React.FC<IDashAutoAdminCustomFieldComponent> = ({
|
|
|
88
98
|
</ListItemIcon>
|
|
89
99
|
<ListItemText
|
|
90
100
|
primary={feature}
|
|
91
|
-
|
|
101
|
+
slotProps={{
|
|
102
|
+
primary: { variant: 'body2' }
|
|
103
|
+
}}
|
|
92
104
|
/>
|
|
93
105
|
</ListItem>
|
|
94
106
|
))}
|
|
@@ -109,13 +121,14 @@ const SubscriptionPlanPreview: React.FC<IDashAutoAdminCustomFieldComponent> = ({
|
|
|
109
121
|
</Button>
|
|
110
122
|
|
|
111
123
|
{!record.is_active && (
|
|
112
|
-
<Typography
|
|
113
|
-
variant="caption"
|
|
114
|
-
color="error"
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
124
|
+
<Typography
|
|
125
|
+
variant="caption"
|
|
126
|
+
color="error"
|
|
127
|
+
sx={{
|
|
128
|
+
display: "block",
|
|
129
|
+
textAlign: "center",
|
|
130
|
+
mt: 1
|
|
131
|
+
}}>
|
|
119
132
|
Plan no disponible
|
|
120
133
|
</Typography>
|
|
121
134
|
)}
|
|
@@ -67,7 +67,12 @@ const StatsView: React.FC<IDashAutoAdminCustomFieldComponent> = ({ method, attri
|
|
|
67
67
|
|
|
68
68
|
if (loading) {
|
|
69
69
|
return (
|
|
70
|
-
<Box
|
|
70
|
+
<Box
|
|
71
|
+
sx={{
|
|
72
|
+
display: "flex",
|
|
73
|
+
justifyContent: "center",
|
|
74
|
+
p: 4
|
|
75
|
+
}}>
|
|
71
76
|
<CircularProgress />
|
|
72
77
|
</Box>
|
|
73
78
|
);
|
|
@@ -86,13 +91,18 @@ const StatsView: React.FC<IDashAutoAdminCustomFieldComponent> = ({ method, attri
|
|
|
86
91
|
<Typography variant="h6" gutterBottom>
|
|
87
92
|
Estadísticas del Plan
|
|
88
93
|
</Typography>
|
|
89
|
-
|
|
94
|
+
|
|
90
95
|
<Grid container spacing={2}>
|
|
91
96
|
{/* @ts-ignore - Grid API compatibility issue */}
|
|
92
97
|
<Grid component="div" item size={{ xs: 12, sm: 6, md: 3 }}>
|
|
93
98
|
<Card>
|
|
94
99
|
<CardContent>
|
|
95
|
-
<Box
|
|
100
|
+
<Box
|
|
101
|
+
sx={{
|
|
102
|
+
display: "flex",
|
|
103
|
+
alignItems: "center",
|
|
104
|
+
mb: 1
|
|
105
|
+
}}>
|
|
96
106
|
<PeopleIcon color="primary" sx={{ mr: 1 }} />
|
|
97
107
|
<Typography variant="h6" color="primary">
|
|
98
108
|
{stats.total_subscriptions}
|
|
@@ -109,9 +119,16 @@ const StatsView: React.FC<IDashAutoAdminCustomFieldComponent> = ({ method, attri
|
|
|
109
119
|
<Grid component="div" item size={{ xs: 12, sm: 6, md: 3 }}>
|
|
110
120
|
<Card>
|
|
111
121
|
<CardContent>
|
|
112
|
-
<Box
|
|
122
|
+
<Box
|
|
123
|
+
sx={{
|
|
124
|
+
display: "flex",
|
|
125
|
+
alignItems: "center",
|
|
126
|
+
mb: 1
|
|
127
|
+
}}>
|
|
113
128
|
<TrendingUpIcon color="success" sx={{ mr: 1 }} />
|
|
114
|
-
<Typography variant="h6"
|
|
129
|
+
<Typography variant="h6" sx={{
|
|
130
|
+
color: "success.main"
|
|
131
|
+
}}>
|
|
115
132
|
{stats.active_subscriptions}
|
|
116
133
|
</Typography>
|
|
117
134
|
</Box>
|
|
@@ -126,9 +143,16 @@ const StatsView: React.FC<IDashAutoAdminCustomFieldComponent> = ({ method, attri
|
|
|
126
143
|
<Grid component="div" item size={{ xs: 12, sm: 6, md: 3 }}>
|
|
127
144
|
<Card>
|
|
128
145
|
<CardContent>
|
|
129
|
-
<Box
|
|
146
|
+
<Box
|
|
147
|
+
sx={{
|
|
148
|
+
display: "flex",
|
|
149
|
+
alignItems: "center",
|
|
150
|
+
mb: 1
|
|
151
|
+
}}>
|
|
130
152
|
<TimelineIcon color="info" sx={{ mr: 1 }} />
|
|
131
|
-
<Typography variant="h6"
|
|
153
|
+
<Typography variant="h6" sx={{
|
|
154
|
+
color: "info.main"
|
|
155
|
+
}}>
|
|
132
156
|
{stats.trial_subscriptions}
|
|
133
157
|
</Typography>
|
|
134
158
|
</Box>
|
|
@@ -143,8 +167,15 @@ const StatsView: React.FC<IDashAutoAdminCustomFieldComponent> = ({ method, attri
|
|
|
143
167
|
<Grid component="div" item size={{ xs: 12, sm: 6, md: 3 }}>
|
|
144
168
|
<Card>
|
|
145
169
|
<CardContent>
|
|
146
|
-
<Box
|
|
147
|
-
|
|
170
|
+
<Box
|
|
171
|
+
sx={{
|
|
172
|
+
display: "flex",
|
|
173
|
+
alignItems: "center",
|
|
174
|
+
mb: 1
|
|
175
|
+
}}>
|
|
176
|
+
<Typography variant="h6" sx={{
|
|
177
|
+
color: "error.main"
|
|
178
|
+
}}>
|
|
148
179
|
{stats.cancelled_subscriptions}
|
|
149
180
|
</Typography>
|
|
150
181
|
</Box>
|
|
@@ -159,9 +190,16 @@ const StatsView: React.FC<IDashAutoAdminCustomFieldComponent> = ({ method, attri
|
|
|
159
190
|
<Grid component="div" item size={{ xs: 12, sm: 6 }}>
|
|
160
191
|
<Card>
|
|
161
192
|
<CardContent>
|
|
162
|
-
<Box
|
|
193
|
+
<Box
|
|
194
|
+
sx={{
|
|
195
|
+
display: "flex",
|
|
196
|
+
alignItems: "center",
|
|
197
|
+
mb: 1
|
|
198
|
+
}}>
|
|
163
199
|
<MoneyIcon color="success" sx={{ mr: 1 }} />
|
|
164
|
-
<Typography variant="h6"
|
|
200
|
+
<Typography variant="h6" sx={{
|
|
201
|
+
color: "success.main"
|
|
202
|
+
}}>
|
|
165
203
|
{formatCurrency(stats.total_revenue)}
|
|
166
204
|
</Typography>
|
|
167
205
|
</Box>
|
|
@@ -176,7 +214,12 @@ const StatsView: React.FC<IDashAutoAdminCustomFieldComponent> = ({ method, attri
|
|
|
176
214
|
<Grid component="div" item size={{ xs: 12, sm: 6 }}>
|
|
177
215
|
<Card>
|
|
178
216
|
<CardContent>
|
|
179
|
-
<Box
|
|
217
|
+
<Box
|
|
218
|
+
sx={{
|
|
219
|
+
display: "flex",
|
|
220
|
+
alignItems: "center",
|
|
221
|
+
mb: 1
|
|
222
|
+
}}>
|
|
180
223
|
<MoneyIcon color="primary" sx={{ mr: 1 }} />
|
|
181
224
|
<Typography variant="h6" color="primary">
|
|
182
225
|
{formatCurrency(stats.monthly_revenue)}
|
|
@@ -193,7 +236,12 @@ const StatsView: React.FC<IDashAutoAdminCustomFieldComponent> = ({ method, attri
|
|
|
193
236
|
<Grid component="div" item size={12}>
|
|
194
237
|
<Card>
|
|
195
238
|
<CardContent>
|
|
196
|
-
<Box
|
|
239
|
+
<Box
|
|
240
|
+
sx={{
|
|
241
|
+
display: "flex",
|
|
242
|
+
alignItems: "center",
|
|
243
|
+
justifyContent: "space-between"
|
|
244
|
+
}}>
|
|
197
245
|
<Box>
|
|
198
246
|
<Typography variant="h6">
|
|
199
247
|
Tasa de Conversión
|
|
@@ -213,7 +261,9 @@ const StatsView: React.FC<IDashAutoAdminCustomFieldComponent> = ({ method, attri
|
|
|
213
261
|
</Grid>
|
|
214
262
|
</Grid>
|
|
215
263
|
|
|
216
|
-
<Box
|
|
264
|
+
<Box sx={{
|
|
265
|
+
mt: 3
|
|
266
|
+
}}>
|
|
217
267
|
<Typography variant="h6" gutterBottom>
|
|
218
268
|
Información Adicional
|
|
219
269
|
</Typography>
|
|
@@ -25,24 +25,24 @@ const AppSidebarLogo: React.FC<IAppSidebarLogo> = ({
|
|
|
25
25
|
}*/
|
|
26
26
|
|
|
27
27
|
return (
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
<div className='dash-layout-sider-header'>
|
|
29
|
+
{!sidebarExpanded ? (
|
|
30
30
|
// @ts-ignore - AppLogo props compatibility issue
|
|
31
|
-
<AppLogo type='logo' logoBig={logo} squaredLogo={squaredLogo} />
|
|
31
|
+
(<AppLogo type='logo' logoBig={logo} squaredLogo={squaredLogo} />)
|
|
32
32
|
) : (
|
|
33
33
|
// @ts-ignore - AppLogo props compatibility issue
|
|
34
|
-
<AppLogo type='iso' logoBig={logo} squaredLogo={squaredLogo} />
|
|
34
|
+
(<AppLogo type='iso' logoBig={logo} squaredLogo={squaredLogo} />)
|
|
35
35
|
)}
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
{/*<Link to="/" className="dash-site-logo">
|
|
38
38
|
{navStyle === NAV_STYLE_NO_HEADER_MINI_SIDEBAR && width >= TAB_SIZE ?
|
|
39
39
|
<img alt="lo" src={("/assets/images/w-logo.png")}/> :
|
|
40
40
|
themeType === THEME_TYPE_LIGHT ?
|
|
41
41
|
<img alt="logo1" src={("/assets/images/logo-white.png")}/> :
|
|
42
42
|
<img alt="logo2" src={("/assets/images/logo.png")}/>}
|
|
43
43
|
</Link>*/}
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
</div>
|
|
45
|
+
);
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
export default AppSidebarLogo;
|