@dative-gpi/foundation-core-components 1.0.66 → 1.0.67-map-carousel
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/autocompletes/FSAutocompleteChart.vue +15 -8
- package/components/autocompletes/FSAutocompleteDashboard.vue +14 -6
- package/components/autocompletes/FSAutocompleteDashboardOrganisation.vue +7 -1
- package/components/autocompletes/FSAutocompleteDataCategory.vue +11 -5
- package/components/autocompletes/FSAutocompleteDataDefinition.vue +7 -1
- package/components/autocompletes/FSAutocompleteGroup.vue +7 -1
- package/components/autocompletes/FSAutocompleteLocation.vue +6 -0
- package/components/autocompletes/FSAutocompleteManufacturer.vue +8 -0
- package/components/autocompletes/FSAutocompleteModel.vue +9 -1
- package/components/autocompletes/FSAutocompleteOrganisationType.vue +7 -1
- package/components/autocompletes/FSAutocompleteRole.vue +14 -6
- package/components/autocompletes/FSAutocompleteServiceAccountRoleOrganisation.vue +7 -1
- package/components/autocompletes/FSAutocompleteUserOrganisation.vue +9 -1
- package/components/customProperties/FSMetaField.vue +35 -40
- package/components/customProperties/FSMetaFormContent.vue +4 -3
- package/components/customProperties/FSMetaHistory.vue +2 -2
- package/components/customProperties/helpers.ts +57 -165
- package/components/entities/FSBaseEntitiesList.vue +12 -2
- package/components/entities/FSDialogSelectEntities.vue +19 -2
- package/components/entities/FSEntityField.vue +68 -13
- package/components/entities/FSSelectEntitiesList.vue +40 -7
- package/components/explorers/FSBaseDevicesExplorer.vue +322 -0
- package/components/explorers/FSBaseFoldersExplorer.vue +126 -24
- package/components/lists/FSDataTable.vue +22 -16
- package/components/lists/alerts/FSBaseAlertsList.vue +96 -106
- package/components/lists/alerts/FSButtonAcknowledgeAlert.vue +4 -4
- package/components/lists/authTokens/FSBaseAuthTokensList.vue +6 -4
- package/components/lists/chartOrganisationTypes/FSBaseChartOrganisationTypesList.vue +97 -34
- package/components/lists/chartOrganisations/FSBaseChartOrganisationsList.vue +98 -34
- package/components/lists/charts/FSBaseChartsList.vue +153 -64
- package/components/lists/comments/FSBaseCommentsList.vue +39 -23
- package/components/lists/connectivityScenarios/FSBaseConnectivityScenariosList.vue +128 -0
- package/components/lists/dashboardOrganisationTypes/FSBaseDashboardOrganisationTypesList.vue +41 -8
- package/components/lists/dashboards/FSBaseDashboardsList.vue +76 -16
- package/components/lists/dashboards/FSSimpleDashboardsList.vue +33 -7
- package/components/lists/dataCategories/FSBaseDataCategoriesList.vue +8 -6
- package/components/lists/dataDefinitions/FSBaseDataDefinitionsList.vue +8 -5
- package/components/lists/deviceOrganisations/FSBaseDeviceOrganisationsList.vue +70 -44
- package/components/lists/folders/FSBaseFoldersList.vue +27 -15
- package/components/lists/groups/FSBaseGroupsList.vue +13 -9
- package/components/lists/locations/FSBaseLocationsList.vue +17 -13
- package/components/lists/models/FSBaseModelsList.vue +31 -13
- package/components/lists/playlists/FSSimplePlaylistsList.vue +44 -0
- package/components/lists/roleOrganisationTypes/FSBaseRoleOrganisationTypesList.vue +6 -5
- package/components/lists/roleOrganisations/FSBaseRoleOrganisationsList.vue +17 -16
- package/components/lists/scenarioOrganisationTypes/FSBaseScenarioOrganisationTypesList.vue +45 -8
- package/components/lists/scenarioOrganisations/FSBaseScenarioOrganisationsList.vue +45 -7
- package/components/lists/scenarios/FSBaseScenariosList.vue +121 -86
- package/components/lists/serviceAccountOrganisations/FSBaseServiceAccountOrganisationsList.vue +10 -7
- package/components/lists/serviceAccountRoleOrganisations/FSBaseServiceAccountRoleOrganisationsList.vue +128 -0
- package/components/lists/userOrganisations/FSBaseUserOrganisationsList.vue +10 -7
- package/components/lists/userOrganisations/FSChipUserOrganisationsList.vue +61 -0
- package/components/tiles/FSChartTile.vue +71 -0
- package/components/tiles/FSDashboardOrganisationTile.vue +3 -3
- package/components/tiles/FSDashboardOrganisationTypeTile.vue +3 -3
- package/components/tiles/FSDashboardShallowTile.vue +3 -3
- package/components/tiles/FSDeviceOrganisationTile.vue +3 -3
- package/components/tiles/FSFolderTile.vue +7 -5
- package/components/tiles/FSGroupTile.vue +3 -3
- package/components/tiles/FSLocationTile.vue +5 -3
- package/components/tiles/FSModelTile.vue +64 -0
- package/components/tiles/FSServiceAccountOrganisationTile.vue +3 -3
- package/components/tiles/FSUserOrganisationTile.vue +3 -3
- package/components/treeviews/FSTreeViewGroup.vue +7 -1
- package/package.json +9 -9
- package/utils/dashboards.ts +4 -4
- package/utils/index.ts +0 -1
- package/utils/roles.ts +3 -3
- package/utils/users.ts +3 -3
- package/components/selects/FSAggregationSelector.vue +0 -51
- package/components/selects/FSAxisTypeSelector.vue +0 -48
- package/components/selects/FSDisplayAsSelector.vue +0 -52
- package/components/selects/FSFilterTypeSelector.vue +0 -53
- package/components/selects/FSHeatmapRuleSelector.vue +0 -52
- package/components/selects/FSOperationOnSelector.vue +0 -51
- package/components/selects/FSPlanningTypeSelector.vue +0 -51
- package/components/selects/FSPlotPerSelector.vue +0 -51
- package/components/selects/FSSelectEntityType.vue +0 -59
- package/components/selects/FSSerieTypeSelector.vue +0 -51
- package/utils/charts.ts +0 -137
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSDataTable
|
|
3
|
+
defaultMode="iterator"
|
|
3
4
|
:loading="fetchingChartOrganisationTypes || fetchingChartOrganisations"
|
|
5
|
+
:headersOptions="headersOptions"
|
|
4
6
|
:items="charts"
|
|
7
|
+
:selectable="$props.selectable"
|
|
8
|
+
:singleSelect="$props.singleSelect"
|
|
5
9
|
:tableCode="$props.tableCode"
|
|
6
10
|
:modelValue="$props.modelValue"
|
|
7
11
|
@update:modelValue="onSelect"
|
|
@@ -38,6 +42,7 @@
|
|
|
38
42
|
height="32px"
|
|
39
43
|
width="32px"
|
|
40
44
|
:imageId="item.imageId"
|
|
45
|
+
:thumbnail="true"
|
|
41
46
|
/>
|
|
42
47
|
</template>
|
|
43
48
|
<template
|
|
@@ -45,29 +50,55 @@
|
|
|
45
50
|
>
|
|
46
51
|
<FSTagGroup
|
|
47
52
|
variant="slide"
|
|
48
|
-
:
|
|
53
|
+
:showRemove="false"
|
|
49
54
|
:tags="item.tags"
|
|
50
55
|
/>
|
|
51
56
|
</template>
|
|
57
|
+
<template
|
|
58
|
+
#item.chartType="{ item }"
|
|
59
|
+
>
|
|
60
|
+
<FSRow
|
|
61
|
+
:wrap="false"
|
|
62
|
+
>
|
|
63
|
+
<FSIcon
|
|
64
|
+
:icon="chartIcon(item.chartType)"
|
|
65
|
+
/>
|
|
66
|
+
<FSText>
|
|
67
|
+
{{ chartTypeLabel(item.chartType) }}
|
|
68
|
+
</FSText>
|
|
69
|
+
</FSRow>
|
|
70
|
+
</template>
|
|
52
71
|
<template
|
|
53
72
|
#item.modelsLabels="{ item }"
|
|
54
73
|
>
|
|
55
74
|
<FSTagGroup
|
|
56
|
-
:
|
|
75
|
+
:showRemove="false"
|
|
57
76
|
:tags="item.modelsLabels.map((d: any) => d.label)"
|
|
58
77
|
/>
|
|
59
78
|
</template>
|
|
60
79
|
<template
|
|
61
|
-
#item.
|
|
80
|
+
#item.scope="{ item }"
|
|
81
|
+
>
|
|
82
|
+
<FSChip
|
|
83
|
+
:label="applicationScopeLabel(item.scope)"
|
|
84
|
+
:color="ColorEnum.Light"
|
|
85
|
+
/>
|
|
86
|
+
</template>
|
|
87
|
+
<template
|
|
88
|
+
#item.tile="{ index, item }"
|
|
62
89
|
>
|
|
63
90
|
<FSChartTileUI
|
|
91
|
+
:key="index"
|
|
64
92
|
:label="item.label"
|
|
65
93
|
:categoryLabel="item.chartCategoryLabel"
|
|
66
94
|
:icon="item.icon"
|
|
67
95
|
:imageId="item.imageId"
|
|
68
96
|
:type="item.chartType"
|
|
69
|
-
:
|
|
70
|
-
|
|
97
|
+
:scope="item.scope"
|
|
98
|
+
:singleSelect="$props.singleSelect"
|
|
99
|
+
:selectable="$props.selectable"
|
|
100
|
+
:modelValue="isSelected(item.id)"
|
|
101
|
+
@update:modelValue="update(item.id)"
|
|
71
102
|
/>
|
|
72
103
|
</template>
|
|
73
104
|
</FSDataTable>
|
|
@@ -77,16 +108,22 @@
|
|
|
77
108
|
import { defineComponent, type PropType, watch, computed } from "vue";
|
|
78
109
|
import _ from "lodash";
|
|
79
110
|
|
|
80
|
-
import {
|
|
81
|
-
|
|
82
|
-
import
|
|
111
|
+
import { chartTypeLabel, chartIcon, applicationScopeLabel } from "@dative-gpi/foundation-shared-components/tools";
|
|
112
|
+
import { ChartOrigin, ChartType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
113
|
+
import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
|
|
114
|
+
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
83
115
|
|
|
116
|
+
import type { ChartModelLabel, ChartOrganisationFilters, ChartOrganisationTypeFilters } from "@dative-gpi/foundation-core-domain/models";
|
|
84
117
|
import { useChartOrganisations, useChartOrganisationTypes } from "@dative-gpi/foundation-core-services/composables";
|
|
85
118
|
|
|
86
119
|
import FSChartTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSChartTileUI.vue";
|
|
87
120
|
import FSTagGroup from "@dative-gpi/foundation-shared-components/components/FSTagGroup.vue";
|
|
88
121
|
import FSImage from "@dative-gpi/foundation-shared-components/components/FSImage.vue";
|
|
89
122
|
import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
|
|
123
|
+
import FSChip from '@dative-gpi/foundation-shared-components/components/FSChip.vue';
|
|
124
|
+
import FSText from '@dative-gpi/foundation-shared-components/components/FSText.vue';
|
|
125
|
+
import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
|
|
126
|
+
|
|
90
127
|
import FSDataTable from "../FSDataTable.vue";
|
|
91
128
|
|
|
92
129
|
export default defineComponent({
|
|
@@ -96,13 +133,16 @@ export default defineComponent({
|
|
|
96
133
|
FSDataTable,
|
|
97
134
|
FSTagGroup,
|
|
98
135
|
FSImage,
|
|
99
|
-
|
|
136
|
+
FSText,
|
|
137
|
+
FSChip,
|
|
138
|
+
FSIcon,
|
|
139
|
+
FSRow
|
|
100
140
|
},
|
|
101
141
|
props: {
|
|
102
|
-
|
|
103
|
-
type:
|
|
104
|
-
|
|
105
|
-
|
|
142
|
+
tableCode: {
|
|
143
|
+
type: String as PropType<string | null>,
|
|
144
|
+
required: false,
|
|
145
|
+
default: null
|
|
106
146
|
},
|
|
107
147
|
chartOrganisationFilters: {
|
|
108
148
|
type: Object as PropType<ChartOrganisationFilters>,
|
|
@@ -114,14 +154,24 @@ export default defineComponent({
|
|
|
114
154
|
required: false,
|
|
115
155
|
default: null
|
|
116
156
|
},
|
|
117
|
-
|
|
118
|
-
type:
|
|
119
|
-
|
|
157
|
+
modelValue: {
|
|
158
|
+
type: Array as PropType<string[]>,
|
|
159
|
+
default: () => [],
|
|
160
|
+
required: false
|
|
161
|
+
},
|
|
162
|
+
selectable: {
|
|
163
|
+
type: Boolean,
|
|
164
|
+
required: false,
|
|
165
|
+
default: true
|
|
166
|
+
},
|
|
167
|
+
singleSelect: {
|
|
168
|
+
type: Boolean,
|
|
169
|
+
required: false,
|
|
170
|
+
default: false
|
|
120
171
|
}
|
|
121
172
|
},
|
|
122
|
-
emits: ["update:modelValue", "update:scope"],
|
|
173
|
+
emits: ["update", "update:modelValue", "update:scope"],
|
|
123
174
|
setup(props, { emit }) {
|
|
124
|
-
|
|
125
175
|
const { entities: chartOrganisations, fetching: fetchingChartOrganisations, getMany: getManyChartOrganisations } = useChartOrganisations();
|
|
126
176
|
const { entities: chartOrganisationTypes, fetching: fetchingChartOrganisationTypes, getMany: getManyChartOrganisationTypes } = useChartOrganisationTypes();
|
|
127
177
|
|
|
@@ -135,65 +185,100 @@ export default defineComponent({
|
|
|
135
185
|
}
|
|
136
186
|
|
|
137
187
|
const charts = computed(() => {
|
|
138
|
-
return chartOrganisations.value.map(c => {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
.
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
188
|
+
return chartOrganisations.value.map(c => ({
|
|
189
|
+
id: c.id,
|
|
190
|
+
imageId: c.imageId,
|
|
191
|
+
chartId: c.chartId,
|
|
192
|
+
chartCategoryId: c.chartCategoryId,
|
|
193
|
+
chartCategoryLabel: c.chartCategoryLabel,
|
|
194
|
+
scope: c.scope,
|
|
195
|
+
label: c.label,
|
|
196
|
+
title: c.title,
|
|
197
|
+
code: c.code,
|
|
198
|
+
icon: c.icon,
|
|
199
|
+
tags: c.tags,
|
|
200
|
+
multiple: c.multiple,
|
|
201
|
+
chartType: c.chartType,
|
|
202
|
+
modelsLabels: c.modelsLabels
|
|
203
|
+
})).concat(chartOrganisationTypes.value.map(c => ({
|
|
204
|
+
id: c.id,
|
|
205
|
+
imageId: c.imageId,
|
|
206
|
+
chartId: c.chartId,
|
|
207
|
+
chartCategoryId: c.chartCategoryId,
|
|
208
|
+
chartCategoryLabel: c.chartCategoryLabel,
|
|
209
|
+
scope: c.scope,
|
|
210
|
+
label: c.label,
|
|
211
|
+
title: c.title,
|
|
212
|
+
code: c.code,
|
|
213
|
+
icon: c.icon,
|
|
214
|
+
tags: c.tags,
|
|
215
|
+
multiple: c.multiple,
|
|
216
|
+
chartType: c.chartType,
|
|
217
|
+
modelsLabels: c.modelsLabels
|
|
218
|
+
})));
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
const headersOptions = computed(() => ({
|
|
222
|
+
modelsLabels: {
|
|
223
|
+
fixedFilters: chartOrganisationTypes.value.map(c => c.modelsLabels).reduce((acc, models) => {
|
|
224
|
+
for(const m of models){
|
|
225
|
+
if(!acc.map((m) => m.id).includes(m.id)){
|
|
226
|
+
acc.push(m);
|
|
227
|
+
}
|
|
172
228
|
}
|
|
173
|
-
|
|
174
|
-
|
|
229
|
+
return acc;
|
|
230
|
+
}, []).map((m) => ({
|
|
231
|
+
value: m.id,
|
|
232
|
+
text: m.label
|
|
233
|
+
})).concat({
|
|
234
|
+
value: '',
|
|
235
|
+
text: '--'
|
|
236
|
+
}),
|
|
237
|
+
methodFilter: (value: string, items: ChartModelLabel[]) => (items.length == 0 && value == '') || (items.length > 0 && items.some(ml => ml.id == value))
|
|
238
|
+
},
|
|
239
|
+
chartType: {
|
|
240
|
+
fixedFilters: getEnumEntries(ChartType).map(e => ({
|
|
241
|
+
value: e.value,
|
|
242
|
+
text: chartTypeLabel(e.value)
|
|
243
|
+
})),
|
|
244
|
+
methodFilter: (value: ChartType, item: ChartType) => value == item
|
|
245
|
+
},
|
|
246
|
+
scope: {
|
|
247
|
+
fixedFilters: getEnumEntries(ChartOrigin).filter(e => e.value != ChartOrigin.None).map(e => ({
|
|
248
|
+
value: e.value,
|
|
249
|
+
text: applicationScopeLabel(e.value)
|
|
250
|
+
})),
|
|
251
|
+
methodFilter: (value: ChartOrigin, item: ChartOrigin) => value == item
|
|
252
|
+
}
|
|
175
253
|
|
|
176
|
-
|
|
177
|
-
{
|
|
178
|
-
const item = isSelected(value);
|
|
254
|
+
}));
|
|
179
255
|
|
|
180
|
-
|
|
181
|
-
|
|
256
|
+
const update = (value : string) => {
|
|
257
|
+
const isAlreadySelected = isSelected(value);
|
|
258
|
+
if (isAlreadySelected) {
|
|
259
|
+
onSelect(props.modelValue.filter(m => m != value));
|
|
260
|
+
}
|
|
261
|
+
else if(props.singleSelect){
|
|
262
|
+
onSelect([value]);
|
|
182
263
|
}
|
|
183
264
|
else{
|
|
184
|
-
onSelect([...props.modelValue, value])
|
|
265
|
+
onSelect([...props.modelValue, value]);
|
|
185
266
|
}
|
|
186
267
|
}
|
|
187
268
|
|
|
188
269
|
const onSelect = (values: string[] | null) => {
|
|
189
270
|
if(!values){
|
|
190
|
-
emit("update:modelValue", [])
|
|
191
|
-
emit("update:scope", [])
|
|
271
|
+
emit("update:modelValue", []);
|
|
272
|
+
emit("update:scope", []);
|
|
273
|
+
emit("update", { modelValue: [], scope: [] });
|
|
192
274
|
return;
|
|
193
275
|
}
|
|
194
276
|
const selectedItems = charts.value.filter(i => values.includes(i.id));
|
|
195
|
-
|
|
196
|
-
|
|
277
|
+
const newModelValue = selectedItems.map(i => i.id);
|
|
278
|
+
const newScope = selectedItems.map(i => i.scope);
|
|
279
|
+
emit("update:modelValue", newModelValue);
|
|
280
|
+
emit("update:scope", newScope);
|
|
281
|
+
emit("update", { modelValue: newModelValue, scope: newScope });
|
|
197
282
|
};
|
|
198
283
|
|
|
199
284
|
watch(() => [props.chartOrganisationFilters,props.chartOrganisationTypeFilters], (next, previous) => {
|
|
@@ -207,9 +292,13 @@ export default defineComponent({
|
|
|
207
292
|
fetchingChartOrganisations,
|
|
208
293
|
chartOrganisationTypes,
|
|
209
294
|
chartOrganisations,
|
|
295
|
+
headersOptions,
|
|
210
296
|
ColorEnum,
|
|
211
297
|
charts,
|
|
298
|
+
applicationScopeLabel,
|
|
299
|
+
chartTypeLabel,
|
|
212
300
|
isSelected,
|
|
301
|
+
chartIcon,
|
|
213
302
|
onSelect,
|
|
214
303
|
update
|
|
215
304
|
};
|
|
@@ -21,25 +21,30 @@
|
|
|
21
21
|
:userImageId="currentUser?.imageId"
|
|
22
22
|
/>
|
|
23
23
|
</FSRow>
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
24
|
+
<FSCol
|
|
25
|
+
gap="12px"
|
|
26
|
+
>
|
|
27
|
+
<FSCommentTileUI
|
|
28
|
+
v-for="comment in orderedComments"
|
|
29
|
+
:key="comment.id"
|
|
30
|
+
:timestamp="epochToLongTimeFormat(comment.timestamp)"
|
|
31
|
+
:userName="comment.userName"
|
|
32
|
+
:userImageId="comment.userImageId"
|
|
33
|
+
:canEditRemove="currentUser?.id === comment.userId"
|
|
34
|
+
:comment="comment.comment"
|
|
35
|
+
:edited="comment.edited"
|
|
36
|
+
:removing="removing"
|
|
37
|
+
:id="comment.id"
|
|
38
|
+
@edit="updateComment"
|
|
39
|
+
@remove="removeComment(comment.id)"
|
|
40
|
+
/>
|
|
41
|
+
</FSCol>
|
|
37
42
|
</FSCol>
|
|
38
43
|
</template>
|
|
39
44
|
|
|
40
45
|
<script lang="ts">
|
|
41
46
|
import type { PropType} from "vue";
|
|
42
|
-
import { computed, defineComponent, onMounted, watch } from "vue";
|
|
47
|
+
import { computed, defineComponent, onMounted, ref, watch } from "vue";
|
|
43
48
|
import _ from "lodash";
|
|
44
49
|
|
|
45
50
|
import { useDateFormat, useCurrentUser } from "@dative-gpi/foundation-shared-services/composables";
|
|
@@ -73,13 +78,15 @@ export default defineComponent({
|
|
|
73
78
|
}
|
|
74
79
|
},
|
|
75
80
|
setup(props) {
|
|
76
|
-
const {fetch : fetchCurrentUser, entity: currentUser} = useCurrentUser();
|
|
81
|
+
const { fetch : fetchCurrentUser, entity: currentUser } = useCurrentUser();
|
|
77
82
|
const { create: createComment, creating : creatingComment } = useCreateComment();
|
|
78
83
|
const { getMany: fetchComments, entities: comments } = useComments();
|
|
79
|
-
const {update
|
|
80
|
-
const {remove
|
|
84
|
+
const { update } = useUpdateComment();
|
|
85
|
+
const { remove, removing } = useRemoveComment();
|
|
81
86
|
const { epochToLongTimeFormat } = useDateFormat();
|
|
82
87
|
|
|
88
|
+
const error = ref<string | null>(null);
|
|
89
|
+
|
|
83
90
|
const orderedComments = computed(() => {
|
|
84
91
|
return _.orderBy(comments.value, ['timestamp'], ['desc']);
|
|
85
92
|
});
|
|
@@ -101,8 +108,14 @@ export default defineComponent({
|
|
|
101
108
|
update(payload.commentId, {comment : payload.comment})
|
|
102
109
|
}
|
|
103
110
|
|
|
104
|
-
const removeComment = (commentId : string) => {
|
|
105
|
-
|
|
111
|
+
const removeComment = async (commentId : string) => {
|
|
112
|
+
try {
|
|
113
|
+
error.value = null;
|
|
114
|
+
await remove(commentId);
|
|
115
|
+
}
|
|
116
|
+
catch (exception: any) {
|
|
117
|
+
error.value = exception.response.data;
|
|
118
|
+
}
|
|
106
119
|
}
|
|
107
120
|
|
|
108
121
|
watch(() => props.commentFilters, (next, previous) => {
|
|
@@ -112,15 +125,18 @@ export default defineComponent({
|
|
|
112
125
|
}, { immediate: true });
|
|
113
126
|
|
|
114
127
|
return {
|
|
115
|
-
comments,
|
|
116
|
-
ColorEnum,
|
|
117
128
|
creatingComment,
|
|
118
|
-
currentUser,
|
|
119
129
|
orderedComments,
|
|
130
|
+
currentUser,
|
|
131
|
+
ColorEnum,
|
|
132
|
+
comments,
|
|
133
|
+
removing,
|
|
134
|
+
error,
|
|
135
|
+
epochToLongTimeFormat,
|
|
120
136
|
createNewComment,
|
|
121
137
|
updateComment,
|
|
122
138
|
removeComment,
|
|
123
|
-
|
|
139
|
+
|
|
124
140
|
};
|
|
125
141
|
}
|
|
126
142
|
});
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSDataTable
|
|
3
|
+
:loading="fetchingConnectivityScenarios"
|
|
4
|
+
:modelValue="$props.modelValue"
|
|
5
|
+
:items="connectivityScenarios"
|
|
6
|
+
:tableCode="$props.tableCode"
|
|
7
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
8
|
+
v-bind="$attrs"
|
|
9
|
+
>
|
|
10
|
+
<template
|
|
11
|
+
v-for="(_, name) in $slots"
|
|
12
|
+
v-slot:[name]="slotData"
|
|
13
|
+
>
|
|
14
|
+
<slot
|
|
15
|
+
:name="name"
|
|
16
|
+
v-bind="slotData"
|
|
17
|
+
/>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<template
|
|
21
|
+
#item.time="{ item }"
|
|
22
|
+
>
|
|
23
|
+
{{ getTimeBestString(item.time) }}
|
|
24
|
+
</template>
|
|
25
|
+
|
|
26
|
+
<template
|
|
27
|
+
#item.deviceOrganisationImageId="{ item }"
|
|
28
|
+
>
|
|
29
|
+
<FSImage
|
|
30
|
+
v-if="item.deviceOrganisationImageId"
|
|
31
|
+
height="32px"
|
|
32
|
+
width="32px"
|
|
33
|
+
:imageId="item.deviceOrganisationImageId"
|
|
34
|
+
:thumbnail="true"
|
|
35
|
+
/>
|
|
36
|
+
</template>
|
|
37
|
+
<template
|
|
38
|
+
#item.deviceOrganisationConnectivity="{ item }"
|
|
39
|
+
>
|
|
40
|
+
<FSIcon
|
|
41
|
+
v-if="item.deviceOrganisationConnectivity"
|
|
42
|
+
:icon="item.deviceOrganisationConnectivity.icon"
|
|
43
|
+
:color="item.deviceOrganisationConnectivity.color"
|
|
44
|
+
/>
|
|
45
|
+
</template>
|
|
46
|
+
<template
|
|
47
|
+
#item.warnDeviceManager="{ item }"
|
|
48
|
+
>
|
|
49
|
+
<FSIconCheck
|
|
50
|
+
:value="item.warnDeviceManager"
|
|
51
|
+
/>
|
|
52
|
+
</template>
|
|
53
|
+
<template
|
|
54
|
+
#item.warnOnReconnection="{ item }"
|
|
55
|
+
>
|
|
56
|
+
<FSIconCheck
|
|
57
|
+
:value="item.warnOnReconnection"
|
|
58
|
+
/>
|
|
59
|
+
</template>
|
|
60
|
+
</FSDataTable>
|
|
61
|
+
</template>
|
|
62
|
+
|
|
63
|
+
<script lang="ts">
|
|
64
|
+
import { defineComponent, type PropType, watch } from "vue";
|
|
65
|
+
import _ from "lodash";
|
|
66
|
+
|
|
67
|
+
import { ConnectivityStatus } from "@dative-gpi/foundation-shared-domain/enums";
|
|
68
|
+
import {ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
69
|
+
import { getTimeBestString } from "@dative-gpi/foundation-shared-components/utils"
|
|
70
|
+
|
|
71
|
+
import type { ConnectivityScenarioFilters } from "@dative-gpi/foundation-core-domain/models";
|
|
72
|
+
import { useConnectivityScenarios } from "@dative-gpi/foundation-core-services/composables";
|
|
73
|
+
|
|
74
|
+
import FSDataTable from "../FSDataTable.vue";
|
|
75
|
+
import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
|
|
76
|
+
import FSImage from "@dative-gpi/foundation-shared-components/components/FSImage.vue";
|
|
77
|
+
import FSIconCheck from "@dative-gpi/foundation-shared-components/components/FSIconCheck.vue";
|
|
78
|
+
|
|
79
|
+
export default defineComponent({
|
|
80
|
+
name: "FSBaseConnectivityScenariosList",
|
|
81
|
+
components: {
|
|
82
|
+
FSDataTable,
|
|
83
|
+
FSIconCheck,
|
|
84
|
+
FSImage,
|
|
85
|
+
FSIcon
|
|
86
|
+
},
|
|
87
|
+
props: {
|
|
88
|
+
tableCode: {
|
|
89
|
+
type: String as PropType<string | null>,
|
|
90
|
+
required: false,
|
|
91
|
+
default: null
|
|
92
|
+
},
|
|
93
|
+
modelValue: {
|
|
94
|
+
type: Array as PropType<string[]>,
|
|
95
|
+
default: () => [],
|
|
96
|
+
required: false
|
|
97
|
+
},
|
|
98
|
+
connectivityScenarioFilters: {
|
|
99
|
+
type: Object as PropType<ConnectivityScenarioFilters>,
|
|
100
|
+
required: false,
|
|
101
|
+
default: null
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
emits: ["update:modelValue"],
|
|
105
|
+
setup(props) {
|
|
106
|
+
const { entities: connectivityScenarios, fetching: fetchingConnectivityScenarios, getMany: getManyConnectivityScenarios } = useConnectivityScenarios();
|
|
107
|
+
|
|
108
|
+
const fetch = () =>{
|
|
109
|
+
getManyConnectivityScenarios(props.connectivityScenarioFilters);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
watch(() => [props.connectivityScenarioFilters], (next, previous) => {
|
|
113
|
+
if ((!next && !previous) || !_.isEqual(next, previous)) {
|
|
114
|
+
fetch();
|
|
115
|
+
}
|
|
116
|
+
}, { immediate: true });
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
return {
|
|
120
|
+
fetchingConnectivityScenarios,
|
|
121
|
+
connectivityScenarios,
|
|
122
|
+
ConnectivityStatus,
|
|
123
|
+
ColorEnum,
|
|
124
|
+
getTimeBestString
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
</script>
|
package/components/lists/dashboardOrganisationTypes/FSBaseDashboardOrganisationTypesList.vue
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSDataTable
|
|
3
|
+
defaultMode="iterator"
|
|
4
|
+
:loading="fetchingDashboardOrganisationTypes"
|
|
3
5
|
:items="dashboardOrganisationTypes"
|
|
4
6
|
:itemTo="$props.itemTo"
|
|
5
7
|
:tableCode="$props.tableCode"
|
|
6
8
|
:modelValue="$props.modelValue"
|
|
9
|
+
:selectable="$props.selectable"
|
|
10
|
+
:singleSelect="$props.singleSelect"
|
|
7
11
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
8
12
|
v-bind="$attrs"
|
|
9
13
|
>
|
|
@@ -53,10 +57,22 @@
|
|
|
53
57
|
/>
|
|
54
58
|
</template>
|
|
55
59
|
<template
|
|
56
|
-
#item.
|
|
60
|
+
#item.tags="{ item }"
|
|
61
|
+
>
|
|
62
|
+
<FSTagGroup
|
|
63
|
+
variant="slide"
|
|
64
|
+
:showRemove="false"
|
|
65
|
+
:tags="item.tags"
|
|
66
|
+
/>
|
|
67
|
+
</template>
|
|
68
|
+
<template
|
|
69
|
+
#item.tile="{ index, item, toggleSelect }"
|
|
57
70
|
>
|
|
58
71
|
<FSDashboardOrganisationTypeTileUI
|
|
72
|
+
:key="index"
|
|
59
73
|
:bottomColor="item.colors"
|
|
74
|
+
:selectable="$props.selectable"
|
|
75
|
+
:singleSelect="$props.singleSelect"
|
|
60
76
|
:to="$props.itemTo && $props.itemTo(item)"
|
|
61
77
|
:modelValue="isSelected(item.id)"
|
|
62
78
|
@update:modelValue="toggleSelect(item)"
|
|
@@ -67,26 +83,28 @@
|
|
|
67
83
|
</template>
|
|
68
84
|
|
|
69
85
|
<script lang="ts">
|
|
70
|
-
import type
|
|
86
|
+
import { computed, defineComponent, onMounted, type PropType, watch } from "vue";
|
|
71
87
|
import type { RouteLocation } from "vue-router";
|
|
72
|
-
import { computed, defineComponent, onMounted, watch } from "vue";
|
|
73
88
|
import _ from "lodash";
|
|
74
89
|
|
|
75
90
|
import { useAppOrganisationId, useCurrentUserOrganisation, useDashboardOrganisationTypes } from "@dative-gpi/foundation-core-services/composables";
|
|
76
91
|
import type { DashboardOrganisationTypeFilters, DashboardOrganisationTypeInfos } from "@dative-gpi/foundation-core-domain/models";
|
|
77
92
|
import { useOrganisation } from "@dative-gpi/foundation-shared-services/composables";
|
|
78
93
|
|
|
79
|
-
import
|
|
94
|
+
import FSTagGroup from "@dative-gpi/foundation-shared-components/components/FSTagGroup.vue";
|
|
80
95
|
import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
|
|
81
96
|
import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
|
|
82
97
|
import FSText from "@dative-gpi/foundation-shared-components/components/FSText.vue";
|
|
83
98
|
import FSChip from "@dative-gpi/foundation-shared-components/components/FSChip.vue";
|
|
84
99
|
import FSDashboardOrganisationTypeTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSDashboardOrganisationTypeTileUI.vue";
|
|
85
100
|
|
|
101
|
+
import FSDataTable from "../FSDataTable.vue";
|
|
102
|
+
|
|
86
103
|
export default defineComponent({
|
|
87
104
|
name: "FSBaseDashboardOrganisationTypesList",
|
|
88
105
|
components: {
|
|
89
106
|
FSDataTable,
|
|
107
|
+
FSTagGroup,
|
|
90
108
|
FSIcon,
|
|
91
109
|
FSRow,
|
|
92
110
|
FSText,
|
|
@@ -94,6 +112,11 @@ export default defineComponent({
|
|
|
94
112
|
FSDashboardOrganisationTypeTileUI
|
|
95
113
|
},
|
|
96
114
|
props: {
|
|
115
|
+
tableCode: {
|
|
116
|
+
type: String as PropType<string | null>,
|
|
117
|
+
required: false,
|
|
118
|
+
default: null
|
|
119
|
+
},
|
|
97
120
|
dashboardOrganisationTypeFilters: {
|
|
98
121
|
type: Object as PropType<DashboardOrganisationTypeFilters>,
|
|
99
122
|
default: undefined,
|
|
@@ -108,13 +131,22 @@ export default defineComponent({
|
|
|
108
131
|
required: false,
|
|
109
132
|
default: () => []
|
|
110
133
|
},
|
|
111
|
-
|
|
112
|
-
type:
|
|
113
|
-
required:
|
|
134
|
+
selectable: {
|
|
135
|
+
type: Boolean,
|
|
136
|
+
required: false,
|
|
137
|
+
default: true
|
|
114
138
|
},
|
|
139
|
+
singleSelect: {
|
|
140
|
+
type: Boolean,
|
|
141
|
+
required: false,
|
|
142
|
+
default: false
|
|
143
|
+
}
|
|
115
144
|
},
|
|
145
|
+
emits: [
|
|
146
|
+
"update:modelValue"
|
|
147
|
+
],
|
|
116
148
|
setup(props) {
|
|
117
|
-
const { getMany: getDashboardOrganisationTypes, entities: dashboardOrganisationTypes } = useDashboardOrganisationTypes();
|
|
149
|
+
const { getMany: getDashboardOrganisationTypes, fetching: fetchingDashboardOrganisationTypes, entities: dashboardOrganisationTypes } = useDashboardOrganisationTypes();
|
|
118
150
|
const { fetch: fetchUserOrganisation, entity: userOrganisation } = useCurrentUserOrganisation();
|
|
119
151
|
const { get: fetchOrganisation, entity: organisation } = useOrganisation();
|
|
120
152
|
const { organisationId } = useAppOrganisationId();
|
|
@@ -154,6 +186,7 @@ export default defineComponent({
|
|
|
154
186
|
}, { immediate: true });
|
|
155
187
|
|
|
156
188
|
return {
|
|
189
|
+
fetchingDashboardOrganisationTypes,
|
|
157
190
|
userOrganisationMainDashboardId,
|
|
158
191
|
organisationMainDashboardId,
|
|
159
192
|
dashboardOrganisationTypes,
|