@dative-gpi/foundation-core-components 0.0.115 → 0.0.117
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 +7 -7
- package/utils/index.ts +2 -1
- package/utils/users.ts +20 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-core-components",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.117",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@dative-gpi/foundation-core-domain": "0.0.
|
|
14
|
-
"@dative-gpi/foundation-core-services": "0.0.
|
|
15
|
-
"@dative-gpi/foundation-shared-components": "0.0.
|
|
16
|
-
"@dative-gpi/foundation-shared-domain": "0.0.
|
|
17
|
-
"@dative-gpi/foundation-shared-services": "0.0.
|
|
13
|
+
"@dative-gpi/foundation-core-domain": "0.0.117",
|
|
14
|
+
"@dative-gpi/foundation-core-services": "0.0.117",
|
|
15
|
+
"@dative-gpi/foundation-shared-components": "0.0.117",
|
|
16
|
+
"@dative-gpi/foundation-shared-domain": "0.0.117",
|
|
17
|
+
"@dative-gpi/foundation-shared-services": "0.0.117",
|
|
18
18
|
"color": "^4.2.3",
|
|
19
19
|
"vue": "^3.4.23",
|
|
20
20
|
"vuedraggable": "^4.1.0"
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"sass": "^1.69.5",
|
|
25
25
|
"sass-loader": "^13.3.2"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "434ff73f13f863998d707d010b4d9e2323e8391e"
|
|
28
28
|
}
|
package/utils/index.ts
CHANGED
package/utils/users.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
2
|
+
import { UserType } from "@dative-gpi/foundation-core-domain/models"
|
|
3
|
+
|
|
4
|
+
const { $tr } = useTranslationsProvider();
|
|
5
|
+
|
|
6
|
+
export const userTypeLabel = (type: UserType): string => {
|
|
7
|
+
switch (type) {
|
|
8
|
+
case UserType.User: return $tr("ui.user-type.user", "User");
|
|
9
|
+
case UserType.ServiceAccount: return $tr("ui.user-type.service-account", "Service account");
|
|
10
|
+
case UserType.Extension: return $tr("ui.user-type.extension", "Extension");
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const userTypeIcon = (type: UserType): string => {
|
|
15
|
+
switch (type) {
|
|
16
|
+
case UserType.User: return "mdi-account-multiple-outline";
|
|
17
|
+
case UserType.ServiceAccount: return "mdi-puzzle-outline";
|
|
18
|
+
case UserType.Extension: return "mdi-cog-outline";
|
|
19
|
+
}
|
|
20
|
+
};
|