@dative-gpi/foundation-core-components 0.0.69 → 0.0.71

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.
@@ -28,8 +28,8 @@
28
28
  import { defineComponent, onMounted, onUnmounted, ref, Ref, watch } from "vue";
29
29
  import { useRouter } from "vue-router";
30
30
 
31
+ import { useUserOrganisationTable, useUpdateUserOrganisationTable } from "@dative-gpi/foundation-core-services/composables";
31
32
  import { FSDataTableColumn, FSDataTableFilter, FSDataTableOrder } from "@dative-gpi/foundation-shared-components/models";
32
- import { useTable, useUpdateTable } from "@dative-gpi/foundation-core-services/composables";
33
33
  import { useDebounce } from "@dative-gpi/foundation-shared-components/composables";
34
34
 
35
35
  import FSLoadDataTable from "@dative-gpi/foundation-shared-components/components/lists/FSLoadDataTable.vue";
@@ -48,9 +48,9 @@ export default defineComponent({
48
48
  }
49
49
  },
50
50
  setup(props) {
51
- const { get, getting, entity } = useTable();
51
+ const { get, getting, entity } = useUserOrganisationTable();
52
+ const { update } = useUpdateUserOrganisationTable();
52
53
  const { debounce, cancel } = useDebounce();
53
- const { update } = useUpdateTable();
54
54
  const router = useRouter();
55
55
 
56
56
  const innerHeaders: Ref<FSDataTableColumn[]> = ref([]);
@@ -65,7 +65,10 @@ export default defineComponent({
65
65
  const query = JSON.parse(router.currentRoute.value.query[props.tableCode] as string);
66
66
  innerHeaders.value = query.columns;
67
67
  innerRowsPerPage.value = query.rowsPerPage;
68
- innerSortBy.value = query.sortBy;
68
+ innerSortBy.value = query.sortByKey ? {
69
+ key: query.sortByKey,
70
+ order: query.sortByOrder
71
+ } : null;
69
72
  innerMode.value = query.mode;
70
73
  innerFilters.value = query.filters;
71
74
  innerPage.value = query.page;
@@ -73,7 +76,10 @@ export default defineComponent({
73
76
  else {
74
77
  innerHeaders.value = entity.value.columns;
75
78
  innerRowsPerPage.value = entity.value.rowsPerPage;
76
- innerSortBy.value = entity.value.sortBy;
79
+ innerSortBy.value = entity.value.sortByKey ? {
80
+ key: entity.value.sortByKey,
81
+ order: entity.value.sortByOrder
82
+ } : null;
77
83
  innerMode.value = entity.value.mode;
78
84
  }
79
85
  };
@@ -117,7 +123,8 @@ export default defineComponent({
117
123
  index: column.index
118
124
  })),
119
125
  rowsPerPage: innerRowsPerPage.value,
120
- sortBy: innerSortBy.value,
126
+ sortByKey: innerSortBy.value?.key,
127
+ sortByOrder: innerSortBy.value?.order,
121
128
  mode: innerMode.value
122
129
  });
123
130
  };
