@drax/identity-vue 3.19.0 → 3.21.0
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/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "3.
|
|
6
|
+
"version": "3.21.0",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./src/index.ts",
|
|
9
9
|
"module": "./src/index.ts",
|
|
@@ -26,11 +26,11 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@drax/common-front": "^3.19.0",
|
|
28
28
|
"@drax/common-vue": "^3.19.0",
|
|
29
|
-
"@drax/crud-front": "^3.
|
|
30
|
-
"@drax/crud-share": "^3.
|
|
31
|
-
"@drax/crud-vue": "^3.
|
|
32
|
-
"@drax/identity-front": "^3.
|
|
33
|
-
"@drax/identity-share": "^3.
|
|
29
|
+
"@drax/crud-front": "^3.21.0",
|
|
30
|
+
"@drax/crud-share": "^3.21.0",
|
|
31
|
+
"@drax/crud-vue": "^3.21.0",
|
|
32
|
+
"@drax/identity-front": "^3.21.0",
|
|
33
|
+
"@drax/identity-share": "^3.21.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"pinia": "^3.0.4",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"vue-tsc": "^3.2.4",
|
|
56
56
|
"vuetify": "^3.11.8"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "9ceebbba20e7abf7337387e2a81d1475b9ba1bca"
|
|
59
59
|
}
|
|
@@ -25,7 +25,6 @@ const store = useCrudStore(entity.name)
|
|
|
25
25
|
const enablePassword = store.operation === 'create'
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
|
|
29
28
|
const valid = ref()
|
|
30
29
|
const formRef = ref()
|
|
31
30
|
|
|
@@ -33,12 +32,11 @@ const formRef = ref()
|
|
|
33
32
|
const isTenantEnabled = computed(() => import.meta.env.VITE_DRAX_TENANT === 'ENABLE')
|
|
34
33
|
|
|
35
34
|
|
|
36
|
-
|
|
37
35
|
async function submit() {
|
|
38
36
|
store.resetErrors()
|
|
39
37
|
|
|
40
|
-
if(store.operation === 'delete') {
|
|
41
|
-
emit('submit',valueModel.value)
|
|
38
|
+
if (store.operation === 'delete') {
|
|
39
|
+
emit('submit', valueModel.value)
|
|
42
40
|
return
|
|
43
41
|
}
|
|
44
42
|
|
|
@@ -55,7 +53,7 @@ function cancel() {
|
|
|
55
53
|
}
|
|
56
54
|
|
|
57
55
|
const {
|
|
58
|
-
|
|
56
|
+
submitColor, readonly
|
|
59
57
|
} = useFormUtils(store.operation)
|
|
60
58
|
|
|
61
59
|
|
|
@@ -74,6 +72,11 @@ const variant = computed(() => {
|
|
|
74
72
|
|
|
75
73
|
|
|
76
74
|
let passwordVisibility = ref(false)
|
|
75
|
+
const confirmPassword = ref('')
|
|
76
|
+
|
|
77
|
+
function confirmPasswordRule(value: string) {
|
|
78
|
+
return value === valueModel.value.password || t('validation.password.confirmed')
|
|
79
|
+
}
|
|
77
80
|
|
|
78
81
|
</script>
|
|
79
82
|
|
|
@@ -93,96 +96,134 @@ let passwordVisibility = ref(false)
|
|
|
93
96
|
|
|
94
97
|
<v-card-text>
|
|
95
98
|
|
|
96
|
-
<v-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
v-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
99
|
+
<v-row>
|
|
100
|
+
|
|
101
|
+
<v-col cols="12">
|
|
102
|
+
<v-text-field
|
|
103
|
+
id="name-input"
|
|
104
|
+
:label="t('user.field.name')"
|
|
105
|
+
v-model="valueModel.name"
|
|
106
|
+
prepend-inner-icon="mdi-card-account-details"
|
|
107
|
+
:variant="variant"
|
|
108
|
+
:rules="[v => !!v || t('validation.required')]"
|
|
109
|
+
:error-messages="$ta(store.inputErrors?.name)"
|
|
110
|
+
:readonly="readonly"
|
|
111
|
+
></v-text-field>
|
|
112
|
+
</v-col>
|
|
113
|
+
|
|
114
|
+
<v-col cols="12">
|
|
115
|
+
<v-text-field
|
|
116
|
+
id="username-input"
|
|
117
|
+
:label="t('user.field.username')"
|
|
118
|
+
v-model="valueModel.username"
|
|
119
|
+
prepend-inner-icon="mdi-account-question"
|
|
120
|
+
:variant="variant"
|
|
121
|
+
:rules="[v => !!v || t('validation.required')]"
|
|
122
|
+
autocomplete="new-username"
|
|
123
|
+
:error-messages="$ta(store.inputErrors?.username)"
|
|
124
|
+
:readonly="readonly"
|
|
125
|
+
></v-text-field>
|
|
126
|
+
</v-col>
|
|
127
|
+
|
|
128
|
+
<v-col cols="12">
|
|
129
|
+
<v-text-field
|
|
130
|
+
v-if="enablePassword"
|
|
131
|
+
id="password-input"
|
|
132
|
+
:label="t('user.field.password')"
|
|
133
|
+
v-model="valueModel.password"
|
|
134
|
+
:type="passwordVisibility ? 'text': 'password'"
|
|
135
|
+
:variant="variant"
|
|
136
|
+
:rules="[v => !!v || t('validation.required')]"
|
|
137
|
+
prepend-inner-icon="mdi-lock-outline"
|
|
138
|
+
:append-inner-icon="passwordVisibility ? 'mdi-eye-off': 'mdi-eye'"
|
|
139
|
+
@click:append-inner="passwordVisibility = !passwordVisibility"
|
|
140
|
+
autocomplete="new-password"
|
|
141
|
+
:error-messages="$ta(store.inputErrors?.password)"
|
|
142
|
+
:readonly="readonly"
|
|
143
|
+
></v-text-field>
|
|
144
|
+
</v-col>
|
|
145
|
+
|
|
146
|
+
<v-col cols="12">
|
|
147
|
+
<v-text-field
|
|
148
|
+
v-if="enablePassword"
|
|
149
|
+
id="confirm-password-input"
|
|
150
|
+
:label="t('user.field.confirmPassword')"
|
|
151
|
+
v-model="confirmPassword"
|
|
152
|
+
:type="passwordVisibility ? 'text': 'password'"
|
|
153
|
+
:variant="variant"
|
|
154
|
+
:rules="[
|
|
155
|
+
v => !!v || t('validation.required'),
|
|
156
|
+
confirmPasswordRule
|
|
157
|
+
]"
|
|
158
|
+
prepend-inner-icon="mdi-lock-outline"
|
|
159
|
+
:append-inner-icon="passwordVisibility ? 'mdi-eye-off': 'mdi-eye'"
|
|
160
|
+
@click:append-inner="passwordVisibility = !passwordVisibility"
|
|
161
|
+
autocomplete="new-password"
|
|
162
|
+
:readonly="readonly"
|
|
163
|
+
></v-text-field>
|
|
164
|
+
</v-col>
|
|
165
|
+
|
|
166
|
+
<v-col cols="12">
|
|
167
|
+
<RoleCombobox
|
|
168
|
+
v-model="valueModel.role"
|
|
169
|
+
:label="t('user.field.role')"
|
|
170
|
+
:variant="variant"
|
|
171
|
+
:rules="[(v:any) => !!v || t('validation.required')]"
|
|
172
|
+
:error-messages="$ta(store.inputErrors?.role)"
|
|
173
|
+
:readonly="readonly"
|
|
174
|
+
></RoleCombobox>
|
|
175
|
+
</v-col>
|
|
176
|
+
|
|
177
|
+
<v-col cols="12">
|
|
178
|
+
<TenantCombobox
|
|
179
|
+
v-if="isTenantEnabled && hasPermission('tenant:manage')"
|
|
180
|
+
v-model="valueModel.tenant"
|
|
181
|
+
:label="t('user.field.tenant')"
|
|
182
|
+
:variant="variant"
|
|
183
|
+
:error-messages="$ta(store.inputErrors?.tenant)"
|
|
184
|
+
clearable
|
|
185
|
+
:readonly="readonly"
|
|
186
|
+
></TenantCombobox>
|
|
187
|
+
</v-col>
|
|
188
|
+
|
|
189
|
+
<v-col cols="12">
|
|
190
|
+
<v-text-field
|
|
191
|
+
v-model="valueModel.email"
|
|
192
|
+
:variant="variant"
|
|
193
|
+
id="email-input"
|
|
194
|
+
:label="t('user.field.email')"
|
|
195
|
+
prepend-inner-icon="mdi-email"
|
|
196
|
+
:rules="[(v:any) => !!v || t('validation.required')]"
|
|
197
|
+
:error-messages="$ta(store.inputErrors?.email)"
|
|
198
|
+
:readonly="readonly"
|
|
199
|
+
></v-text-field>
|
|
200
|
+
</v-col>
|
|
201
|
+
|
|
202
|
+
<v-col cols="12">
|
|
203
|
+
<v-text-field
|
|
204
|
+
v-model="valueModel.phone"
|
|
205
|
+
:variant="variant"
|
|
206
|
+
id="phone-input"
|
|
207
|
+
:label="t('user.field.phone')"
|
|
208
|
+
prepend-inner-icon="mdi-phone"
|
|
209
|
+
:rules="[(v:any) => !!v || t('validation.required')]"
|
|
210
|
+
:error-messages="$ta(store.inputErrors?.phone)"
|
|
211
|
+
:readonly="readonly"
|
|
212
|
+
></v-text-field>
|
|
213
|
+
</v-col>
|
|
214
|
+
|
|
215
|
+
<v-col cols="12">
|
|
216
|
+
<v-switch
|
|
217
|
+
id="active-input"
|
|
218
|
+
v-model="valueModel.active"
|
|
219
|
+
color="primary"
|
|
220
|
+
label="Active"
|
|
221
|
+
:true-value="true"
|
|
222
|
+
:false-value="false"
|
|
223
|
+
:readonly="readonly"
|
|
224
|
+
></v-switch>
|
|
225
|
+
</v-col>
|
|
226
|
+
</v-row>
|
|
186
227
|
</v-card-text>
|
|
187
228
|
|
|
188
229
|
<v-card-actions>
|
|
@@ -42,6 +42,9 @@ const rules = computed(() => {
|
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
label: 'Debe incluir al menos un carácter especial',
|
|
45
|
+
description: policy.value.allowedSpecialChars
|
|
46
|
+
? `Permitidos: ${policy.value.allowedSpecialChars}`
|
|
47
|
+
: undefined,
|
|
45
48
|
enabled: policy.value.requireSpecialChar,
|
|
46
49
|
icon: 'mdi-asterisk'
|
|
47
50
|
},
|
|
@@ -58,7 +61,7 @@ const metadata = computed(() => {
|
|
|
58
61
|
return []
|
|
59
62
|
}
|
|
60
63
|
|
|
61
|
-
|
|
64
|
+
const items = [
|
|
62
65
|
{
|
|
63
66
|
label: 'Reutilización',
|
|
64
67
|
value: policy.value.preventReuse > 0
|
|
@@ -72,6 +75,15 @@ const metadata = computed(() => {
|
|
|
72
75
|
: 'Sin expiración configurada'
|
|
73
76
|
}
|
|
74
77
|
]
|
|
78
|
+
|
|
79
|
+
if (policy.value.requireSpecialChar && policy.value.allowedSpecialChars) {
|
|
80
|
+
items.push({
|
|
81
|
+
label: 'Caracteres especiales',
|
|
82
|
+
value: policy.value.allowedSpecialChars
|
|
83
|
+
})
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return items
|
|
75
87
|
})
|
|
76
88
|
|
|
77
89
|
async function loadPolicy() {
|
|
@@ -122,6 +134,9 @@ onMounted(loadPolicy)
|
|
|
122
134
|
:prepend-icon="rule.icon"
|
|
123
135
|
>
|
|
124
136
|
<v-list-item-title>{{ rule.label }}</v-list-item-title>
|
|
137
|
+
<v-list-item-subtitle v-if="rule.enabled && rule.description">
|
|
138
|
+
{{ rule.description }}
|
|
139
|
+
</v-list-item-subtitle>
|
|
125
140
|
<template #append>
|
|
126
141
|
<v-chip
|
|
127
142
|
:color="rule.enabled ? 'success' : 'default'"
|