@dative-gpi/foundation-core-components 1.1.9 → 1.1.11

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.
@@ -41,7 +41,7 @@ import { defineComponent, ref, type PropType, computed } from "vue";
41
41
 
42
42
  import { EntityType } from "@dative-gpi/foundation-shared-domain/enums";
43
43
 
44
- import type { DashboardOrganisationFilters, DashboardOrganisationTypeFilters, DeviceOrganisationFilters, FolderFilters, GroupFilters, LocationFilters, ModelFilters, UserOrganisationFilters } from "@dative-gpi/foundation-core-domain/models";
44
+ import type { DashboardOrganisationFilters, DashboardOrganisationTypeFilters, DashboardShallowFilters, DeviceOrganisationFilters, FolderFilters, GroupFilters, GroupingFilters, LocationFilters, ModelFilters, SubgroupingFilters, UserOrganisationFilters } from "@dative-gpi/foundation-core-domain/models";
45
45
 
46
46
  import FSEntityFieldUI from "@dative-gpi/foundation-shared-components/components/fields/FSEntityFieldUI.vue";
47
47
 
@@ -141,7 +141,7 @@ export default defineComponent({
141
141
  dashboardOrganisationsIds: props.modelValue,
142
142
  dashboardOrganisationTypesIds: props.modelValue,
143
143
  dashboardShallowsIds: props.modelValue
144
- } satisfies DashboardOrganisationFilters & DashboardOrganisationTypeFilters;
144
+ } satisfies DashboardOrganisationFilters & DashboardOrganisationTypeFilters & DashboardShallowFilters;
145
145
  case EntityType.Group:
