@dative-gpi/foundation-core-components 1.0.66 → 1.0.67-map-edit
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,8 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSDataTable
|
|
3
|
+
defaultMode="iterator"
|
|
3
4
|
:loading="fetchingGroups"
|
|
4
5
|
:items="groups"
|
|
5
|
-
:
|
|
6
|
+
:selectable="$props.selectable"
|
|
6
7
|
:tableCode="$props.tableCode"
|
|
7
8
|
:modelValue="$props.modelValue"
|
|
8
9
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
@@ -29,9 +30,10 @@
|
|
|
29
30
|
>
|
|
30
31
|
<FSImage
|
|
31
32
|
v-if="item.imageId"
|
|
32
|
-
height="
|
|
33
|
-
width="
|
|
33
|
+
height="32px"
|
|
34
|
+
width="32px"
|
|
34
35
|
:imageId="item.imageId"
|
|
36
|
+
:thumbnail="true"
|
|
35
37
|
/>
|
|
36
38
|
</template>
|
|
37
39
|
<template
|
|
@@ -46,15 +48,16 @@
|
|
|
46
48
|
>
|
|
47
49
|
<FSTagGroup
|
|
48
50
|
variant="slide"
|
|
49
|
-
:
|
|
51
|
+
:showRemove="false"
|
|
50
52
|
:tags="item.tags"
|
|
51
53
|
/>
|
|
52
54
|
</template>
|
|
53
55
|
<template
|
|
54
|
-
#item.tile="{ item, toggleSelect }"
|
|
56
|
+
#item.tile="{ index, item, toggleSelect }"
|
|
55
57
|
>
|
|
56
58
|
<FSGroupTileUI
|
|
57
|
-
:
|
|
59
|
+
:key="index"
|
|
60
|
+
:selectable="$props.selectable"
|
|
58
61
|
:modelValue="isSelected(item.id)"
|
|
59
62
|
@update:modelValue="toggleSelect(item)"
|
|
60
63
|
v-bind="item"
|
|
@@ -90,15 +93,16 @@ export default defineComponent({
|
|
|
90
93
|
},
|
|
91
94
|
props: {
|
|
92
95
|
tableCode: {
|
|
93
|
-
type: String
|
|
94
|
-
required:
|
|
96
|
+
type: String as PropType<string | null>,
|
|
97
|
+
required: false,
|
|
98
|
+
default: null
|
|
95
99
|
},
|
|
96
100
|
groupsFilters: {
|
|
97
101
|
type: Object as PropType<GroupFilters>,
|
|
98
102
|
required: false,
|
|
99
103
|
default: null
|
|
100
104
|
},
|
|
101
|
-
|
|
105
|
+
selectable: {
|
|
102
106
|
type: Boolean,
|
|
103
107
|
required: false,
|
|
104
108
|
default: true
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSDataTable
|
|
3
|
+
defaultMode="iterator"
|
|
3
4
|
:loading="fetchingLocations"
|
|
4
5
|
:items="locations"
|
|
5
|
-
:
|
|
6
|
+
:selectable="$props.selectable"
|
|
6
7
|
:tableCode="tableCode"
|
|
7
8
|
:modelValue="$props.modelValue"
|
|
8
9
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
@@ -26,16 +27,18 @@
|
|
|
26
27
|
</template>
|
|
27
28
|
|
|
28
29
|
<template
|
|
29
|
-
#item.tile="{ item, toggleSelect }"
|
|
30
|
+
#item.tile="{ index, item, toggleSelect }"
|
|
30
31
|
>
|
|
31
32
|
<FSLocationTileUI
|
|
32
|
-
|
|
33
|
+
:key="index"
|
|
33
34
|
:bottomColor="item.colors"
|
|
34
|
-
:
|
|
35
|
+
:address="item.address.placeLabel"
|
|
36
|
+
:selectable="$props.selectable"
|
|
35
37
|
:singleSelect="singleSelect"
|
|
36
38
|
:modelValue="isSelected(item.id)"
|
|
37
39
|
:to="$props.itemTo && $props.itemTo(item)"
|
|
38
40
|
@update:modelValue="toggleSelect(item)"
|
|
41
|
+
v-bind="item"
|
|
39
42
|
/>
|
|
40
43
|
</template>
|
|
41
44
|
</FSDataTable>
|
|
@@ -62,21 +65,21 @@ export default defineComponent({
|
|
|
62
65
|
FSIcon
|
|
63
66
|
},
|
|
64
67
|
props: {
|
|
68
|
+
tableCode: {
|
|
69
|
+
type: String as PropType<string | null>,
|
|
70
|
+
required: false,
|
|
71
|
+
default: null
|
|
72
|
+
},
|
|
65
73
|
locationsFilters: {
|
|
66
74
|
type: Object as PropType<LocationFilters>,
|
|
67
75
|
required: false,
|
|
68
76
|
default: null
|
|
69
77
|
},
|
|
70
|
-
|
|
78
|
+
selectable: {
|
|
71
79
|
type: Boolean,
|
|
72
80
|
required: false,
|
|
73
81
|
default: true
|
|
74
82
|
},
|
|
75
|
-
modelValue: {
|
|
76
|
-
type: Array as PropType<string[]>,
|
|
77
|
-
default: () => [],
|
|
78
|
-
required: false
|
|
79
|
-
},
|
|
80
83
|
itemTo: {
|
|
81
84
|
type: Function as PropType<(item: LocationInfos) => Partial<RouteLocation>>,
|
|
82
85
|
required: false
|
|
@@ -86,9 +89,10 @@ export default defineComponent({
|
|
|
86
89
|
required: false,
|
|
87
90
|
default: false
|
|
88
91
|
},
|
|
89
|
-
|
|
90
|
-
type:
|
|
91
|
-
|
|
92
|
+
modelValue: {
|
|
93
|
+
type: Array as PropType<string[]>,
|
|
94
|
+
default: () => [],
|
|
95
|
+
required: false
|
|
92
96
|
}
|
|
93
97
|
},
|
|
94
98
|
emits: ["update:modelValue"],
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSDataTable
|
|
3
|
+
defaultMode="iterator"
|
|
4
|
+
:singleSelect="$props.singleSelect"
|
|
5
|
+
:selectable="$props.selectable"
|
|
6
|
+
:tableCode="$props.tableCode"
|
|
3
7
|
:loading="fetchingModels"
|
|
4
8
|
:items="models"
|
|
5
|
-
:tableCode="$props.tableCode"
|
|
6
9
|
:modelValue="$props.modelValue"
|
|
7
10
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
8
11
|
v-bind="$attrs"
|
|
@@ -38,6 +41,7 @@
|
|
|
38
41
|
height="32px"
|
|
39
42
|
width="32px"
|
|
40
43
|
:imageId="item.imageId"
|
|
44
|
+
:thumbnail="true"
|
|
41
45
|
/>
|
|
42
46
|
</template>
|
|
43
47
|
<template
|
|
@@ -55,15 +59,18 @@
|
|
|
55
59
|
/>
|
|
56
60
|
</template>
|
|
57
61
|
<template
|
|
58
|
-
#item.tile="{ item, toggleSelect }"
|
|
62
|
+
#item.tile="{ index, item, toggleSelect }"
|
|
59
63
|
>
|
|
60
64
|
<FSModelTileUI
|
|
61
|
-
|
|
65
|
+
:key="index"
|
|
66
|
+
:to="$props.itemTo && $props.itemTo(item)"
|
|
67
|
+
:selectable="$props.selectable"
|
|
68
|
+
:singleSelect="$props.singleSelect"
|
|
62
69
|
:imageId="item.imageId"
|
|
63
70
|
:label="item.label"
|
|
64
71
|
:modelValue="isSelected(item.id)"
|
|
65
|
-
:to="$props.itemTo && $props.itemTo(item)"
|
|
66
72
|
@update:modelValue="toggleSelect(item)"
|
|
73
|
+
v-bind="item"
|
|
67
74
|
/>
|
|
68
75
|
</template>
|
|
69
76
|
</FSDataTable>
|
|
@@ -95,23 +102,34 @@ export default defineComponent({
|
|
|
95
102
|
FSIcon,
|
|
96
103
|
},
|
|
97
104
|
props: {
|
|
105
|
+
tableCode: {
|
|
106
|
+
type: String as PropType<string | null>,
|
|
107
|
+
required: false,
|
|
108
|
+
default: null
|
|
109
|
+
},
|
|
98
110
|
modelsFilters: {
|
|
99
111
|
type: Object as PropType<ModelFilters>,
|
|
100
112
|
required: false,
|
|
101
113
|
default: null
|
|
102
114
|
},
|
|
103
|
-
modelValue: {
|
|
104
|
-
type: Array as PropType<string[]>,
|
|
105
|
-
default: () => [],
|
|
106
|
-
required: false
|
|
107
|
-
},
|
|
108
115
|
itemTo: {
|
|
109
116
|
type: Function as PropType<(item: ModelInfos) => Partial<RouteLocation>>,
|
|
110
117
|
required: false
|
|
111
118
|
},
|
|
112
|
-
|
|
113
|
-
type:
|
|
114
|
-
required:
|
|
119
|
+
selectable: {
|
|
120
|
+
type: Boolean,
|
|
121
|
+
required: false,
|
|
122
|
+
default: true
|
|
123
|
+
},
|
|
124
|
+
singleSelect: {
|
|
125
|
+
type: Boolean,
|
|
126
|
+
required: false,
|
|
127
|
+
default: false
|
|
128
|
+
},
|
|
129
|
+
modelValue: {
|
|
130
|
+
type: Array as PropType<string[]>,
|
|
131
|
+
default: () => [],
|
|
132
|
+
required: false
|
|
115
133
|
}
|
|
116
134
|
},
|
|
117
135
|
emits: ["update:modelValue"],
|
|
@@ -130,8 +148,8 @@ export default defineComponent({
|
|
|
130
148
|
|
|
131
149
|
return {
|
|
132
150
|
fetchingModels,
|
|
133
|
-
models,
|
|
134
151
|
ColorEnum,
|
|
152
|
+
models,
|
|
135
153
|
isSelected
|
|
136
154
|
};
|
|
137
155
|
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSSimpleList
|
|
3
|
+
:items="playlists"
|
|
4
|
+
:loading="fetching"
|
|
5
|
+
v-bind="$attrs"
|
|
6
|
+
/>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script lang="ts">
|
|
10
|
+
import { defineComponent, type PropType, watch } from "vue";
|
|
11
|
+
|
|
12
|
+
import type { PlaylistFilters } from "@dative-gpi/foundation-core-domain/models";
|
|
13
|
+
import { usePlaylists } from "@dative-gpi/foundation-core-services/composables";
|
|
14
|
+
|
|
15
|
+
import FSSimpleList from "@dative-gpi/foundation-shared-components/components/lists/FSSimpleList.vue";
|
|
16
|
+
|
|
17
|
+
export default defineComponent({
|
|
18
|
+
name: "FSSimplePlaylistsList",
|
|
19
|
+
components: {
|
|
20
|
+
FSSimpleList,
|
|
21
|
+
},
|
|
22
|
+
props: {
|
|
23
|
+
playlistFilters: {
|
|
24
|
+
type: Object as PropType<PlaylistFilters>,
|
|
25
|
+
required: false,
|
|
26
|
+
default: () => ({})
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
setup(props) {
|
|
30
|
+
const { entities: playlists, getMany, fetching } = usePlaylists();
|
|
31
|
+
|
|
32
|
+
const fetch = () => {
|
|
33
|
+
getMany(props.playlistFilters);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
watch(() => props.playlistFilters, fetch, { immediate: true });
|
|
37
|
+
|
|
38
|
+
return {
|
|
39
|
+
playlists,
|
|
40
|
+
fetching
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
</script>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
:items="roleOrganisationTypes"
|
|
4
4
|
:itemTo="$props.itemTo"
|
|
5
5
|
:loading="fetchingRoleOrganisations"
|
|
6
|
-
:
|
|
6
|
+
:selectable="$props.selectable"
|
|
7
7
|
:tableCode="$props.tableCode"
|
|
8
8
|
:modelValue="$props.modelValue"
|
|
9
9
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
>
|
|
45
45
|
<FSTagGroup
|
|
46
46
|
variant="slide"
|
|
47
|
-
:
|
|
47
|
+
:showRemove="false"
|
|
48
48
|
:tags="item.tags"
|
|
49
49
|
/>
|
|
50
50
|
</template>
|
|
@@ -78,8 +78,9 @@ export default defineComponent({
|
|
|
78
78
|
},
|
|
79
79
|
props: {
|
|
80
80
|
tableCode: {
|
|
81
|
-
type: String
|
|
82
|
-
required:
|
|
81
|
+
type: String as PropType<string | null>,
|
|
82
|
+
required: false,
|
|
83
|
+
default: null
|
|
83
84
|
},
|
|
84
85
|
roleOrganisationTypesFilters: {
|
|
85
86
|
type: Object as PropType<RoleOrganisationTypeFilters | null>,
|
|
@@ -90,7 +91,7 @@ export default defineComponent({
|
|
|
90
91
|
type: Function as PropType<(item: RoleOrganisationTypeInfos) => Partial<RouteLocation>>,
|
|
91
92
|
required: false
|
|
92
93
|
},
|
|
93
|
-
|
|
94
|
+
selectable: {
|
|
94
95
|
type: Boolean,
|
|
95
96
|
required: false,
|
|
96
97
|
default: true
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSDataTable
|
|
3
|
-
:items="roleOrganisations"
|
|
4
|
-
:itemTo="$props.itemTo"
|
|
5
3
|
:loading="fetchingRoleOrganisations"
|
|
6
|
-
:
|
|
4
|
+
:selectable="$props.selectable"
|
|
7
5
|
:tableCode="$props.tableCode"
|
|
6
|
+
:items="roleOrganisations"
|
|
7
|
+
:itemTo="$props.itemTo"
|
|
8
8
|
:modelValue="$props.modelValue"
|
|
9
9
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
10
10
|
v-bind="$attrs"
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
>
|
|
45
45
|
<FSTagGroup
|
|
46
46
|
variant="slide"
|
|
47
|
-
:
|
|
47
|
+
:showRemove="false"
|
|
48
48
|
:tags="item.tags"
|
|
49
49
|
/>
|
|
50
50
|
</template>
|
|
@@ -52,34 +52,35 @@
|
|
|
52
52
|
</template>
|
|
53
53
|
|
|
54
54
|
<script lang="ts">
|
|
55
|
-
import type
|
|
56
|
-
import {
|
|
57
|
-
import type { RouteLocation } from "vue-router";
|
|
55
|
+
import { defineComponent, type PropType, watch } from "vue";
|
|
56
|
+
import { type RouteLocation } from "vue-router";
|
|
58
57
|
import _ from "lodash";
|
|
59
58
|
|
|
60
|
-
import type
|
|
59
|
+
import { type RoleOrganisationFilters, type RoleOrganisationInfos } from "@dative-gpi/foundation-core-domain/models";
|
|
61
60
|
import { userTypeIcon, userTypeLabel } from "@dative-gpi/foundation-core-components/utils";
|
|
62
61
|
import { useRoleOrganisations } from "@dative-gpi/foundation-core-services/composables";
|
|
63
62
|
|
|
64
|
-
import
|
|
65
|
-
import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
|
|
63
|
+
import FSTagGroup from "@dative-gpi/foundation-shared-components/components/FSTagGroup.vue";
|
|
66
64
|
import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
|
|
67
65
|
import FSText from "@dative-gpi/foundation-shared-components/components/FSText.vue";
|
|
68
|
-
import
|
|
66
|
+
import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
|
|
67
|
+
|
|
68
|
+
import FSDataTable from "../FSDataTable.vue";
|
|
69
69
|
|
|
70
70
|
export default defineComponent({
|
|
71
71
|
name: "FSBaseRoleOrganisationsList",
|
|
72
72
|
components: {
|
|
73
73
|
FSDataTable,
|
|
74
|
-
|
|
74
|
+
FSTagGroup,
|
|
75
75
|
FSIcon,
|
|
76
76
|
FSText,
|
|
77
|
-
|
|
77
|
+
FSRow
|
|
78
78
|
},
|
|
79
79
|
props: {
|
|
80
80
|
tableCode: {
|
|
81
|
-
type: String
|
|
82
|
-
required:
|
|
81
|
+
type: String as PropType<string | null>,
|
|
82
|
+
required: false,
|
|
83
|
+
default: null
|
|
83
84
|
},
|
|
84
85
|
roleOrganisationsFilters: {
|
|
85
86
|
type: Object as PropType<RoleOrganisationFilters | null>,
|
|
@@ -90,7 +91,7 @@ export default defineComponent({
|
|
|
90
91
|
type: Function as PropType<(item: RoleOrganisationInfos) => Partial<RouteLocation>>,
|
|
91
92
|
required: false
|
|
92
93
|
},
|
|
93
|
-
|
|
94
|
+
selectable: {
|
|
94
95
|
type: Boolean,
|
|
95
96
|
required: false,
|
|
96
97
|
default: true
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
:items="scenarioOrganisationTypes"
|
|
4
4
|
:itemTo="$props.itemTo"
|
|
5
5
|
:loading="fetchingScenarioOrganisationTypes"
|
|
6
|
-
:
|
|
6
|
+
:selectable="$props.selectable"
|
|
7
7
|
:tableCode="$props.tableCode"
|
|
8
8
|
:modelValue="$props.modelValue"
|
|
9
9
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
@@ -26,6 +26,23 @@
|
|
|
26
26
|
{{ item.icon }}
|
|
27
27
|
</FSIcon>
|
|
28
28
|
</template>
|
|
29
|
+
|
|
30
|
+
<template
|
|
31
|
+
#item.criticity="{ item }"
|
|
32
|
+
>
|
|
33
|
+
<FSRow
|
|
34
|
+
align="center-left"
|
|
35
|
+
>
|
|
36
|
+
<FSIcon
|
|
37
|
+
:color="AlertTools.criticityColor(item.criticity)"
|
|
38
|
+
>
|
|
39
|
+
{{ AlertTools.criticityIcon(item.criticity) }}
|
|
40
|
+
</FSIcon>
|
|
41
|
+
<FSSpan>
|
|
42
|
+
{{ AlertTools.criticityLabel(item.criticity) }}
|
|
43
|
+
</FSSpan>
|
|
44
|
+
</FSRow>
|
|
45
|
+
</template>
|
|
29
46
|
|
|
30
47
|
<template
|
|
31
48
|
#item.imageId="{ item }"
|
|
@@ -35,6 +52,7 @@
|
|
|
35
52
|
height="32px"
|
|
36
53
|
width="32px"
|
|
37
54
|
:imageId="item.imageId"
|
|
55
|
+
:thumbnail="true"
|
|
38
56
|
/>
|
|
39
57
|
</template>
|
|
40
58
|
|
|
@@ -43,7 +61,7 @@
|
|
|
43
61
|
>
|
|
44
62
|
<FSTagGroup
|
|
45
63
|
variant="slide"
|
|
46
|
-
:
|
|
64
|
+
:showRemove="false"
|
|
47
65
|
:tags="item.tags"
|
|
48
66
|
/>
|
|
49
67
|
</template>
|
|
@@ -51,10 +69,14 @@
|
|
|
51
69
|
</template>
|
|
52
70
|
|
|
53
71
|
<script lang="ts">
|
|
54
|
-
import { defineComponent, type PropType, watch } from "vue";
|
|
72
|
+
import { computed, defineComponent, type PropType, watch } from "vue";
|
|
55
73
|
import type { RouteLocation } from "vue-router";
|
|
56
74
|
import _ from "lodash";
|
|
57
75
|
|
|
76
|
+
import { Criticity } from "@dative-gpi/foundation-shared-domain/enums";
|
|
77
|
+
import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
|
|
78
|
+
import { AlertTools } from "@dative-gpi/foundation-shared-components/tools";
|
|
79
|
+
|
|
58
80
|
import type { ScenarioOrganisationTypeFilters, ScenarioOrganisationTypeInfos } from "@dative-gpi/foundation-core-domain/models";
|
|
59
81
|
import { useScenarioOrganisationTypes } from "@dative-gpi/foundation-core-services/composables";
|
|
60
82
|
|
|
@@ -62,19 +84,22 @@ import FSDataTable from "../FSDataTable.vue";
|
|
|
62
84
|
import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
|
|
63
85
|
import FSImage from "@dative-gpi/foundation-shared-components/components/FSImage.vue";
|
|
64
86
|
import FSTagGroup from "@dative-gpi/foundation-shared-components/components/FSTagGroup.vue";
|
|
87
|
+
import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
|
|
65
88
|
|
|
66
89
|
export default defineComponent({
|
|
67
90
|
name: "FSBaseScenarioOrganisationTypesList",
|
|
68
91
|
components: {
|
|
69
92
|
FSDataTable,
|
|
70
|
-
|
|
93
|
+
FSTagGroup,
|
|
71
94
|
FSImage,
|
|
72
|
-
|
|
95
|
+
FSIcon,
|
|
96
|
+
FSRow,
|
|
73
97
|
},
|
|
74
98
|
props: {
|
|
75
99
|
tableCode: {
|
|
76
|
-
type: String
|
|
77
|
-
required:
|
|
100
|
+
type: String as PropType<string | null>,
|
|
101
|
+
required: false,
|
|
102
|
+
default: null
|
|
78
103
|
},
|
|
79
104
|
scenarioOrganisationTypeFilters: {
|
|
80
105
|
type: Object as PropType<ScenarioOrganisationTypeFilters>,
|
|
@@ -85,7 +110,7 @@ export default defineComponent({
|
|
|
85
110
|
type: Function as PropType<(item: ScenarioOrganisationTypeInfos) => Partial<RouteLocation>>,
|
|
86
111
|
required: false
|
|
87
112
|
},
|
|
88
|
-
|
|
113
|
+
selectable: {
|
|
89
114
|
type: Boolean,
|
|
90
115
|
required: false,
|
|
91
116
|
default: true
|
|
@@ -100,6 +125,16 @@ export default defineComponent({
|
|
|
100
125
|
setup(props) {
|
|
101
126
|
const { entities: scenarioOrganisationTypes, fetching: fetchingScenarioOrganisationTypes, getMany: getManyScenarioOrganisationTypes } = useScenarioOrganisationTypes();
|
|
102
127
|
|
|
128
|
+
const headersOptions = computed(() => ({
|
|
129
|
+
criticity: {
|
|
130
|
+
fixedFilters: getEnumEntries(Criticity).map(e => ({
|
|
131
|
+
value: e.value,
|
|
132
|
+
text: AlertTools.criticityLabel(e.value)
|
|
133
|
+
})),
|
|
134
|
+
methodFilter: (value: Criticity, item: Criticity) => value == item
|
|
135
|
+
}
|
|
136
|
+
}));
|
|
137
|
+
|
|
103
138
|
const isSelected = (id: string): boolean => {
|
|
104
139
|
return props.modelValue.includes(id);
|
|
105
140
|
};
|
|
@@ -113,6 +148,8 @@ export default defineComponent({
|
|
|
113
148
|
return {
|
|
114
149
|
fetchingScenarioOrganisationTypes,
|
|
115
150
|
scenarioOrganisationTypes,
|
|
151
|
+
headersOptions,
|
|
152
|
+
AlertTools,
|
|
116
153
|
isSelected
|
|
117
154
|
};
|
|
118
155
|
}
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
:items="scenarioOrganisations"
|
|
4
4
|
:itemTo="$props.itemTo"
|
|
5
5
|
:loading="fetchingScenarioOrganisations"
|
|
6
|
-
:
|
|
6
|
+
:selectable="$props.selectable"
|
|
7
7
|
:tableCode="$props.tableCode"
|
|
8
8
|
:modelValue="$props.modelValue"
|
|
9
|
+
:headersOptions="headersOptions"
|
|
9
10
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
10
11
|
v-bind="$attrs"
|
|
11
12
|
>
|
|
@@ -27,12 +28,29 @@
|
|
|
27
28
|
</FSIcon>
|
|
28
29
|
</template>
|
|
29
30
|
|
|
31
|
+
<template
|
|
32
|
+
#item.criticity="{ item }"
|
|
33
|
+
>
|
|
34
|
+
<FSRow
|
|
35
|
+
align="center-left"
|
|
36
|
+
>
|
|
37
|
+
<FSIcon
|
|
38
|
+
:color="AlertTools.criticityColor(item.criticity)"
|
|
39
|
+
>
|
|
40
|
+
{{ AlertTools.criticityIcon(item.criticity) }}
|
|
41
|
+
</FSIcon>
|
|
42
|
+
<FSSpan>
|
|
43
|
+
{{ AlertTools.criticityLabel(item.criticity) }}
|
|
44
|
+
</FSSpan>
|
|
45
|
+
</FSRow>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
30
48
|
<template
|
|
31
49
|
#item.tags="{ item }"
|
|
32
50
|
>
|
|
33
51
|
<FSTagGroup
|
|
34
52
|
variant="slide"
|
|
35
|
-
:
|
|
53
|
+
:showRemove="false"
|
|
36
54
|
:tags="item.tags"
|
|
37
55
|
/>
|
|
38
56
|
</template>
|
|
@@ -40,28 +58,35 @@
|
|
|
40
58
|
</template>
|
|
41
59
|
|
|
42
60
|
<script lang="ts">
|
|
43
|
-
import { defineComponent, type PropType, watch } from "vue";
|
|
61
|
+
import { computed, defineComponent, type PropType, watch } from "vue";
|
|
44
62
|
import type { RouteLocation } from "vue-router";
|
|
45
63
|
import _ from "lodash";
|
|
46
64
|
|
|
65
|
+
import { Criticity } from "@dative-gpi/foundation-shared-domain/enums";
|
|
66
|
+
import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
|
|
67
|
+
import { AlertTools } from "@dative-gpi/foundation-shared-components/tools";
|
|
68
|
+
|
|
47
69
|
import type { ScenarioOrganisationFilters, ScenarioOrganisationInfos } from "@dative-gpi/foundation-core-domain/models";
|
|
48
70
|
import { useScenarioOrganisations } from "@dative-gpi/foundation-core-services/composables";
|
|
49
71
|
|
|
50
72
|
import FSDataTable from "../FSDataTable.vue";
|
|
51
73
|
import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
|
|
52
74
|
import FSTagGroup from "@dative-gpi/foundation-shared-components/components/FSTagGroup.vue";
|
|
75
|
+
import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
|
|
53
76
|
|
|
54
77
|
export default defineComponent({
|
|
55
78
|
name: "FSBaseScenarioOrganisationsList",
|
|
56
79
|
components: {
|
|
57
80
|
FSDataTable,
|
|
81
|
+
FSTagGroup,
|
|
58
82
|
FSIcon,
|
|
59
|
-
|
|
83
|
+
FSRow
|
|
60
84
|
},
|
|
61
85
|
props: {
|
|
62
86
|
tableCode: {
|
|
63
|
-
type: String
|
|
64
|
-
required:
|
|
87
|
+
type: String as PropType<string | null>,
|
|
88
|
+
required: false,
|
|
89
|
+
default: null
|
|
65
90
|
},
|
|
66
91
|
scenarioOrganisationFilters: {
|
|
67
92
|
type: Object as PropType<ScenarioOrganisationFilters>,
|
|
@@ -72,7 +97,7 @@ export default defineComponent({
|
|
|
72
97
|
type: Function as PropType<(item: ScenarioOrganisationInfos) => Partial<RouteLocation>>,
|
|
73
98
|
required: false
|
|
74
99
|
},
|
|
75
|
-
|
|
100
|
+
selectable: {
|
|
76
101
|
type: Boolean,
|
|
77
102
|
required: false,
|
|
78
103
|
default: true
|
|
@@ -87,6 +112,17 @@ export default defineComponent({
|
|
|
87
112
|
setup(props) {
|
|
88
113
|
const { entities: scenarioOrganisations, fetching: fetchingScenarioOrganisations, getMany: getManyScenarioOrganisations } = useScenarioOrganisations();
|
|
89
114
|
|
|
115
|
+
|
|
116
|
+
const headersOptions = computed(() => ({
|
|
117
|
+
criticity: {
|
|
118
|
+
fixedFilters: getEnumEntries(Criticity).map(e => ({
|
|
119
|
+
value: e.value,
|
|
120
|
+
text: AlertTools.criticityLabel(e.value)
|
|
121
|
+
})),
|
|
122
|
+
methodFilter: (value: Criticity, item: Criticity) => value == item
|
|
123
|
+
}
|
|
124
|
+
}));
|
|
125
|
+
|
|
90
126
|
const isSelected = (id: string): boolean => {
|
|
91
127
|
return props.modelValue.includes(id);
|
|
92
128
|
};
|
|
@@ -100,6 +136,8 @@ export default defineComponent({
|
|
|
100
136
|
return {
|
|
101
137
|
fetchingScenarioOrganisations,
|
|
102
138
|
scenarioOrganisations,
|
|
139
|
+
headersOptions,
|
|
140
|
+
AlertTools,
|
|
103
141
|
isSelected
|
|
104
142
|
};
|
|
105
143
|
}
|