@dative-gpi/foundation-core-components 0.0.70 → 0.0.72

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.
@@ -0,0 +1,68 @@
1
+ <template>
2
+ <FSLoadTile
3
+ v-if="getting"
4
+ :editable="$props.editable"
5
+ :modelValue="$props.modelValue"
6
+ @update:modelValue="(value) => $emit('update:modelValue', value)"
7
+ />
8
+ <FSDashboardOrganisationTileUI
9
+ v-else-if="entity"
10
+ :label="entity.label"
11
+ :code="entity.code"
12
+ :bottomColor="entity.colors"
13
+ :icon="entity.icon"
14
+ :editable="$props.editable"
15
+ :modelValue="$props.modelValue"
16
+ @update:modelValue="(value) => $emit('update:modelValue', value)"
17
+ v-bind="$attrs"
18
+ />
19
+ </template>
20
+
21
+ <script lang="ts">
22
+ import { defineComponent, onMounted, watch } from "vue";
23
+
24
+ import { useDashboardOrganisation } from "@dative-gpi/foundation-core-services/composables";
25
+
26
+ import FSDashboardOrganisationTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSDashboardOrganisationTileUI.vue";
27
+ import FSLoadTile from "@dative-gpi/foundation-shared-components/components/tiles/FSLoadTile.vue";
28
+
29
+ export default defineComponent({
30
+ name: "FSDashboardOrganisationTile",
31
+ components: {
32
+ FSDashboardOrganisationTileUI,
33
+ FSLoadTile
34
+ },
35
+ props: {
36
+ dashboardOrganisationId: {
37
+ type: String,
38
+ required: true
39
+ },
40
+ modelValue: {
41
+ type: Boolean,
42
+ required: false,
43
+ default: false
44
+ },
45
+ editable: {
46
+ type: Boolean,
47
+ required: false,
48
+ default: true
49
+ }
50
+ },
51
+ setup(props) {
52
+ const { get, getting, entity } = useDashboardOrganisation();
53
+
54
+ onMounted(() => {
55
+ get(props.dashboardOrganisationId);
56
+ });
57
+
58
+ watch(() => props.dashboardOrganisationId, () => {
59
+ get(props.dashboardOrganisationId);
60
+ });
61
+
62
+ return {
63
+ getting,
64
+ entity
65
+ };
66
+ }
67
+ });
68
+ </script>
@@ -0,0 +1,68 @@
1
+ <template>
2
+ <FSLoadTile
3
+ v-if="getting"
4
+ :editable="$props.editable"
5
+ :modelValue="$props.modelValue"
6
+ @update:modelValue="(value) => $emit('update:modelValue', value)"
7
+ />
8
+ <FSDashboardOrganisationTypeTileUI
9
+ v-else-if="entity"
10
+ :label="entity.label"
11
+ :code="entity.code"
12
+ :bottomColor="entity.colors"
13
+ :icon="entity.icon"
14
+ :editable="$props.editable"
15
+ :modelValue="$props.modelValue"
16
+ @update:modelValue="(value) => $emit('update:modelValue', value)"
17
+ v-bind="$attrs"
18
+ />
19
+ </template>
20
+
21
+ <script lang="ts">
22
+ import { defineComponent, onMounted, watch } from "vue";
23
+
24
+ import { useDashboardOrganisationType } from "@dative-gpi/foundation-core-services/composables";
25
+
26
+ import FSDashboardOrganisationTypeTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSDashboardOrganisationTypeTileUI.vue";
27
+ import FSLoadTile from "@dative-gpi/foundation-shared-components/components/tiles/FSLoadTile.vue";
28
+
29
+ export default defineComponent({
30
+ name: "FSDashboardOrganisationTypeTile",
31
+ components: {
32
+ FSDashboardOrganisationTypeTileUI,
33
+ FSLoadTile
34
+ },
35
+ props: {
36
+ dashboardOrganisationTypeId: {
37
+ type: String,
38
+ required: true
39
+ },
40
+ modelValue: {
41
+ type: Boolean,
42
+ required: false,
43
+ default: false
44
+ },
45
+ editable: {
46
+ type: Boolean,
47
+ required: false,
48
+ default: true
49
+ }
50
+ },
51
+ setup(props) {
52
+ const { get, getting, entity } = useDashboardOrganisationType();
53
+
54
+ onMounted(() => {
55
+ get(props.dashboardOrganisationTypeId);
56
+ });
57
+
58
+ watch(() => props.dashboardOrganisationTypeId, () => {
59
+ get(props.dashboardOrganisationTypeId);
60
+ });
61
+
62
+ return {
63
+ getting,
64
+ entity
65
+ };
66
+ }
67
+ });
68
+ </script>
@@ -0,0 +1,68 @@
1
+ <template>
2
+ <FSLoadTile
3
+ v-if="getting"
4
+ :editable="$props.editable"
5
+ :modelValue="$props.modelValue"
6
+ @update:modelValue="(value) => $emit('update:modelValue', value)"
7
+ />
8
+ <FSDashboardShallowTileUI
9
+ v-else-if="entity"
10
+ :label="entity.label"
11
+ :code="entity.code"
12
+ :bottomColor="entity.colors"
13
+ :icon="entity.icon"
14
+ :editable="$props.editable"
15
+ :modelValue="$props.modelValue"
16
+ @update:modelValue="(value) => $emit('update:modelValue', value)"
17
+ v-bind="$attrs"
18
+ />
19
+ </template>
20
+
21
+ <script lang="ts">
22
+ import { defineComponent, onMounted, watch } from "vue";
23
+
24
+ import { useDashboardShallow } from "@dative-gpi/foundation-core-services/composables";
25
+
26
+ import FSDashboardShallowTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSDashboardShallowTileUI.vue";
27
+ import FSLoadTile from "@dative-gpi/foundation-shared-components/components/tiles/FSLoadTile.vue";
28
+
29
+ export default defineComponent({
30
+ name: "FSDashboardShallowTile",
31
+ components: {
32
+ FSDashboardShallowTileUI,
33
+ FSLoadTile
34
+ },
35
+ props: {
36
+ dashboardShallowId: {
37
+ type: String,
38
+ required: true
39
+ },
40
+ modelValue: {
41
+ type: Boolean,
42
+ required: false,
43
+ default: false
44
+ },
45
+ editable: {
46
+ type: Boolean,
47
+ required: false,
48
+ default: true
49
+ }
50
+ },
51
+ setup(props) {
52
+ const { get, getting, entity } = useDashboardShallow();
53
+
54
+ onMounted(() => {
55
+ get(props.dashboardShallowId);
56
+ });
57
+
58
+ watch(() => props.dashboardShallowId, () => {
59
+ get(props.dashboardShallowId);
60
+ });
61
+
62
+ return {
63
+ getting,
64
+ entity
65
+ };
66
+ }
67
+ });
68
+ </script>
@@ -0,0 +1,68 @@
1
+ <template>
2
+ <FSLoadTile
3
+ v-if="getting"
4
+ :editable="$props.editable"
5
+ :modelValue="$props.modelValue"
6
+ @update:modelValue="(value) => $emit('update:modelValue', value)"
7
+ />
8
+ <FSFolderTileUI
9
+ v-else-if="entity"
10
+ :label="entity.label"
11
+ :code="entity.code"
12
+ :bottomColor="entity.colors"
13
+ :icon="entity.icon"
14
+ :editable="$props.editable"
15
+ :modelValue="$props.modelValue"
16
+ @update:modelValue="(value) => $emit('update:modelValue', value)"
17
+ v-bind="$attrs"
18
+ />
19
+ </template>
20
+
21
+ <script lang="ts">
22
+ import { defineComponent, onMounted, watch } from "vue";
23
+
24
+ import { useDashboardOrganisation, useFolder } from "@dative-gpi/foundation-core-services/composables";
25
+
26
+ import FSFolderTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSFolderTileUI.vue";
27
+ import FSLoadTile from "@dative-gpi/foundation-shared-components/components/tiles/FSLoadTile.vue";
28
+
29
+ export default defineComponent({
30
+ name: "FSFolderTile",
31
+ components: {
32
+ FSFolderTileUI,
33
+ FSLoadTile
34
+ },
35
+ props: {
36
+ folderId: {
37
+ type: String,
38
+ required: true
39
+ },
40
+ modelValue: {
41
+ type: Boolean,
42
+ required: false,
43
+ default: false
44
+ },
45
+ editable: {
46
+ type: Boolean,
47
+ required: false,
48
+ default: true
49
+ }
50
+ },
51
+ setup(props) {
52
+ const { get, getting, entity } = useFolder();
53
+
54
+ onMounted(() => {
55
+ get(props.folderId);
56
+ });
57
+
58
+ watch(() => props.folderId, () => {
59
+ get(props.folderId);
60
+ });
61
+
62
+ return {
63
+ getting,
64
+ entity
65
+ };
66
+ }
67
+ });
68
+ </script>
@@ -8,9 +8,12 @@
8
8
  <FSGroupTileUI
