@dative-gpi/foundation-core-components 1.0.63 → 1.0.65
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.
- package/components/customProperties/FSMetaValue.vue +63 -31
- package/components/lists/FSDataTable.vue +4 -8
- package/components/lists/chartOrganisationTypes/FSBaseChartOrganisationTypesList.vue +7 -4
- package/components/lists/chartOrganisations/FSBaseChartOrganisationsList.vue +7 -5
- package/components/lists/charts/FSBaseChartsList.vue +7 -5
- package/components/lists/deviceOrganisations/FSBaseDeviceOrganisationsList.vue +128 -45
- package/components/lists/groups/FSBaseGroupsList.vue +7 -0
- package/components/lists/models/FSBaseModelsList.vue +7 -0
- package/components/lists/serviceAccountOrganisations/FSBaseServiceAccountOrganisationsList.vue +7 -0
- package/components/lists/userOrganisations/FSBaseUserOrganisationsList.vue +9 -3
- package/package.json +7 -7
|
@@ -1,53 +1,84 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
v-if="
|
|
4
|
-
/>
|
|
5
|
-
<FSText
|
|
6
|
-
v-else-if="$props.customProperty.useOnlyAllowedValues && $props.customProperty.allowedValues[meta[$props.customProperty.code]] != null"
|
|
7
|
-
:color="getColor($props.customProperty, meta[$props.customProperty.code])"
|
|
2
|
+
<template
|
|
3
|
+
v-if="$props.variant === 'standard'"
|
|
8
4
|
>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
<FSText
|
|
6
|
+
v-if="$props.customProperty.useOnlyAllowedValues"
|
|
7
|
+
:color="getColor($props.customProperty, meta[$props.customProperty.code])"
|
|
8
|
+
>
|
|
9
|
+
{{ value }}
|
|
10
|
+
</FSText>
|
|
11
|
+
<FSText
|
|
12
|
+
v-else-if="[PropertyDataType.Number, PropertyDataType.String, PropertyDataType.DateTime].includes($props.customProperty.dataType)"
|
|
13
|
+
:color="getColor($props.customProperty, meta[$props.customProperty.code])"
|
|
14
|
+
>
|
|
15
|
+
{{ value }}
|
|
16
|
+
</FSText>
|
|
17
|
+
<FSIcon
|
|
18
|
+
v-else-if="[PropertyDataType.Icon].includes($props.customProperty.dataType)"
|
|
19
|
+
:color="getColor($props.customProperty, meta[$props.customProperty.code])"
|
|
20
|
+
>
|
|
21
|
+
{{ value }}
|
|
22
|
+
</FSIcon>
|
|
23
|
+
<FSIconCheck
|
|
24
|
+
v-else-if="[PropertyDataType.Boolean].includes($props.customProperty.dataType) && value"
|
|
25
|
+
:color="getColor($props.customProperty, meta[$props.customProperty.code])"
|
|
26
|
+
:value="value.toLowerCase() === 'true'"
|
|
27
|
+
/>
|
|
28
|
+
</template>
|
|
29
|
+
<template
|
|
30
|
+
v-else-if="$props.variant === 'colorless'"
|
|
14
31
|
>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
32
|
+
<FSSpan
|
|
33
|
+
v-if="$props.customProperty.useOnlyAllowedValues"
|
|
34
|
+
>
|
|
35
|
+
{{ value }}
|
|
36
|
+
</FSSpan>
|
|
37
|
+
<FSSpan
|
|
38
|
+
v-else-if="[PropertyDataType.Number, PropertyDataType.String, PropertyDataType.DateTime].includes($props.customProperty.dataType)"
|
|
39
|
+
>
|
|
40
|
+
{{ value }}
|
|
41
|
+
</FSSpan>
|
|
42
|
+
<FSIcon
|
|
43
|
+
v-else-if="[PropertyDataType.Icon].includes($props.customProperty.dataType)"
|
|
44
|
+
>
|
|
45
|
+
{{ value }}
|
|
46
|
+
</FSIcon>
|
|
47
|
+
<FSIconCheck
|
|
48
|
+
v-else-if="[PropertyDataType.Boolean].includes($props.customProperty.dataType) && value"
|
|
49
|
+
:value="value.toLowerCase() === 'true'"
|
|
50
|
+
/>
|
|
51
|
+
</template>
|
|
28
52
|
</template>
|
|
29
53
|
|
|
30
54
|
<script lang="ts">
|
|
31
55
|
import { computed, defineComponent, type PropType } from "vue";
|
|
32
56
|
|
|
33
57
|
import { useDateFormat } from "@dative-gpi/foundation-shared-services/composables";
|
|
34
|
-
|
|
35
58
|
import { PropertyDataType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
59
|
+
|
|
36
60
|
import { type CustomPropertyInfos } from "../../../foundation-core-domain/models";
|
|
37
61
|
import { getColor } from "./helpers";
|
|
38
62
|
|
|
39
63
|
import FSIconCheck from "@dative-gpi/foundation-shared-components/components/FSIconCheck.vue";
|
|
40
|
-
import FSText from "@dative-gpi/foundation-shared-components/components/FSText.vue";
|
|
41
64
|
import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
|
|
65
|
+
import FSSpan from "@dative-gpi/foundation-shared-components/components/FSSpan.vue";
|
|
66
|
+
import FSText from "@dative-gpi/foundation-shared-components/components/FSText.vue";
|
|
42
67
|
|
|
43
68
|
export default defineComponent({
|
|
44
69
|
name: "FSMetaValue",
|
|
45
70
|
components: {
|
|
46
71
|
FSIconCheck,
|
|
47
|
-
|
|
48
|
-
|
|
72
|
+
FSIcon,
|
|
73
|
+
FSSpan,
|
|
74
|
+
FSText
|
|
49
75
|
},
|
|
50
76
|
props: {
|
|
77
|
+
variant: {
|
|
78
|
+
type: String as PropType<"standard" | "colorless">,
|
|
79
|
+
required: false,
|
|
80
|
+
default: "standard"
|
|
81
|
+
},
|
|
51
82
|
customProperty: {
|
|
52
83
|
type: Object as PropType<CustomPropertyInfos>,
|
|
53
84
|
required: true
|
|
@@ -62,14 +93,15 @@ export default defineComponent({
|
|
|
62
93
|
|
|
63
94
|
const value = computed((): string => {
|
|
64
95
|
if (props.customProperty.useOnlyAllowedValues) {
|
|
65
|
-
|
|
66
|
-
return props.customProperty.allowedValues[props.meta[props.customProperty.code]];
|
|
67
|
-
}
|
|
96
|
+
return props.customProperty.allowedValues[props.meta[props.customProperty.code]] ?? "";
|
|
68
97
|
}
|
|
69
98
|
switch (props.customProperty.dataType) {
|
|
70
99
|
case PropertyDataType.DateTime: {
|
|
71
100
|
return epochToLongTimeFormat(parseInt(props.meta[props.customProperty.code]));
|
|
72
101
|
}
|
|
102
|
+
case PropertyDataType.Boolean: {
|
|
103
|
+
return props.meta[props.customProperty.code];
|
|
104
|
+
}
|
|
73
105
|
default: {
|
|
74
106
|
return props.meta[props.customProperty.code];
|
|
75
107
|
}
|
|
@@ -29,6 +29,7 @@ import { computed, defineComponent, onUnmounted, type PropType, watch } from "vu
|
|
|
29
29
|
|
|
30
30
|
import { useUserOrganisationTable, useUpdateUserOrganisationTable, useDataTables } from "@dative-gpi/foundation-core-services/composables";
|
|
31
31
|
import { useDebounce, useTables } from "@dative-gpi/foundation-shared-components/composables";
|
|
32
|
+
import { type FSDataTableColumn } from "@dative-gpi/foundation-shared-components/models";
|
|
32
33
|
|
|
33
34
|
import FSLoadDataTable from "@dative-gpi/foundation-shared-components/components/lists/FSLoadDataTable.vue";
|
|
34
35
|
import FSDataTableUI from "@dative-gpi/foundation-shared-components/components/lists/FSDataTableUI.vue";
|
|
@@ -49,13 +50,8 @@ export default defineComponent({
|
|
|
49
50
|
required: false,
|
|
50
51
|
default: 1000
|
|
51
52
|
},
|
|
52
|
-
|
|
53
|
-
type: Object as PropType<{ [key: string]:
|
|
54
|
-
required: false,
|
|
55
|
-
default: () => ({})
|
|
56
|
-
},
|
|
57
|
-
customSortRaws: {
|
|
58
|
-
type: Object as PropType<{ [key: string]: any }>,
|
|
53
|
+
headersOptions: {
|
|
54
|
+
type: Object as PropType<{ [key: string]: Partial<FSDataTableColumn> }>,
|
|
59
55
|
required: false,
|
|
60
56
|
default: () => ({})
|
|
61
57
|
}
|
|
@@ -67,7 +63,7 @@ export default defineComponent({
|
|
|
67
63
|
const { getTable, setTable } = useTables();
|
|
68
64
|
const { debounce, cancel } = useDebounce();
|
|
69
65
|
|
|
70
|
-
const computedTable = computed(() => computeTable(props.
|
|
66
|
+
const computedTable = computed(() => computeTable(props.headersOptions));
|
|
71
67
|
|
|
72
68
|
onUnmounted(() => {
|
|
73
69
|
cancel();
|
|
@@ -17,7 +17,13 @@
|
|
|
17
17
|
v-bind="slotData"
|
|
18
18
|
/>
|
|
19
19
|
</template>
|
|
20
|
-
|
|
20
|
+
<template
|
|
21
|
+
#header.imageId-title
|
|
22
|
+
>
|
|
23
|
+
<FSIcon>
|
|
24
|
+
mdi-panorama-variant-outline
|
|
25
|
+
</FSIcon>
|
|
26
|
+
</template>
|
|
21
27
|
<template
|
|
22
28
|
#item.icon="{ item }"
|
|
23
29
|
>
|
|
@@ -25,7 +31,6 @@
|
|
|
25
31
|
{{ item.icon }}
|
|
26
32
|
</FSIcon>
|
|
27
33
|
</template>
|
|
28
|
-
|
|
29
34
|
<template
|
|
30
35
|
#item.imageId="{ item }"
|
|
31
36
|
>
|
|
@@ -36,7 +41,6 @@
|
|
|
36
41
|
:imageId="item.imageId"
|
|
37
42
|
/>
|
|
38
43
|
</template>
|
|
39
|
-
|
|
40
44
|
<template
|
|
41
45
|
#item.tags="{ item }"
|
|
42
46
|
>
|
|
@@ -46,7 +50,6 @@
|
|
|
46
50
|
:tags="item.tags"
|
|
47
51
|
/>
|
|
48
52
|
</template>
|
|
49
|
-
|
|
50
53
|
<template
|
|
51
54
|
#item.modelsLabels="{ item }"
|
|
52
55
|
>
|
|
@@ -17,7 +17,13 @@
|
|
|
17
17
|
v-bind="slotData"
|
|
18
18
|
/>
|
|
19
19
|
</template>
|
|
20
|
-
|
|
20
|
+
<template
|
|
21
|
+
#header.imageId-title
|
|
22
|
+
>
|
|
23
|
+
<FSIcon>
|
|
24
|
+
mdi-panorama-variant-outline
|
|
25
|
+
</FSIcon>
|
|
26
|
+
</template>
|
|
21
27
|
<template
|
|
22
28
|
#item.icon="{ item }"
|
|
23
29
|
>
|
|
@@ -25,7 +31,6 @@
|
|
|
25
31
|
{{ item.icon }}
|
|
26
32
|
</FSIcon>
|
|
27
33
|
</template>
|
|
28
|
-
|
|
29
34
|
<template
|
|
30
35
|
#item.imageId="{ item }"
|
|
31
36
|
>
|
|
@@ -36,7 +41,6 @@
|
|
|
36
41
|
:imageId="item.imageId"
|
|
37
42
|
/>
|
|
38
43
|
</template>
|
|
39
|
-
|
|
40
44
|
<template
|
|
41
45
|
#item.tags="{ item }"
|
|
42
46
|
>
|
|
@@ -46,7 +50,6 @@
|
|
|
46
50
|
:tags="item.tags"
|
|
47
51
|
/>
|
|
48
52
|
</template>
|
|
49
|
-
|
|
50
53
|
<template
|
|
51
54
|
#item.modelsLabels="{ item }"
|
|
52
55
|
>
|
|
@@ -55,7 +58,6 @@
|
|
|
55
58
|
:tags="item.modelsLabels.map((d: any) => d.label)"
|
|
56
59
|
/>
|
|
57
60
|
</template>
|
|
58
|
-
|
|
59
61
|
<template
|
|
60
62
|
#item.tile="{ item }"
|
|
61
63
|
>
|
|
@@ -16,7 +16,13 @@
|
|
|
16
16
|
v-bind="slotData"
|
|
17
17
|
/>
|
|
18
18
|
</template>
|
|
19
|
-
|
|
19
|
+
<template
|
|
20
|
+
#header.imageId-title
|
|
21
|
+
>
|
|
22
|
+
<FSIcon>
|
|
23
|
+
mdi-panorama-variant-outline
|
|
24
|
+
</FSIcon>
|
|
25
|
+
</template>
|
|
20
26
|
<template
|
|
21
27
|
#item.icon="{ item }"
|
|
22
28
|
>
|
|
@@ -24,7 +30,6 @@
|
|
|
24
30
|
{{ item.icon }}
|
|
25
31
|
</FSIcon>
|
|
26
32
|
</template>
|
|
27
|
-
|
|
28
33
|
<template
|
|
29
34
|
#item.imageId="{ item }"
|
|
30
35
|
>
|
|
@@ -35,7 +40,6 @@
|
|
|
35
40
|
:imageId="item.imageId"
|
|
36
41
|
/>
|
|
37
42
|
</template>
|
|
38
|
-
|
|
39
43
|
<template
|
|
40
44
|
#item.tags="{ item }"
|
|
41
45
|
>
|
|
@@ -45,7 +49,6 @@
|
|
|
45
49
|
:tags="item.tags"
|
|
46
50
|
/>
|
|
47
51
|
</template>
|
|
48
|
-
|
|
49
52
|
<template
|
|
50
53
|
#item.modelsLabels="{ item }"
|
|
51
54
|
>
|
|
@@ -54,7 +57,6 @@
|
|
|
54
57
|
:tags="item.modelsLabels.map((d: any) => d.label)"
|
|
55
58
|
/>
|
|
56
59
|
</template>
|
|
57
|
-
|
|
58
60
|
<template
|
|
59
61
|
#item.tile="{ item }"
|
|
60
62
|
>
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSDataTable
|
|
3
|
-
:items="deviceOrganisations"
|
|
4
|
-
:customSorts="customSorts"
|
|
5
|
-
:itemTo="$props.itemTo"
|
|
6
3
|
:loading="fetchingDeviceOrganisations"
|
|
4
|
+
:singleSelect="$props.singleSelect"
|
|
5
|
+
:headersOptions="headersOptions"
|
|
6
|
+
:showSelect="$props.editable"
|
|
7
7
|
:tableCode="$props.tableCode"
|
|
8
|
+
:items="deviceOrganisations"
|
|
9
|
+
:itemTo="$props.itemTo"
|
|
8
10
|
:modelValue="$props.modelValue"
|
|
9
11
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
10
12
|
v-bind="$attrs"
|
|
@@ -18,6 +20,13 @@
|
|
|
18
20
|
v-bind="slotData"
|
|
19
21
|
/>
|
|
20
22
|
</template>
|
|
23
|
+
<template
|
|
24
|
+
#header.imageId-title
|
|
25
|
+
>
|
|
26
|
+
<FSIcon>
|
|
27
|
+
mdi-panorama-variant-outline
|
|
28
|
+
</FSIcon>
|
|
29
|
+
</template>
|
|
21
30
|
<template
|
|
22
31
|
#header.connectable-title
|
|
23
32
|
>
|
|
@@ -87,6 +96,9 @@
|
|
|
87
96
|
:deviceAlerts="item.alerts"
|
|
88
97
|
:alertTo="$props.alertTo"
|
|
89
98
|
/>
|
|
99
|
+
<div
|
|
100
|
+
v-else
|
|
101
|
+
/>
|
|
90
102
|
</template>
|
|
91
103
|
<template
|
|
92
104
|
#item.alerts="{ item }"
|
|
@@ -97,6 +109,9 @@
|
|
|
97
109
|
:deviceAlerts="item.alerts"
|
|
98
110
|
:alertTo="$props.alertTo"
|
|
99
111
|
/>
|
|
112
|
+
<div
|
|
113
|
+
v-else
|
|
114
|
+
/>
|
|
100
115
|
</template>
|
|
101
116
|
<template
|
|
102
117
|
#item.status="{ item }"
|
|
@@ -125,68 +140,76 @@
|
|
|
125
140
|
:meta="item.meta"
|
|
126
141
|
/>
|
|
127
142
|
</template>
|
|
128
|
-
|
|
143
|
+
<template
|
|
144
|
+
v-for="(property, index) in customProperties"
|
|
145
|
+
#[`filter.meta.${property.code}`]="{ filter }"
|
|
146
|
+
:key="index"
|
|
147
|
+
>
|
|
148
|
+
<FSMetaValue
|
|
149
|
+
v-if="filter.text !== '—'"
|
|
150
|
+
variant="colorless"
|
|
151
|
+
:customProperty="property"
|
|
152
|
+
:meta="{ [property.code]: filter.text }"
|
|
153
|
+
/>
|
|
154
|
+
</template>
|
|
129
155
|
<template
|
|
130
156
|
#item.tile="{ item, toggleSelect }"
|
|
131
157
|
>
|
|
132
158
|
<FSDeviceOrganisationTileUI
|
|
133
|
-
|
|
134
|
-
:modelValue="isSelected(item.id)"
|
|
135
|
-
:singleSelect="singleSelect"
|
|
136
|
-
:deviceStatuses="item.status.statuses"
|
|
159
|
+
:to="$props.itemTo && $props.itemTo(item)"
|
|
137
160
|
:deviceConnectivity="item.connectivity"
|
|
161
|
+
:deviceStatuses="item.status.statuses"
|
|
138
162
|
:deviceWorstAlert="item.worstAlert"
|
|
163
|
+
:singleSelect="$props.singleSelect"
|
|
139
164
|
:deviceAlerts="item.alerts"
|
|
140
|
-
:to="$props.itemTo && $props.itemTo(item)"
|
|
141
165
|
:alertTo="$props.alertTo"
|
|
166
|
+
:modelValue="isSelected(item.id)"
|
|
142
167
|
@update:modelValue="toggleSelect(item)"
|
|
168
|
+
v-bind="item"
|
|
143
169
|
/>
|
|
144
170
|
</template>
|
|
145
171
|
</FSDataTable>
|
|
146
172
|
</template>
|
|
147
173
|
|
|
148
174
|
<script lang="ts">
|
|
149
|
-
import type
|
|
150
|
-
import type
|
|
151
|
-
import { computed, defineComponent, onMounted, watch } from "vue";
|
|
175
|
+
import { computed, defineComponent, onMounted, type PropType, watch } from "vue";
|
|
176
|
+
import { type RouteLocation } from "vue-router";
|
|
152
177
|
import _ from "lodash";
|
|
153
178
|
|
|
154
|
-
import { alphanumericSort } from "@dative-gpi/foundation-shared-components/utils";
|
|
179
|
+
import { alphanumericSort, connectivityLabel } from "@dative-gpi/foundation-shared-components/utils";
|
|
155
180
|
import { ConnectivityStatus, PropertyEntity } from "@dative-gpi/foundation-shared-domain/enums";
|
|
156
181
|
|
|
182
|
+
import type { DeviceConnectivityDetails, DeviceOrganisationAlert, DeviceOrganisationFilters, DeviceOrganisationInfos} from "@dative-gpi/foundation-core-domain/models";
|
|
157
183
|
import { useCustomProperties, useDeviceOrganisations } from "@dative-gpi/foundation-core-services/composables";
|
|
158
|
-
import type { DeviceConnectivityDetails, DeviceOrganisationFilters, DeviceOrganisationInfos} from "@dative-gpi/foundation-core-domain/models";
|
|
159
184
|
|
|
160
|
-
import FSDataTable from "../FSDataTable.vue";
|
|
161
185
|
import FSMetaValue from "../../customProperties/FSMetaValue.vue";
|
|
186
|
+
import FSDataTable from "../FSDataTable.vue";
|
|
162
187
|
|
|
163
|
-
import FSImage from "@dative-gpi/foundation-shared-components/components/FSImage.vue";
|
|
164
|
-
import FSTagGroup from "@dative-gpi/foundation-shared-components/components/FSTagGroup.vue";
|
|
165
|
-
import FSIconCheck from "@dative-gpi/foundation-shared-components/components/FSIconCheck.vue";
|
|
166
|
-
import FSWorstAlert from "@dative-gpi/foundation-shared-components/components/deviceOrganisations/FSWorstAlert.vue";
|
|
167
|
-
import FSConnectivity from "@dative-gpi/foundation-shared-components/components/deviceOrganisations/FSConnectivity.vue";
|
|
168
|
-
import FSStatusesCarousel from "@dative-gpi/foundation-shared-components/components/deviceOrganisations/FSStatusesCarousel.vue";
|
|
169
188
|
import FSDeviceOrganisationTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSDeviceOrganisationTileUI.vue";
|
|
189
|
+
import FSStatusesCarousel from "@dative-gpi/foundation-shared-components/components/deviceOrganisations/FSStatusesCarousel.vue";
|
|
190
|
+
import FSConnectivity from "@dative-gpi/foundation-shared-components/components/deviceOrganisations/FSConnectivity.vue";
|
|
191
|
+
import FSWorstAlert from "@dative-gpi/foundation-shared-components/components/deviceOrganisations/FSWorstAlert.vue";
|
|
192
|
+
import FSIconCheck from "@dative-gpi/foundation-shared-components/components/FSIconCheck.vue";
|
|
193
|
+
import FSTagGroup from "@dative-gpi/foundation-shared-components/components/FSTagGroup.vue";
|
|
194
|
+
import FSImage from "@dative-gpi/foundation-shared-components/components/FSImage.vue";
|
|
170
195
|
|
|
171
|
-
|
|
172
196
|
export default defineComponent({
|
|
173
197
|
name: "FSBaseDeviceOrganisationsList",
|
|
174
198
|
components: {
|
|
175
|
-
FSConnectivity,
|
|
176
|
-
FSDataTable,
|
|
177
199
|
FSDeviceOrganisationTileUI,
|
|
200
|
+
FSStatusesCarousel,
|
|
201
|
+
FSConnectivity,
|
|
202
|
+
FSWorstAlert,
|
|
203
|
+
FSDataTable,
|
|
178
204
|
FSIconCheck,
|
|
179
|
-
FSImage,
|
|
180
205
|
FSMetaValue,
|
|
181
|
-
FSStatusesCarousel,
|
|
182
206
|
FSTagGroup,
|
|
183
|
-
|
|
207
|
+
FSImage
|
|
184
208
|
},
|
|
185
209
|
props: {
|
|
186
|
-
|
|
187
|
-
type:
|
|
188
|
-
|
|
189
|
-
required: false
|
|
210
|
+
tableCode: {
|
|
211
|
+
type: String,
|
|
212
|
+
required: true
|
|
190
213
|
},
|
|
191
214
|
deviceOrganisationFilters: {
|
|
192
215
|
type: Object as PropType<DeviceOrganisationFilters>,
|
|
@@ -207,14 +230,20 @@ export default defineComponent({
|
|
|
207
230
|
required: false,
|
|
208
231
|
default: null
|
|
209
232
|
},
|
|
233
|
+
editable: {
|
|
234
|
+
type: Boolean,
|
|
235
|
+
required: false,
|
|
236
|
+
default: true
|
|
237
|
+
},
|
|
210
238
|
singleSelect: {
|
|
211
239
|
type: Boolean,
|
|
212
240
|
required: false,
|
|
213
241
|
default: false
|
|
214
242
|
},
|
|
215
|
-
|
|
216
|
-
type:
|
|
217
|
-
|
|
243
|
+
modelValue: {
|
|
244
|
+
type: Array as PropType<string[]>,
|
|
245
|
+
default: () => [],
|
|
246
|
+
required: false
|
|
218
247
|
}
|
|
219
248
|
},
|
|
220
249
|
emits: ["update:modelValue"],
|
|
@@ -228,17 +257,71 @@ export default defineComponent({
|
|
|
228
257
|
}
|
|
229
258
|
return entities.value;
|
|
230
259
|
});
|
|
231
|
-
|
|
232
|
-
const
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
260
|
+
|
|
261
|
+
const headersOptions = computed(() => ({
|
|
262
|
+
connectable: {
|
|
263
|
+
fixedFilters: [{
|
|
264
|
+
value: ConnectivityStatus.None,
|
|
265
|
+
text: "—"
|
|
266
|
+
}, {
|
|
267
|
+
value: ConnectivityStatus.Offline,
|
|
268
|
+
text: connectivityLabel(ConnectivityStatus.Offline)
|
|
269
|
+
}, {
|
|
270
|
+
value: ConnectivityStatus.AlmostOffline,
|
|
271
|
+
text: connectivityLabel(ConnectivityStatus.AlmostOffline)
|
|
272
|
+
}, {
|
|
273
|
+
value: ConnectivityStatus.PartiallyConnected,
|
|
274
|
+
text: connectivityLabel(ConnectivityStatus.PartiallyConnected)
|
|
275
|
+
}, {
|
|
276
|
+
value: ConnectivityStatus.Connected,
|
|
277
|
+
text: connectivityLabel(ConnectivityStatus.Connected)
|
|
278
|
+
}],
|
|
279
|
+
methodFilter: (value: ConnectivityStatus, item: DeviceConnectivityDetails) => !item.status && !value || item.status == value,
|
|
280
|
+
sort: (a: DeviceConnectivityDetails, b: DeviceConnectivityDetails) => alphanumericSort(a?.status, b?.status)
|
|
281
|
+
},
|
|
282
|
+
connectivity: {
|
|
283
|
+
fixedFilters: [{
|
|
284
|
+
value: ConnectivityStatus.None,
|
|
285
|
+
text: "—"
|
|
286
|
+
}, {
|
|
287
|
+
value: ConnectivityStatus.Offline,
|
|
288
|
+
text: connectivityLabel(ConnectivityStatus.Offline)
|
|
289
|
+
}, {
|
|
290
|
+
value: ConnectivityStatus.AlmostOffline,
|
|
291
|
+
text: connectivityLabel(ConnectivityStatus.AlmostOffline)
|
|
292
|
+
}, {
|
|
293
|
+
value: ConnectivityStatus.PartiallyConnected,
|
|
294
|
+
text: connectivityLabel(ConnectivityStatus.PartiallyConnected)
|
|
295
|
+
}, {
|
|
296
|
+
value: ConnectivityStatus.Connected,
|
|
297
|
+
text: connectivityLabel(ConnectivityStatus.Connected)
|
|
298
|
+
}],
|
|
299
|
+
methodFilter: (value: ConnectivityStatus, item: DeviceConnectivityDetails) => !item.status && !value || item.status == value,
|
|
300
|
+
sort: (a: DeviceConnectivityDetails, b: DeviceConnectivityDetails) => alphanumericSort(a?.status, b?.status)
|
|
301
|
+
},
|
|
302
|
+
worstAlert: {
|
|
303
|
+
sort: (a: DeviceOrganisationAlert, b: DeviceOrganisationAlert) => alphanumericSort(a?.criticity, b?.criticity)
|
|
304
|
+
},
|
|
305
|
+
...customProperties.value.reduce((acc, cp) => ({
|
|
306
|
+
...acc,
|
|
307
|
+
[`meta.${cp.code}`]: {
|
|
308
|
+
fixedFilters: cp.useOnlyAllowedValues ? [{
|
|
309
|
+
value: (null as string | null),
|
|
310
|
+
text: "—"
|
|
311
|
+
}].concat(Object.keys(cp.allowedValues).map(av => ({
|
|
312
|
+
value: av,
|
|
313
|
+
text: av
|
|
314
|
+
}))): undefined,
|
|
315
|
+
methodFilterRaw: (value: any, item: DeviceOrganisationInfos) => {
|
|
316
|
+
if (cp.useOnlyAllowedValues) {
|
|
317
|
+
return (!Object.keys(cp.allowedValues).includes(item.meta[cp.code])) && !value || item.meta[cp.code] === value;
|
|
318
|
+
}
|
|
319
|
+
return !item.meta[cp.code] && !value || item.meta[cp.code] === value;
|
|
320
|
+
},
|
|
321
|
+
sort: (a: string, b: string) => alphanumericSort(a, b)
|
|
239
322
|
}
|
|
240
|
-
}
|
|
241
|
-
});
|
|
323
|
+
}), {})
|
|
324
|
+
}));
|
|
242
325
|
|
|
243
326
|
const isSelected = (id: string): boolean => {
|
|
244
327
|
return props.modelValue.includes(id);
|
|
@@ -262,7 +345,7 @@ export default defineComponent({
|
|
|
262
345
|
deviceOrganisations,
|
|
263
346
|
ConnectivityStatus,
|
|
264
347
|
customProperties,
|
|
265
|
-
|
|
348
|
+
headersOptions,
|
|
266
349
|
isSelected
|
|
267
350
|
};
|
|
268
351
|
}
|
|
@@ -18,6 +18,13 @@
|
|
|
18
18
|
v-bind="slotData"
|
|
19
19
|
/>
|
|
20
20
|
</template>
|
|
21
|
+
<template
|
|
22
|
+
#header.imageId-title
|
|
23
|
+
>
|
|
24
|
+
<FSIcon>
|
|
25
|
+
mdi-panorama-variant-outline
|
|
26
|
+
</FSIcon>
|
|
27
|
+
</template>
|
|
21
28
|
<template
|
|
22
29
|
#item.imageId="{ item }"
|
|
23
30
|
>
|
|
@@ -84,9 +91,8 @@
|
|
|
84
91
|
</template>
|
|
85
92
|
|
|
86
93
|
<script lang="ts">
|
|
87
|
-
import type
|
|
88
|
-
import {
|
|
89
|
-
import type { RouteLocation } from "vue-router";
|
|
94
|
+
import { defineComponent, type PropType, watch } from "vue";
|
|
95
|
+
import { type RouteLocation } from "vue-router";
|
|
90
96
|
import _ from "lodash";
|
|
91
97
|
|
|
92
98
|
import type { UserOrganisationFilters, UserOrganisationInfos } from "@dative-gpi/foundation-core-domain/models";
|
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.
|
|
4
|
+
"version": "1.0.65",
|
|
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.
|
|
14
|
-
"@dative-gpi/foundation-core-services": "1.0.
|
|
15
|
-
"@dative-gpi/foundation-shared-components": "1.0.
|
|
16
|
-
"@dative-gpi/foundation-shared-domain": "1.0.
|
|
17
|
-
"@dative-gpi/foundation-shared-services": "1.0.
|
|
13
|
+
"@dative-gpi/foundation-core-domain": "1.0.65",
|
|
14
|
+
"@dative-gpi/foundation-core-services": "1.0.65",
|
|
15
|
+
"@dative-gpi/foundation-shared-components": "1.0.65",
|
|
16
|
+
"@dative-gpi/foundation-shared-domain": "1.0.65",
|
|
17
|
+
"@dative-gpi/foundation-shared-services": "1.0.65"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@dative-gpi/bones-ui": "^0.0.75",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"sass": "1.71.1",
|
|
27
27
|
"sass-loader": "13.3.2"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "942a36ea827fcf856d357a4ad826a6d4e3acf53c"
|
|
30
30
|
}
|