146
146
  return {
147
147
  groupsIds: props.modelValue
@@ -162,6 +162,14 @@ export default defineComponent({
162
162
  return {
163
163
  modelsIds: props.modelValue
164
164
  } satisfies ModelFilters;
165
+ case EntityType.Grouping:
166
+ return {
167
+ groupingsIds: props.modelValue
168
+ } satisfies GroupingFilters;
169
+ case EntityType.Subgrouping:
170
+ return {
171
+ subgroupingsIds: props.modelValue
172
+ } satisfies SubgroupingFilters;
165
173
  default:
166
174
  return undefined;
167
175
  };
@@ -223,7 +223,7 @@ export default defineComponent({
223
223
  };
224
224
  case EntityType.Grouping:
225
225
  return {
226
- groupingsFilters: props.filters,
226
+ groupingFilters: props.filters,
227
227
  ...attrs
228
228
  };
229
229
  case EntityType.Subgrouping:
@@ -43,10 +43,10 @@ export default defineComponent({
43
43
  return defineAsyncComponent(() => import("../lists/locations/FSSimpleLocationsList.vue"));
44
44
  case EntityType.Model:
45
45
  return defineAsyncComponent(() => import("../lists/models/FSSimpleModelsList.vue"));
46
- case EntityType.Subgrouping:
47
- return defineAsyncComponent(() => import("../lists/subgroupings/FSSimpleSubgroupingsList.vue"));
48
46
  case EntityType.Grouping:
49
47
  return defineAsyncComponent(() => import("../lists/groupings/FSSimpleGroupingsList.vue"));
48
+ case EntityType.Subgrouping:
49
+ return defineAsyncComponent(() => import("../lists/subgroupings/FSSimpleSubgroupingsList.vue"));
50
50
  default:
51
51
  return null;
52
52
  };
@@ -72,7 +72,7 @@ export default defineComponent({
72
72
  type: Function as PropType<(item: GroupingInfos) => Partial<RouteLocation>>,
73
73
  required: false
74
74
  },
75
- groupingsFilters: {
75
+ groupingFilters: {
76
76
  type: Object as PropType<GroupingFilters>,
77
77
  required: false,
78
78
  default: null
@@ -101,9 +101,9 @@ export default defineComponent({
101
101
  return props.modelValue.includes(id);
102
102
  };
103
103
 
104
- watch(() => props.groupingsFilters, (next, previous) => {
104
+ watch(() => props.groupingFilters, (next, previous) => {
105
105
  if ((!next && !previous) || !_.isEqual(next, previous)) {
106
- fetchGroupings(props.groupingsFilters);
106
+ fetchGroupings(props.groupingFilters);
107
107
  }
108
108
  }, { immediate: true });
109
109
 
@@ -50,6 +50,13 @@
50
50
  :value="item.allowSms"
51
51
  />
52
52
  </template>
53
+ <template
54
+ #item.allowNotifications="{ item }"
55
+ >
56
+ <FSIconCheck
57
+ :value="item.allowNotifications"
58
+ />
59
+ </template>
53
60
  <template
54
61
  #item.tags="{ item }"
55
62
  >
@@ -77,6 +84,15 @@
77
84
  {{ userTypeLabel(item.userType) }}
78
85
  </FSSpan>
79
86
  </template>
87
+ <template
88
+ #item.lastActivity="{ item }"
89
+ >
90
+ <FSSpan
91
+ font="text-overline"
92
+ >
93
+ {{ epochToShortTimeFormat(item.lastActivity) }}
94
+ </FSSpan>
95
+ </template>
80
96
  <template
81
97
  #item.tile="{ index, item, toggleSelect }"
82
98
  >
@@ -100,6 +116,7 @@ import _ from "lodash";
100
116
  import type { UserOrganisationFilters, UserOrganisationInfos } from "@dative-gpi/foundation-core-domain/models";
101
117
  import { userTypeLabel, userValidityLabel } from "@dative-gpi/foundation-core-components/utils";
102
118
  import { useUserOrganisations } from "@dative-gpi/foundation-core-services/composables";
119
+ import { useDateFormat } from "@dative-gpi/foundation-shared-services/composables";
103
120
 
104
121
  import FSDataTable from "../FSDataTable.vue";
105
122
 
@@ -149,6 +166,7 @@ export default defineComponent({
149
166
  emits: ["update:modelValue"],
150
167
  setup(props) {
151
168
  const { getMany: fetchUserOrganisations, entities: userOrganisations, fetching: fetchingUserOrganisations } = useUserOrganisations();
169
+ const { epochToShortTimeFormat } = useDateFormat();
152
170
 
153
171
  const isSelected = (id: string): boolean => {
154
172
  return props.modelValue.includes(id);
@@ -163,6 +181,7 @@ export default defineComponent({
163
181
  return {
164
182
  fetchingUserOrganisations,
165
183
  userOrganisations,
184
+ epochToShortTimeFormat,
166
185
  userValidityLabel,
167
186
  userTypeLabel,
168
187
  isSelected
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "url": "https://github.com/Dative-GPI/foundation-shared-ui.git"
5
5
  },
6
6
  "sideEffects": false,
7
- "version": "1.1.9",
7
+ "version": "1.1.11",
8
8
  "description": "",
9
9
  "publishConfig": {
10
10
  "access": "public"
@@ -13,11 +13,11 @@
13
13
  "author": "",
14
14
  "license": "ISC",
15
15
  "dependencies": {
16
- "@dative-gpi/foundation-core-domain": "1.1.9",
17
- "@dative-gpi/foundation-core-services": "1.1.9",
18
- "@dative-gpi/foundation-shared-components": "1.1.9",
19
- "@dative-gpi/foundation-shared-domain": "1.1.9",
20
- "@dative-gpi/foundation-shared-services": "1.1.9"
16
+ "@dative-gpi/foundation-core-domain": "1.1.11",
17
+ "@dative-gpi/foundation-core-services": "1.1.11",
18
+ "@dative-gpi/foundation-shared-components": "1.1.11",
19
+ "@dative-gpi/foundation-shared-domain": "1.1.11",
20
+ "@dative-gpi/foundation-shared-services": "1.1.11"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "@dative-gpi/bones-ui": "^1.0.0",
@@ -29,5 +29,5 @@
29
29
  "sass": "1.71.1",
30
30
  "sass-loader": "13.3.2"
31
31
  },
32
- "gitHead": "8038b4a3049af008bc22173c7870de416bce25f1"
32
+ "gitHead": "88c49955eb1072121652331d9703ca0879d872fe"
33
33
  }