@@ -130,7 +137,8 @@ export default defineComponent({
130
137
  [props.tableCode]: JSON.stringify({
131
138
  columns: innerHeaders.value,
132
139
  rowsPerPage: innerRowsPerPage.value,
133
- sortBy: innerSortBy.value,
140
+ sortByKey: innerSortBy.value?.key,
141
+ sortByOrder: innerSortBy.value?.order,
134
142
  mode: innerMode.value,
135
143
  filters: innerFilters.value,
136
144
  page: innerPage.value
@@ -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
+ <FSSimpleIconTileUI
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 FSSimpleIconTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSSimpleIconTileUI.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
+ FSSimpleIconTileUI,
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
+ <FSSimpleIconTileUI
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 FSSimpleIconTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSSimpleIconTileUI.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
+ FSSimpleIconTileUI,
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,69 @@
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
+ <FSSimpleIconTileUI
9
+ v-else-if="entity"
10
+ :label="entity.label"
11
+ :code="entity.code"
12
+ :bottomColor="entity.colors"
13
+ :iconBackgroundColor="entity.colors"
14
+ :icon="entity.icon"
15
+ :editable="$props.editable"
16
+ :modelValue="$props.modelValue"
17
+ @update:modelValue="(value) => $emit('update:modelValue', value)"
18
+ v-bind="$attrs"
19
+ />
20
+ </template>
21
+
22
+ <script lang="ts">
23
+ import { defineComponent, onMounted, watch } from "vue";
24
+
25
+ import { useDashboardOrganisation, useFolder } from "@dative-gpi/foundation-core-services/composables";
26
+
27
+ import FSSimpleIconTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSSimpleIconTileUI.vue";
28
+ import FSLoadTile from "@dative-gpi/foundation-shared-components/components/tiles/FSLoadTile.vue";
29
+
30
+ export default defineComponent({
31
+ name: "FSDashboardTile",
32
+ components: {
33
+ FSSimpleIconTileUI,
34
+ FSLoadTile
35
+ },
36
+ props: {
37
+ folderId: {
38
+ type: String,
39
+ required: true
40
+ },
41
+ modelValue: {
42
+ type: Boolean,
43
+ required: false,
44
+ default: false
45
+ },
46
+ editable: {
47
+ type: Boolean,
48
+ required: false,
49
+ default: true
50
+ }
51
+ },
52
+ setup(props) {
53
+ const { get, getting, entity } = useFolder();
54
+
55
+ onMounted(() => {
56
+ get(props.folderId);
57
+ });
58
+
59
+ watch(() => props.folderId, () => {
60
+ get(props.folderId);
61
+ });
62
+
63
+ return {
64
+ getting,
65
+ entity
66
+ };
67
+ }
68
+ });
69
+ </script>
@@ -0,0 +1,71 @@
1
+ <template>
2
+ <FSLoadTile
3
+ v-if="getting"
4
+ :editable="$props.editable"
5
+ :modelValue="modelValue"
6
+ @update:modelValue="(value) => $emit('update:modelValue', value)"
7
+ />
8
+ <FSGroupTileUI
9
+ v-else-if="entity"
10
+ :imageId="entity.imageId"
11
+ :name="entity.name"
12
+ :label="entity.label"
13
+ :userType="entity.userType"
14
+ :roleLabel="entity.roleLabel"
15
+ :roleIcon="entity.roleIcon"
16
+ :admin="entity.admin"
17
+ :editable="$props.editable"
18
+ :modelValue="modelValue"
19
+ @update:modelValue="(value) => $emit('update:modelValue', value)"
20
+ v-bind="$attrs"
21
+ />
22
+ </template>
23
+
24
+ <script lang="ts">
25
+ import { defineComponent, onMounted, watch } from "vue";
26
+
27
+ import { useUserOrganisation } from "@dative-gpi/foundation-core-services/composables";
28
+
29
+ import FSUserOrganisationTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSUserOrganisationTileUI.vue";
30
+ import FSLoadTile from "@dative-gpi/foundation-shared-components/components/tiles/FSLoadTile.vue";
31
+
32
+ export default defineComponent({
33
+ name: "FSUserOrganisationTile",
34
+ components: {
35
+ FSUserOrganisationTileUI,
36
+ FSLoadTile
37
+ },
38
+ props: {
39
+ userOrganisationId: {
40
+ type: String,
41
+ required: true
42
+ },
43
+ modelValue: {
44
+ type: Boolean,
45
+ required: false,
46
+ default: false
47
+ },
48
+ editable: {
49
+ type: Boolean,
50
+ required: false,
51
+ default: true
52
+ }
53
+ },
54
+ setup(props) {
55
+ const { get, getting, entity } = useUserOrganisation();
56
+
57
+ onMounted(() => {
58
+ get(props.userOrganisationId);
59
+ });
60
+
61
+ watch(() => props.userOrganisationId, () => {
62
+ get(props.userOrganisationId);
63
+ });
64
+
65
+ return {
66
+ getting,
67
+ entity
68
+ };
69
+ }
70
+ });
71
+ </script>
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.69",
4
+ "version": "0.0.71",
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.69",
14
- "@dative-gpi/foundation-core-services": "0.0.69",
15
- "@dative-gpi/foundation-shared-components": "0.0.69",
16
- "@dative-gpi/foundation-shared-domain": "0.0.69",
17
- "@dative-gpi/foundation-shared-services": "0.0.69",
13
+ "@dative-gpi/foundation-core-domain": "0.0.71",
14
+ "@dative-gpi/foundation-core-services": "0.0.71",
15
+ "@dative-gpi/foundation-shared-components": "0.0.71",
16
+ "@dative-gpi/foundation-shared-domain": "0.0.71",
17
+ "@dative-gpi/foundation-shared-services": "0.0.71",
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": "f42750502e3f9499a2df817d41a2e89847c83cdd"
27
+ "gitHead": "72097470e9163b0da5e7ab5d67496ac5c403f918"
28
28
  }