@dative-gpi/foundation-core-components 1.0.142-alert-filter-chart → 1.0.142-role

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.
@@ -139,7 +139,8 @@ export default defineComponent({
139
139
  case EntityType.Dashboard:
140
140
  return {
141
141
  dashboardOrganisationsIds: props.modelValue,
142
- dashboardOrganisationTypesIds: props.modelValue
142
+ dashboardOrganisationTypesIds: props.modelValue,
143
+ dashboardShallowsIds: props.modelValue
143
144
  } satisfies DashboardOrganisationFilters & DashboardOrganisationTypeFilters;
144
145
  case EntityType.Group:
145
146
  return {
@@ -114,7 +114,8 @@ export default defineComponent({
114
114
  case EntityType.Dashboard:
115
115
  return {
116
116
  dashboardOrganisationsIds: props.modelValue,
117
- dashboardOrganisationTypesIds: props.modelValue
117
+ dashboardOrganisationTypesIds: props.modelValue,
118
+ dashboardShallowsIds: props.modelValue
118
119
  } satisfies DashboardOrganisationFilters & DashboardOrganisationTypeFilters;
119
120
  case EntityType.Group:
120
121
  return {
@@ -52,7 +52,7 @@
52
52
  >
53
53
  <FSTagGroup
54
54
  variant="slide"
55
- :showRemove="false"
55
+ :disabled="true"
56
56
  :tags="item.tags"
57
57
  />
58
58
  </template>
@@ -316,13 +316,23 @@ export default defineComponent({
316
316
  });
317
317
  });
318
318
 
319
- watch([() => props.alertFilters, () => props.notAcknowledged, () => props.hidePending], (next, previous) => {
319
+ watch(() => [props.alertFilters, props.notAcknowledged, props.hidePending], (next, previous) => {
320
320
  if (!_.isEqual(next, previous)) {
321
- getManyAlerts({
322
- ...props.alertFilters,
323
- acknowledged: props.notAcknowledged ? false : undefined,
324
- statuses: props.hidePending ? [AlertStatus.Unresolved, AlertStatus.Triggered, AlertStatus.Resolved, AlertStatus.Untriggered, AlertStatus.Abandoned] : undefined
325
- });
321
+ if(props.notAcknowledged){
322
+ getManyAlerts({
323
+ ...props.alertFilters,
324
+ acknowledged: false,
325
+ statuses: [AlertStatus.Unresolved, AlertStatus.Triggered],
326
+ });
327
+ }
328
+ else{
329
+ getManyAlerts({
330
+ ...props.alertFilters,
331
+ statuses: props.hidePending ?
332
+ [AlertStatus.Unresolved, AlertStatus.Resolved, AlertStatus.Triggered] : props.alertFilters?.statuses
333
+ }); // TODO, gérer les conditions pour que les alertes s'affichent ici notamment lorsqu'elles sont acquittées
334
+ // la FilterFactory gère pas ces conditions correctement
335
+ }
326
336
  }
327
337
  }, { immediate: true });
328
338
 
@@ -51,8 +51,8 @@
51
51
  >
52
52
  <FSTagGroup
53
53
  variant="slide"
54
+ :disabled="true"
54
55
  :tags="item.tags"
55
- :showRemove="false"
56
56
  />
57
57
  </template>
58
58
  <template
@@ -73,9 +73,8 @@
73
73
  #item.modelsLabels="{ item }"
74
74
  >
75
75
  <FSTagGroup
76
- variant="slide"
76
+ :disabled="true"
77
77
  :tags="item.modelsLabels.map((d: any) => d.label)"
78
- :showRemove="false"
79
78
  />
80
79
  </template>
81
80
  <template
@@ -51,17 +51,16 @@
51
51
  >
52
52
  <FSTagGroup
53
53
  variant="slide"
54
+ :disabled="true"
54
55
  :tags="item.tags"
55
- :showRemove="false"
56
56
  />
57
57
  </template>
58
58
  <template
59
59
  #item.modelsLabels="{ item }"
60
60
  >
61
61
  <FSTagGroup
62
- variant="slide"
62
+ :disabled="true"
63
63
  :tags="item.modelsLabels.map((d: any) => d.label)"
64
- :showRemove="false"
65
64
  />
66
65
  </template>
67
66
  <template
@@ -50,7 +50,7 @@
50
50
  >
51
51
  <FSTagGroup
52
52
  variant="slide"
53
- :showRemove="false"
53
+ :disabled="true"
54
54
  :tags="item.tags"
55
55
  />
56
56
  </template>
@@ -72,7 +72,7 @@
72
72
  #item.modelsLabels="{ item }"
73
73
  >
74
74
  <FSTagGroup
75
- :showRemove="false"
75
+ :disabled="true"
76
76
  :tags="item.modelsLabels.map((d: any) => d.label)"
77
77
  />
78
78
  </template>
@@ -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({
@@ -31,7 +35,7 @@ export default defineComponent({
31
35
  default: () => ({})
32
36
  },
33
37
  dashboardShallowFilters: {
34
- type: Object as PropType<DashboardOrganisationTypeFilters>,
38
+ type: Object as PropType<DashboardShallowFilters>,
35
39
  required: false,
36
40
  default: () => ({})
37
41
  }
@@ -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 = () => {
@@ -68,7 +68,7 @@
68
68
  >
69
69
  <FSTagGroup
70
70
  variant="slide"
71
- :showRemove="false"
71
+ :disabled="true"
72
72
  :tags="item.tags"
73
73
  />
74
74
  </template>
@@ -48,7 +48,7 @@
48
48
  >
49
49
  <FSTagGroup
50
50
  variant="slide"
51
- :showRemove="false"
51
+ :disabled="true"
52
52
  :tags="item.tags"
53
53
  />
54
54
  </template>
@@ -44,7 +44,7 @@
44
44
  >
45
45
  <FSTagGroup
46
46
  variant="slide"
47
- :showRemove="false"
47
+ :disabled="true"
48
48
  :tags="item.tags"
49
49
  />
50
50
  </template>
@@ -44,7 +44,7 @@
44
44
  >
45
45
  <FSTagGroup
46
46
  variant="slide"
47
- :showRemove="false"
47
+ :disabled="true"
48
48
  :tags="item.tags"
49
49
  />
50
50
  </template>
@@ -61,7 +61,7 @@
61
61
  >
62
62
  <FSTagGroup
63
63
  variant="slide"
64
- :showRemove="false"
64
+ :disabled="true"
65
65
  :tags="item.tags"
66
66
  />
67
67
  </template>
@@ -50,7 +50,7 @@
50
50
  >
51
51
  <FSTagGroup
52
52
  variant="slide"
53
- :showRemove="false"
53
+ :disabled="true"
54
54
  :tags="item.tags"
55
55
  />
56
56
  </template>
@@ -41,7 +41,7 @@
41
41
  >
42
42
  <FSTagGroup
43
43
  variant="slide"
44
- :showRemove="false"
44
+ :disabled="true"
45
45
  :tags="item.tags"
46
46
  />
47
47
  </template>
@@ -44,7 +44,7 @@
44
44
  >
45
45
  <FSTagGroup
46
46
  variant="slide"
47
- :showRemove="false"
47
+ :disabled="true"
48
48
  :tags="item.tags"
49
49
  />
50
50
  </template>
@@ -55,7 +55,7 @@
55
55
  >
56
56
  <FSTagGroup
57
57
  variant="slide"
58
- :showRemove="false"
58
+ :disabled="true"
59
59
  :tags="item.tags"
60
60
  />
61
61
  </template>
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.142-alert-filter-chart",
4
+ "version": "1.0.142-role",
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.142-alert-filter-chart",
14
- "@dative-gpi/foundation-core-services": "1.0.142-alert-filter-chart",
15
- "@dative-gpi/foundation-shared-components": "1.0.142-alert-filter-chart",
16
- "@dative-gpi/foundation-shared-domain": "1.0.142-alert-filter-chart",
17
- "@dative-gpi/foundation-shared-services": "1.0.142-alert-filter-chart"
13
+ "@dative-gpi/foundation-core-domain": "1.0.142-role",
14
+ "@dative-gpi/foundation-core-services": "1.0.142-role",
15
+ "@dative-gpi/foundation-shared-components": "1.0.142-role",
16
+ "@dative-gpi/foundation-shared-domain": "1.0.142-role",
17
+ "@dative-gpi/foundation-shared-services": "1.0.142-role"
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": "736eafad511c2f355e23f419e1967490f27bae96"
29
+ "gitHead": "071352c70ea94f5fc39e1ad8d9c058b9e1da95b9"
30
30
  }