@drax/identity-vue 0.37.0 → 0.37.1
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": "0.37.
|
|
6
|
+
"version": "0.37.1",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./src/index.ts",
|
|
9
9
|
"module": "./src/index.ts",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@drax/common-front": "^0.37.0",
|
|
28
|
-
"@drax/common-vue": "^0.37.
|
|
29
|
-
"@drax/crud-front": "^0.37.
|
|
28
|
+
"@drax/common-vue": "^0.37.1",
|
|
29
|
+
"@drax/crud-front": "^0.37.1",
|
|
30
30
|
"@drax/crud-share": "^0.37.0",
|
|
31
|
-
"@drax/crud-vue": "^0.37.
|
|
31
|
+
"@drax/crud-vue": "^0.37.1",
|
|
32
32
|
"@drax/identity-share": "^0.37.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"vue-tsc": "^2.1.6",
|
|
67
67
|
"vuetify": "^3.7.1"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "e4be12cd506bf5255e0f8b26b89cdd2a660a523d"
|
|
70
70
|
}
|
|
@@ -75,7 +75,10 @@ export function useAuth() {
|
|
|
75
75
|
authStore.clearAuth()
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
function hasPermission(permission: string) {
|
|
78
|
+
function hasPermission(permission: string | undefined) {
|
|
79
|
+
if(permission === undefined){
|
|
80
|
+
return false
|
|
81
|
+
}
|
|
79
82
|
return authStore?.authUser?.role?.permissions ? authStore.authUser.role.permissions.includes(permission) : false
|
|
80
83
|
}
|
|
81
84
|
|
|
@@ -51,13 +51,13 @@ const roleDashboard = import.meta.env.VITE_DRAX_USER_ROLE_DASHBOARD === 'ENABLE'
|
|
|
51
51
|
|
|
52
52
|
<template v-slot:item.avatar="{ item }">
|
|
53
53
|
<v-avatar>
|
|
54
|
-
<v-img v-if="item.avatar" :src="item.avatar"></v-img>
|
|
54
|
+
<v-img v-if="(item as IUser).avatar" :src="(item as IUser).avatar"></v-img>
|
|
55
55
|
<v-icon v-else size="50">mdi-account-circle</v-icon>
|
|
56
56
|
</v-avatar>
|
|
57
57
|
</template>
|
|
58
58
|
|
|
59
59
|
<template v-slot:item.role="{ item }">
|
|
60
|
-
<v-chip variant="outlined" :color="item.role.color"> <v-icon v-if="item.role.icon" start>{{item.role.icon}}</v-icon>{{item.role.name}}</v-chip>
|
|
60
|
+
<v-chip variant="outlined" :color="(item as IUser).role.color"> <v-icon v-if="(item as IUser).role.icon" start>{{(item as IUser).role.icon}}</v-icon>{{(item as IUser).role.name}}</v-chip>
|
|
61
61
|
</template>
|
|
62
62
|
|
|
63
63
|
|