@drax/identity-vue 0.5.20 → 0.7.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 +8 -7
- package/src/combobox/TenantCombobox.vue +1 -1
- package/src/components/IdentityProfileAvatarEdit/IdentityProfileAvatarEdit.vue +0 -1
- package/src/components/IdentityProfileView/IdentityProfileView.vue +6 -4
- package/src/cruds/role-crud/RoleForm.vue +1 -1
- package/src/cruds/user-crud/UserForm.vue +17 -9
- package/src/pages/crud/UserCrudPage.vue +1 -0
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.7.0",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./src/index.ts",
|
|
9
9
|
"module": "./src/index.ts",
|
|
@@ -24,11 +24,12 @@
|
|
|
24
24
|
"format": "prettier --write src/"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@drax/common-front": "^0.
|
|
28
|
-
"@drax/common-vue": "^0.
|
|
29
|
-
"@drax/crud-front": "^0.
|
|
30
|
-
"@drax/crud-share": "^0.
|
|
31
|
-
"@drax/
|
|
27
|
+
"@drax/common-front": "^0.7.0",
|
|
28
|
+
"@drax/common-vue": "^0.7.0",
|
|
29
|
+
"@drax/crud-front": "^0.7.0",
|
|
30
|
+
"@drax/crud-share": "^0.7.0",
|
|
31
|
+
"@drax/crud-vue": "^0.7.0",
|
|
32
|
+
"@drax/identity-share": "^0.7.0"
|
|
32
33
|
},
|
|
33
34
|
"peerDependencies": {
|
|
34
35
|
"pinia": "^2.2.2",
|
|
@@ -65,5 +66,5 @@
|
|
|
65
66
|
"vue-tsc": "^2.1.6",
|
|
66
67
|
"vuetify": "^3.7.1"
|
|
67
68
|
},
|
|
68
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "244c1ccf07c9e3cf11486dcd013b11bcee505c6d"
|
|
69
70
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import {useAuthStore} from "../../stores/auth/AuthStore.js";
|
|
3
3
|
import IdentityProfileAvatarEdit from "../IdentityProfileAvatarEdit/IdentityProfileAvatarEdit.vue";
|
|
4
|
-
|
|
4
|
+
import {useI18n} from "vue-i18n";
|
|
5
|
+
defineEmits(['click'])
|
|
5
6
|
const authStore = useAuthStore()
|
|
6
|
-
|
|
7
|
+
const {t} = useI18n()
|
|
7
8
|
</script>
|
|
8
9
|
|
|
9
10
|
<template>
|
|
@@ -16,10 +17,11 @@ const authStore = useAuthStore()
|
|
|
16
17
|
</v-sheet>
|
|
17
18
|
|
|
18
19
|
<v-divider></v-divider>
|
|
19
|
-
<v-sheet class="d-flex justify-center align-center" height="
|
|
20
|
+
<v-sheet class="d-flex justify-center align-center" height="70">
|
|
20
21
|
<v-sheet class="text-center">
|
|
21
22
|
<h6 class="text-caption">{{ authStore.authUser?.email }}</h6>
|
|
22
|
-
<h6 class="text-
|
|
23
|
+
<h6 class="text-caption">{{ authStore.authUser?.tenant?.name }}</h6>
|
|
24
|
+
<h6 class="text-subtitle-2">{{t('user.field.role')}}: {{ authStore.authUser?.role?.name }}</h6>
|
|
23
25
|
</v-sheet>
|
|
24
26
|
</v-sheet>
|
|
25
27
|
</template>
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import {useFormUtils, useCrudStore} from "@drax/crud-vue";
|
|
3
|
-
import {defineEmits, defineModel, defineProps, ref} from "vue";
|
|
3
|
+
import {defineEmits, defineModel, defineProps, type PropType, ref} from "vue";
|
|
4
4
|
import {useI18nValidation} from "@drax/common-vue";
|
|
5
5
|
import RoleCombobox from "../../combobox/RoleCombobox.vue";
|
|
6
6
|
import TenantCombobox from "../../combobox/TenantCombobox.vue";
|
|
7
7
|
import {useI18n} from "vue-i18n";
|
|
8
|
+
import type {IEntityCrudOperation} from "@drax/crud-share";
|
|
8
9
|
|
|
9
10
|
const {$ta} = useI18nValidation()
|
|
10
11
|
const {t, te} = useI18n()
|
|
11
12
|
|
|
12
|
-
defineProps({
|
|
13
|
+
const {operation} = defineProps({
|
|
14
|
+
operation: {type: String as PropType<IEntityCrudOperation>, required: true},
|
|
13
15
|
enablePassword: {type: Boolean, default: false}
|
|
14
16
|
})
|
|
15
17
|
|
|
@@ -25,6 +27,12 @@ const formRef = ref()
|
|
|
25
27
|
|
|
26
28
|
async function submit() {
|
|
27
29
|
store.resetErrors()
|
|
30
|
+
|
|
31
|
+
if(operation === 'delete') {
|
|
32
|
+
emit('submit',valueModel.value)
|
|
33
|
+
return
|
|
34
|
+
}
|
|
35
|
+
|
|
28
36
|
await formRef.value.validate()
|
|
29
37
|
if (valid.value) {
|
|
30
38
|
emit('submit', valueModel.value)
|
|
@@ -62,7 +70,7 @@ let passwordVisibility = ref(false)
|
|
|
62
70
|
|
|
63
71
|
<v-text-field
|
|
64
72
|
id="name-input"
|
|
65
|
-
:label="
|
|
73
|
+
:label="t('user.field.name')"
|
|
66
74
|
v-model="valueModel.name"
|
|
67
75
|
prepend-inner-icon="mdi-card-account-details"
|
|
68
76
|
:variant="variant"
|
|
@@ -73,7 +81,7 @@ let passwordVisibility = ref(false)
|
|
|
73
81
|
|
|
74
82
|
<v-text-field
|
|
75
83
|
id="username-input"
|
|
76
|
-
:label="
|
|
84
|
+
:label="t('user.field.username')"
|
|
77
85
|
v-model="valueModel.username"
|
|
78
86
|
prepend-inner-icon="mdi-account-question"
|
|
79
87
|
:variant="variant"
|
|
@@ -86,7 +94,7 @@ let passwordVisibility = ref(false)
|
|
|
86
94
|
<v-text-field
|
|
87
95
|
v-if="enablePassword"
|
|
88
96
|
id="password-input"
|
|
89
|
-
:label="
|
|
97
|
+
:label="t('user.field.password')"
|
|
90
98
|
v-model="valueModel.password"
|
|
91
99
|
:type="passwordVisibility ? 'text': 'password'"
|
|
92
100
|
:variant="variant"
|
|
@@ -101,7 +109,7 @@ let passwordVisibility = ref(false)
|
|
|
101
109
|
|
|
102
110
|
<RoleCombobox
|
|
103
111
|
v-model="valueModel.role"
|
|
104
|
-
:label="
|
|
112
|
+
:label="t('user.field.role')"
|
|
105
113
|
:variant="variant"
|
|
106
114
|
:rules="[(v:any) => !!v || t('validation.required')]"
|
|
107
115
|
:error-messages="$ta(store.inputErrors?.role)"
|
|
@@ -110,7 +118,7 @@ let passwordVisibility = ref(false)
|
|
|
110
118
|
|
|
111
119
|
<TenantCombobox
|
|
112
120
|
v-model="valueModel.tenant"
|
|
113
|
-
:label="
|
|
121
|
+
:label="t('user.field.tenant')"
|
|
114
122
|
:variant="variant"
|
|
115
123
|
:error-messages="$ta(store.inputErrors?.tenant)"
|
|
116
124
|
clearable
|
|
@@ -121,7 +129,7 @@ let passwordVisibility = ref(false)
|
|
|
121
129
|
v-model="valueModel.email"
|
|
122
130
|
:variant="variant"
|
|
123
131
|
id="email-input"
|
|
124
|
-
:label="
|
|
132
|
+
:label="t('user.field.email')"
|
|
125
133
|
prepend-inner-icon="mdi-email"
|
|
126
134
|
:rules="[(v:any) => !!v || t('validation.required')]"
|
|
127
135
|
:error-messages="$ta(store.inputErrors?.email)"
|
|
@@ -132,7 +140,7 @@ let passwordVisibility = ref(false)
|
|
|
132
140
|
v-model="valueModel.phone"
|
|
133
141
|
:variant="variant"
|
|
134
142
|
id="phone-input"
|
|
135
|
-
:label="
|
|
143
|
+
:label="t('user.field.phone')"
|
|
136
144
|
prepend-inner-icon="mdi-phone"
|
|
137
145
|
:rules="[(v:any) => !!v || t('validation.required')]"
|
|
138
146
|
:error-messages="$ta(store.inputErrors?.phone)"
|