@drax/identity-vue 0.5.4 → 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.
Files changed (35) hide show
  1. package/package.json +5 -5
  2. package/src/combobox/RoleCombobox.vue +9 -1
  3. package/src/combobox/TenantCombobox.vue +11 -9
  4. package/src/components/IdentityChangeOwnPassword/IdentityChangeOwnPassword.vue +4 -4
  5. package/src/components/IdentityProfileDrawer/IdentityProfileDrawer.vue +2 -2
  6. package/src/cruds/role-crud/RoleCrud.ts +9 -1
  7. package/src/cruds/role-crud/RoleForm.vue +116 -0
  8. package/src/cruds/tenant-crud/TenantCrud.ts +8 -0
  9. package/src/cruds/user-crud/PasswordUpdateButton.vue +25 -0
  10. package/src/cruds/user-crud/UserCrud.ts +11 -0
  11. package/src/cruds/user-crud/UserCrud.vue +4 -17
  12. package/src/cruds/user-crud/UserForm.vue +177 -0
  13. package/src/cruds/user-crud/UserPasswordDialog.vue +94 -0
  14. package/src/{forms → cruds/user-crud}/UserPasswordForm.vue +4 -2
  15. package/src/index.ts +7 -21
  16. package/src/pages/ProfilePage.vue +1 -1
  17. package/src/pages/{RoleCrudPage.vue → crud/RoleCrudPage.vue} +11 -10
  18. package/src/pages/{TenantCrudPage.vue → crud/TenantCrudPage.vue} +1 -1
  19. package/src/pages/{UserApiKeyCrudPage.vue → crud/UserApiKeyCrudPage.vue} +1 -1
  20. package/src/pages/crud/UserCrudPage.vue +61 -0
  21. package/src/routes/IdentityRoutes.ts +5 -35
  22. package/src/cruds/role-crud/RoleCrud.vue +0 -171
  23. package/src/cruds/role-crud/RoleList.vue +0 -129
  24. package/src/cruds/tenant-crud/TenantCrud.vue +0 -168
  25. package/src/cruds/tenant-crud/TenantList.vue +0 -108
  26. package/src/cruds/user-crud/UserList.vue +0 -110
  27. package/src/forms/RoleForm.vue +0 -89
  28. package/src/forms/RoleFormOld.vue +0 -57
  29. package/src/forms/TenantForm.vue +0 -48
  30. package/src/forms/UserCreateForm.vue +0 -115
  31. package/src/forms/UserEditForm.vue +0 -101
  32. package/src/pages/RoleCrudCustomPage.vue +0 -12
  33. package/src/pages/TenantCrudCustomPage.vue +0 -12
  34. package/src/pages/UserCrudCustomPage.vue +0 -12
  35. package/src/pages/UserCrudPage.vue +0 -18
@@ -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>
@@ -1,12 +0,0 @@
1
- <script setup lang="ts">
2
-
3
- import RoleCrud from "../cruds/role-crud/RoleCrud.vue";
4
- </script>
5
-
6
- <template>
7
- <RoleCrud></RoleCrud>
8
- </template>
9
-
10
- <style scoped>
11
-
12
- </style>
@@ -1,12 +0,0 @@
1
- <script setup lang="ts">
2
-
3
- import TenantCrud from "../cruds/tenant-crud/TenantCrud.vue";
4
- </script>
5
-
6
- <template>
7
- <TenantCrud></TenantCrud>
8
- </template>
9
-
10
- <style scoped>
11
-
12
- </style>
@@ -1,12 +0,0 @@
1
- <script setup lang="ts">
2
-
3
- import UserCrud from "../cruds/user-crud/UserCrud.vue";
4
- </script>
5
-
6
- <template>
7
- <UserCrud></UserCrud>
8
- </template>
9
-
10
- <style scoped>
11
-
12
- </style>
@@ -1,18 +0,0 @@
1
- <script setup lang="ts">
2
- import UserCrud from "../cruds/user-crud/UserCrud";
3
- import {Crud} from "@drax/crud-vue";
4
- </script>
5
-
6
- <template>
7
- <crud :entity="UserCrud.instance">
8
- <template v-slot:item.active="{ value }" >
9
- <v-chip :color="value ? 'green':'red'" >
10
- {{ value ? 'Active' : 'Inactive' }}
11
- </v-chip>
12
- </template>
13
- </crud>
14
- </template>
15
-
16
- <style scoped>
17
-
18
- </style>