@dative-gpi/foundation-core-components 0.0.114 → 0.0.116

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-core-components",
3
3
  "sideEffects": false,
4
- "version": "0.0.114",
4
+ "version": "0.0.116",
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.114",
14
- "@dative-gpi/foundation-core-services": "0.0.114",
15
- "@dative-gpi/foundation-shared-components": "0.0.114",
16
- "@dative-gpi/foundation-shared-domain": "0.0.114",
17
- "@dative-gpi/foundation-shared-services": "0.0.114",
13
+ "@dative-gpi/foundation-core-domain": "0.0.116",
14
+ "@dative-gpi/foundation-core-services": "0.0.116",
15
+ "@dative-gpi/foundation-shared-components": "0.0.116",
16
+ "@dative-gpi/foundation-shared-domain": "0.0.116",
17
+ "@dative-gpi/foundation-shared-services": "0.0.116",
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": "10b5d9cd947ab4de3f652d69bee6e2ec4f6a3d37"
27
+ "gitHead": "256a9873798401b1de30bb4c1ee289c037c30997"
28
28
  }
package/utils/index.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * from "./dashboards";
2
- export * from "./roles";
2
+ export * from "./roles";
3
+ export * from "./users";
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
+ };