@drax/identity-vue 0.5.3 → 0.5.5
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 +6 -5
- package/src/combobox/RoleCombobox.vue +24 -19
- package/src/combobox/TenantCombobox.vue +11 -9
- package/src/components/IdentityChangeOwnPassword/IdentityChangeOwnPassword.vue +4 -4
- package/src/components/IdentityProfileDrawer/IdentityProfileDrawer.vue +2 -2
- package/src/components/PermissionSelector/PermissionSelector.vue +4 -7
- package/src/cruds/role-crud/RoleCrud.ts +91 -0
- package/src/cruds/role-crud/RoleForm.vue +116 -0
- package/src/cruds/tenant-crud/TenantCrud.ts +17 -3
- package/src/cruds/user-crud/PasswordUpdateButton.vue +25 -0
- package/src/cruds/user-crud/UserCrud.ts +112 -0
- package/src/cruds/user-crud/UserCrud.vue +4 -17
- package/src/cruds/user-crud/UserForm.vue +177 -0
- package/src/cruds/user-crud/UserPasswordDialog.vue +94 -0
- package/src/{forms → cruds/user-crud}/UserPasswordForm.vue +4 -2
- package/src/index.ts +7 -21
- package/src/pages/ProfilePage.vue +1 -1
- package/src/pages/crud/RoleCrudPage.vue +62 -0
- package/src/pages/{TenantCrudPage.vue → crud/TenantCrudPage.vue} +1 -1
- package/src/pages/{UserApiKeyCrudPage.vue → crud/UserApiKeyCrudPage.vue} +1 -1
- package/src/pages/crud/UserCrudPage.vue +61 -0
- package/src/routes/IdentityRoutes.ts +70 -64
- package/src/cruds/role-crud/RoleCrud.vue +0 -171
- package/src/cruds/role-crud/RoleList.vue +0 -129
- package/src/cruds/tenant-crud/TenantCrud.vue +0 -168
- package/src/cruds/tenant-crud/TenantList.vue +0 -108
- package/src/cruds/user-crud/UserList.vue +0 -110
- package/src/forms/RoleForm.vue +0 -57
- package/src/forms/TenantForm.vue +0 -48
- package/src/forms/UserCreateForm.vue +0 -115
- package/src/forms/UserEditForm.vue +0 -101
- package/src/pages/RoleCrudPage.vue +0 -12
- package/src/pages/TenantCrudPageOld.vue +0 -12
- package/src/pages/UserCrudPage.vue +0 -12
package/src/forms/RoleForm.vue
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import {defineModel, type PropType} from "vue";
|
|
3
|
-
import type {IRoleBase} from "@drax/identity-share";
|
|
4
|
-
import {useI18nValidation} from "@drax/common-vue";
|
|
5
|
-
import type {IClientInputError} from "@drax/common-front";
|
|
6
|
-
import PermissionSelector from "../components/PermissionSelector/PermissionSelector.vue";
|
|
7
|
-
import RoleCombobox from "../combobox/RoleCombobox.vue";
|
|
8
|
-
|
|
9
|
-
const {$ta} = useI18nValidation()
|
|
10
|
-
|
|
11
|
-
defineProps({
|
|
12
|
-
inputErrors: {
|
|
13
|
-
type: Object as PropType<IClientInputError>,
|
|
14
|
-
default: () => ({name: "", permissions: "", readonly: ""})
|
|
15
|
-
}
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
const form = defineModel<IRoleBase>({
|
|
19
|
-
type: Object,
|
|
20
|
-
default: () => ({name: "", permissions: [], readonly: false})
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
const emits = defineEmits(['formSubmit'])
|
|
24
|
-
|
|
25
|
-
// Function to call when form is attempted to be submitted
|
|
26
|
-
const onSubmit = () => {
|
|
27
|
-
emits('formSubmit', form); // Emitting an event with the form data
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
|
-
<template>
|
|
33
|
-
<form @submit.prevent="onSubmit">
|
|
34
|
-
<v-text-field
|
|
35
|
-
variant="outlined"
|
|
36
|
-
id="name-input"
|
|
37
|
-
label="Name"
|
|
38
|
-
v-model="form.name"
|
|
39
|
-
prepend-inner-icon="mdi-card-account-details"
|
|
40
|
-
required
|
|
41
|
-
:error-messages="$ta(inputErrors.name)"
|
|
42
|
-
></v-text-field>
|
|
43
|
-
|
|
44
|
-
<RoleCombobox
|
|
45
|
-
v-model="form.childRoles"
|
|
46
|
-
:error-messages="$ta(inputErrors.role)"
|
|
47
|
-
multiple
|
|
48
|
-
></RoleCombobox>
|
|
49
|
-
|
|
50
|
-
<PermissionSelector v-model="form.permissions"></PermissionSelector>
|
|
51
|
-
|
|
52
|
-
</form>
|
|
53
|
-
</template>
|
|
54
|
-
|
|
55
|
-
<style scoped>
|
|
56
|
-
|
|
57
|
-
</style>
|
package/src/forms/TenantForm.vue
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import {defineModel, type PropType} from "vue";
|
|
3
|
-
import type {ITenantBase} from "@drax/identity-share";
|
|
4
|
-
import {useI18nValidation} from "@drax/common-vue";
|
|
5
|
-
import type {IClientInputError} from "@drax/common-front";
|
|
6
|
-
|
|
7
|
-
const {$ta} = useI18nValidation()
|
|
8
|
-
|
|
9
|
-
defineProps({
|
|
10
|
-
inputErrors: {
|
|
11
|
-
type: Object as PropType<IClientInputError>,
|
|
12
|
-
default: () => ({name: ""})
|
|
13
|
-
}
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
const form = defineModel<ITenantBase>({
|
|
17
|
-
type: Object,
|
|
18
|
-
default: () => ({name: ""})
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
// Define emits
|
|
22
|
-
const emits = defineEmits(['formSubmit'])
|
|
23
|
-
|
|
24
|
-
// Function to call when form is attempted to be submitted
|
|
25
|
-
const onSubmit = () => {
|
|
26
|
-
emits('formSubmit', form); // Emitting an event with the form data
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
</script>
|
|
30
|
-
|
|
31
|
-
<template>
|
|
32
|
-
<form @submit.prevent="onSubmit">
|
|
33
|
-
<v-text-field
|
|
34
|
-
variant="outlined"
|
|
35
|
-
id="name-input"
|
|
36
|
-
label="Name"
|
|
37
|
-
v-model="form.name"
|
|
38
|
-
prepend-inner-icon="mdi-card-account-details"
|
|
39
|
-
required
|
|
40
|
-
:error-messages="$ta(inputErrors.name)"
|
|
41
|
-
></v-text-field>
|
|
42
|
-
|
|
43
|
-
</form>
|
|
44
|
-
</template>
|
|
45
|
-
|
|
46
|
-
<style scoped>
|
|
47
|
-
|
|
48
|
-
</style>
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import {ref, defineModel, type PropType} from "vue";
|
|
3
|
-
import RoleCombobox from "../combobox/RoleCombobox.vue";
|
|
4
|
-
import TenantCombobox from "../combobox/TenantCombobox.vue";
|
|
5
|
-
import type {IClientInputError} from "@drax/common-front";
|
|
6
|
-
import type {IUserCreate} from "@drax/identity-share";
|
|
7
|
-
import {useI18nValidation} from "@drax/common-vue";
|
|
8
|
-
|
|
9
|
-
const {$ta} = useI18nValidation()
|
|
10
|
-
|
|
11
|
-
defineProps({
|
|
12
|
-
inputErrors: {
|
|
13
|
-
type: Object as PropType<IClientInputError>,
|
|
14
|
-
default: () => ({name: "", username: "", password: "", email: "", phone: "", role: "", tenant: "", active: ""})
|
|
15
|
-
}
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
const form = defineModel<IUserCreate>({
|
|
19
|
-
type: Object,
|
|
20
|
-
default: () => ({name: "", username: "", password: "", email: "", phone: "", role: "", tenant: "", active: true})
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
let passwordVisibility = ref(false)
|
|
24
|
-
|
|
25
|
-
// Define emits
|
|
26
|
-
const emits = defineEmits(['formSubmit'])
|
|
27
|
-
|
|
28
|
-
// Function to call when form is attempted to be submitted
|
|
29
|
-
const onSubmit = () => {
|
|
30
|
-
emits('formSubmit', form); // Emitting an event with the form data
|
|
31
|
-
}
|
|
32
|
-
</script>
|
|
33
|
-
|
|
34
|
-
<template>
|
|
35
|
-
<form @submit.prevent="onSubmit">
|
|
36
|
-
|
|
37
|
-
<v-text-field
|
|
38
|
-
variant="outlined"
|
|
39
|
-
id="name-input"
|
|
40
|
-
label="Name"
|
|
41
|
-
v-model="form.name"
|
|
42
|
-
prepend-inner-icon="mdi-card-account-details"
|
|
43
|
-
required
|
|
44
|
-
:error-messages="$ta(inputErrors.name)"
|
|
45
|
-
></v-text-field>
|
|
46
|
-
|
|
47
|
-
<v-text-field
|
|
48
|
-
variant="outlined"
|
|
49
|
-
id="username-input"
|
|
50
|
-
label="Username"
|
|
51
|
-
v-model="form.username"
|
|
52
|
-
prepend-inner-icon="mdi-account-question"
|
|
53
|
-
required
|
|
54
|
-
autocomplete="new-username"
|
|
55
|
-
:error-messages="$ta(inputErrors.username)"
|
|
56
|
-
></v-text-field>
|
|
57
|
-
<v-text-field
|
|
58
|
-
variant="outlined"
|
|
59
|
-
id="password-input"
|
|
60
|
-
label="Password"
|
|
61
|
-
v-model="form.password"
|
|
62
|
-
:type="passwordVisibility ? 'text': 'password'"
|
|
63
|
-
required
|
|
64
|
-
prepend-inner-icon="mdi-lock-outline"
|
|
65
|
-
:append-inner-icon="passwordVisibility ? 'mdi-eye-off': 'mdi-eye'"
|
|
66
|
-
@click:append-inner="passwordVisibility = !passwordVisibility"
|
|
67
|
-
autocomplete="new-password"
|
|
68
|
-
:error-messages="$ta(inputErrors.password)"
|
|
69
|
-
></v-text-field>
|
|
70
|
-
|
|
71
|
-
<RoleCombobox
|
|
72
|
-
v-model="form.role"
|
|
73
|
-
:error-messages="$ta(inputErrors.role)"
|
|
74
|
-
></RoleCombobox>
|
|
75
|
-
|
|
76
|
-
<TenantCombobox
|
|
77
|
-
v-model="form.tenant"
|
|
78
|
-
:error-messages="$ta(inputErrors.tenant)"
|
|
79
|
-
clearable
|
|
80
|
-
></TenantCombobox>
|
|
81
|
-
|
|
82
|
-
<v-text-field
|
|
83
|
-
v-model="form.email"
|
|
84
|
-
variant="outlined"
|
|
85
|
-
id="email-input"
|
|
86
|
-
label="Email"
|
|
87
|
-
prepend-inner-icon="mdi-email"
|
|
88
|
-
required
|
|
89
|
-
:error-messages="$ta(inputErrors.email)"
|
|
90
|
-
></v-text-field>
|
|
91
|
-
|
|
92
|
-
<v-text-field
|
|
93
|
-
v-model="form.phone"
|
|
94
|
-
variant="outlined"
|
|
95
|
-
id="phone-input"
|
|
96
|
-
label="Phone"
|
|
97
|
-
prepend-inner-icon="mdi-phone"
|
|
98
|
-
required
|
|
99
|
-
:error-messages="$ta(inputErrors.phone)"
|
|
100
|
-
></v-text-field>
|
|
101
|
-
|
|
102
|
-
<v-switch
|
|
103
|
-
id="active-input"
|
|
104
|
-
v-model="form.active"
|
|
105
|
-
color="primary"
|
|
106
|
-
label="Active"
|
|
107
|
-
:true-value="true"
|
|
108
|
-
:false-value="false"
|
|
109
|
-
></v-switch>
|
|
110
|
-
</form>
|
|
111
|
-
</template>
|
|
112
|
-
|
|
113
|
-
<style scoped>
|
|
114
|
-
|
|
115
|
-
</style>
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import {defineModel, type PropType} from "vue";
|
|
3
|
-
import RoleCombobox from "../combobox/RoleCombobox.vue";
|
|
4
|
-
import TenantCombobox from "../combobox/TenantCombobox.vue";
|
|
5
|
-
import type {IClientInputError} from "@drax/common-front";
|
|
6
|
-
import type {IUserUpdate} from "@drax/identity-share";
|
|
7
|
-
import {useI18nValidation} from "@drax/common-vue";
|
|
8
|
-
const {$ta} = useI18nValidation()
|
|
9
|
-
|
|
10
|
-
defineProps({
|
|
11
|
-
inputErrors: {
|
|
12
|
-
type: Object as PropType<IClientInputError>,
|
|
13
|
-
default: () => ({name: "", username: "", email: "", phone: "", role: "", tenant: "", active: ""})
|
|
14
|
-
}
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
const form = defineModel<IUserUpdate>({
|
|
18
|
-
type: Object,
|
|
19
|
-
default: () => ({name: "", username: "", email: "", phone: "", role: "", tenant: "", active: true})
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
// Define emits
|
|
23
|
-
const emits = defineEmits(['formSubmit'])
|
|
24
|
-
|
|
25
|
-
// Function to call when form is attempted to be submitted
|
|
26
|
-
const onSubmit = () => {
|
|
27
|
-
emits('formSubmit', form); // Emitting an event with the form data
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
</script>
|
|
31
|
-
|
|
32
|
-
<template>
|
|
33
|
-
<form @submit.prevent="onSubmit">
|
|
34
|
-
<v-sheet>
|
|
35
|
-
</v-sheet>
|
|
36
|
-
|
|
37
|
-
<v-text-field
|
|
38
|
-
variant="outlined"
|
|
39
|
-
id="name-input"
|
|
40
|
-
label="Name"
|
|
41
|
-
v-model="form.name"
|
|
42
|
-
prepend-inner-icon="mdi-card-account-details"
|
|
43
|
-
required
|
|
44
|
-
:error-messages="$ta(inputErrors.name)"
|
|
45
|
-
></v-text-field>
|
|
46
|
-
<v-text-field
|
|
47
|
-
variant="outlined"
|
|
48
|
-
id="username-input"
|
|
49
|
-
label="Username"
|
|
50
|
-
v-model="form.username"
|
|
51
|
-
prepend-inner-icon="mdi-account-question"
|
|
52
|
-
required
|
|
53
|
-
:error-messages="$ta(inputErrors.username)"
|
|
54
|
-
autocomplete="new-username"
|
|
55
|
-
></v-text-field>
|
|
56
|
-
|
|
57
|
-
<RoleCombobox
|
|
58
|
-
v-model="form.role"
|
|
59
|
-
:error-messages="$ta(inputErrors.role)"
|
|
60
|
-
></RoleCombobox>
|
|
61
|
-
|
|
62
|
-
<TenantCombobox
|
|
63
|
-
v-model="form.tenant"
|
|
64
|
-
:error-messages="$ta(inputErrors.tenant)"
|
|
65
|
-
clearable
|
|
66
|
-
></TenantCombobox>
|
|
67
|
-
|
|
68
|
-
<v-text-field
|
|
69
|
-
v-model="form.email"
|
|
70
|
-
variant="outlined"
|
|
71
|
-
id="email-input"
|
|
72
|
-
label="Email"
|
|
73
|
-
prepend-inner-icon="mdi-email"
|
|
74
|
-
required
|
|
75
|
-
:error-messages="$ta(inputErrors.email)"
|
|
76
|
-
></v-text-field>
|
|
77
|
-
|
|
78
|
-
<v-text-field
|
|
79
|
-
v-model="form.phone"
|
|
80
|
-
variant="outlined"
|
|
81
|
-
id="phone-input"
|
|
82
|
-
label="Phone"
|
|
83
|
-
prepend-inner-icon="mdi-phone"
|
|
84
|
-
required
|
|
85
|
-
:error-messages="$ta(inputErrors.phone)"
|
|
86
|
-
></v-text-field>
|
|
87
|
-
|
|
88
|
-
<v-switch
|
|
89
|
-
id="active-input"
|
|
90
|
-
v-model="form.active"
|
|
91
|
-
color="primary"
|
|
92
|
-
label="Active"
|
|
93
|
-
:true-value="true"
|
|
94
|
-
:false-value="false"
|
|
95
|
-
></v-switch>
|
|
96
|
-
</form>
|
|
97
|
-
</template>
|
|
98
|
-
|
|
99
|
-
<style scoped>
|
|
100
|
-
|
|
101
|
-
</style>
|