@dative-gpi/foundation-core-components 1.0.141 → 1.0.142

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.
@@ -8,10 +8,14 @@
8
8
 
9
9
  <script lang="ts">
10
10
  import { defineComponent, type PropType, watch, computed } from "vue";
11
+ import _ from "lodash";
11
12
 
12
13
  import type { DashboardOrganisationFilters, DashboardOrganisationTypeFilters } from "@dative-gpi/foundation-core-domain/models";
13
14
  import { useDashboardOrganisations, useDashboardOrganisationTypes, useDashboardShallows } from "@dative-gpi/foundation-core-services/composables";
14
15
 
16
+ import { DashboardType } from '@dative-gpi/foundation-shared-domain/enums';
17
+ import type { DashboardsListItem } from '@dative-gpi/foundation-core-components/utils';
18
+
15
19
  import FSSimpleList from "@dative-gpi/foundation-shared-components/components/lists/FSSimpleList.vue";
16
20
 
17
21
  export default defineComponent({
@@ -51,8 +55,21 @@ export default defineComponent({
51
55
  || fetchingDashboardOrganisationTypes.value
52
56
  || fetchingDashboardShallows.value);
53
57
 
54
- const dashboards = computed(() => {
55
- return [...dashboardOrganisations.value, ...dashboardOrganisationTypes.value, ...dashboardShallows.value];
58
+ const dashboards = computed((): DashboardsListItem[] => {
59
+ return _.sortBy([
60
+ ...dashboardOrganisationTypes.value.map(g => ({
61
+ ...g,
62
+ dashboardType: DashboardType.OrganisationType
63
+ })) satisfies DashboardsListItem[],
64
+ ...dashboardOrganisations.value.map(d => ({
65
+ ...d,
66
+ dashboardType: DashboardType.Organisation
67
+ })) as DashboardsListItem[],
68
+ ...dashboardShallows.value.map(d => ({
69
+ ...d,
70
+ dashboardType: DashboardType.Shallow
71
+ })) as DashboardsListItem[]
72
+ ], d => d.label);
56
73
  });
57
74
 
58
75
  const fetch = () => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-core-components",
3
3
  "sideEffects": false,
4
- "version": "1.0.141",
4
+ "version": "1.0.142",
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": "1.0.141",
14
- "@dative-gpi/foundation-core-services": "1.0.141",
15
- "@dative-gpi/foundation-shared-components": "1.0.141",
16
- "@dative-gpi/foundation-shared-domain": "1.0.141",
17
- "@dative-gpi/foundation-shared-services": "1.0.141"
13
+ "@dative-gpi/foundation-core-domain": "1.0.142",
14
+ "@dative-gpi/foundation-core-services": "1.0.142",
15
+ "@dative-gpi/foundation-shared-components": "1.0.142",
16
+ "@dative-gpi/foundation-shared-domain": "1.0.142",
17
+ "@dative-gpi/foundation-shared-services": "1.0.142"
18
18
  },
19
19
  "peerDependencies": {
20
20
  "@dative-gpi/bones-ui": "^1.0.0",
@@ -26,5 +26,5 @@
26
26
  "sass": "1.71.1",
27
27
  "sass-loader": "13.3.2"
28
28
  },
29
- "gitHead": "546c34dcd1c901702666278bf19094ab4156ea5a"
29
+ "gitHead": "36eca468f78075f88bb6638dbfdee9bdecf270ce"
30
30
  }