9
9
  v-else-if="entity"
10
10
  :imageId="entity.imageId"
11
- :name="name"
11
+ :name="entity.name"
12
+ :label="entity.label"
13
+ :userType="entity.userType"
12
14
  :roleLabel="entity.roleLabel"
13
15
  :roleIcon="entity.roleIcon"
16
+ :admin="entity.admin"
14
17
  :editable="$props.editable"
15
18
  :modelValue="modelValue"
16
19
  @update:modelValue="(value) => $emit('update:modelValue', value)"
@@ -19,13 +22,12 @@
19
22
  </template>
20
23
 
21
24
  <script lang="ts">
22
- import { computed, defineComponent, onMounted, watch } from "vue";
25
+ import { defineComponent, onMounted, watch } from "vue";
23
26
 
24
27
  import { useUserOrganisation } from "@dative-gpi/foundation-core-services/composables";
25
28
 
26
29
  import FSUserOrganisationTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSUserOrganisationTileUI.vue";
27
30
  import FSLoadTile from "@dative-gpi/foundation-shared-components/components/tiles/FSLoadTile.vue";
28
- import { UserType } from "@dative-gpi/foundation-core-domain/models";
29
31
 
30
32
  export default defineComponent({
31
33
  name: "FSUserOrganisationTile",
@@ -52,16 +54,6 @@ export default defineComponent({
52
54
  setup(props) {
53
55
  const { get, getting, entity } = useUserOrganisation();
54
56
 
55
- const name = computed((): string => {
56
- if (entity.value) {
57
- switch (entity.value.userType) {
58
- case UserType.User: return entity.value.name;
59
- default: return entity.value.label;
60
- }
61
- }
62
- return "";
63
- });
64
-
65
57
  onMounted(() => {
66
58
  get(props.userOrganisationId);
67
59
  });
@@ -72,8 +64,7 @@ export default defineComponent({
72
64
 
73
65
  return {
74
66
  getting,
75
- entity,
76
- name
67
+ entity
77
68
  };
78
69
  }
79
70
  });
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.70",
4
+ "version": "0.0.72",
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.70",
14
- "@dative-gpi/foundation-core-services": "0.0.70",
15
- "@dative-gpi/foundation-shared-components": "0.0.70",
16
- "@dative-gpi/foundation-shared-domain": "0.0.70",
17
- "@dative-gpi/foundation-shared-services": "0.0.70",
13
+ "@dative-gpi/foundation-core-domain": "0.0.72",
14
+ "@dative-gpi/foundation-core-services": "0.0.72",
15
+ "@dative-gpi/foundation-shared-components": "0.0.72",
16
+ "@dative-gpi/foundation-shared-domain": "0.0.72",
17
+ "@dative-gpi/foundation-shared-services": "0.0.72",
18
18
  "color": "^4.2.3",
19
19
  "vue": "^3.2.0",
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": "e280ffdb9ee5d27727cc01325689b792168febcd"
27
+ "gitHead": "dbc4787e4b28439c3d9284f6e430daab222cd671"
28
28
  }