@dative-gpi/foundation-core-components 1.0.70 → 1.0.71-groupings-2
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/FSAutocompleteGrouping.vue +105 -0
- 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 +99 -20
- package/components/fields/FSMagicConfigField.vue +171 -0
- package/components/fields/FSMagicField.vue +214 -0
- 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/groupings/FSBaseGroupingsList.vue +125 -0
- package/components/lists/groups/FSBaseGroupsList.vue +13 -9
- package/components/lists/locations/FSBaseLocationsList.vue +17 -13
- package/components/lists/models/FSBaseModelsList.vue +10 -5
- package/components/lists/playlists/FSSimplePlaylistsList.vue +44 -0
- package/components/lists/roleOrganisationTypes/FSBaseRoleOrganisationTypesList.vue +6 -5
- package/components/lists/roleOrganisations/FSBaseRoleOrganisationsList.vue +6 -5
- 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/{FSBaseServiceAccountRoleOrganisations.vue → FSBaseServiceAccountRoleOrganisationsList.vue} +6 -5
- package/components/lists/userOrganisations/FSBaseUserOrganisationsList.vue +10 -7
- package/components/lists/userOrganisations/FSChipUserOrganisationsList.vue +61 -0
- package/components/selects/FSPlotPerSelector.vue +94 -16
- 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/FSSelectEntityType.vue +0 -59
- package/components/selects/FSSerieTypeSelector.vue +0 -51
- package/utils/charts.ts +0 -137
|
@@ -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,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSDataTable
|
|
3
3
|
:loading="fetchingRoleOrganisations"
|
|
4
|
-
:
|
|
4
|
+
:selectable="$props.selectable"
|
|
5
5
|
:tableCode="$props.tableCode"
|
|
6
6
|
:items="roleOrganisations"
|
|
7
7
|
:itemTo="$props.itemTo"
|
|
@@ -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
|
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
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSDataTable
|
|
3
3
|
:loading="fetchingScenarioOrganisationTypes || fetchingScenarioOrganisations"
|
|
4
|
-
:
|
|
4
|
+
:headersOptions="headersOptions"
|
|
5
|
+
:extraHeaders="headerAssociation"
|
|
5
6
|
:items="scenarios"
|
|
6
|
-
:
|
|
7
|
-
:tableCode="$props.tableCode"
|
|
7
|
+
:itemTo="routerLink"
|
|
8
8
|
:modelValue="$props.modelValue"
|
|
9
|
+
:tableCode="$props.tableCode"
|
|
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>
|
|
@@ -45,27 +63,37 @@ import _ from "lodash";
|
|
|
45
63
|
|
|
46
64
|
import { useTranslations } from "@dative-gpi/bones-ui";
|
|
47
65
|
|
|
48
|
-
import {
|
|
66
|
+
import { Criticity, ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
|
|
67
|
+
import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
|
|
68
|
+
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
69
|
+
import { AlertTools } from "@dative-gpi/foundation-shared-components/tools"
|
|
49
70
|
|
|
50
71
|
import type { ScenarioOrganisationFilters, ScenarioOrganisationTypeFilters } from "@dative-gpi/foundation-core-domain/models";
|
|
51
|
-
|
|
52
|
-
import { useScenarioOrganisations, useScenarioOrganisationTypes } from "@dative-gpi/foundation-core-services/composables";
|
|
72
|
+
import { useScenarioOrganisations, useScenarioOrganisationTypes, useRouteOrganisation } from "@dative-gpi/foundation-core-services/composables";
|
|
53
73
|
|
|
54
74
|
import FSDataTable from "../FSDataTable.vue";
|
|
55
|
-
import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
|
|
56
75
|
import FSTagGroup from "@dative-gpi/foundation-shared-components/components/FSTagGroup.vue";
|
|
76
|
+
import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
|
|
77
|
+
import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
|
|
57
78
|
|
|
58
79
|
export default defineComponent({
|
|
59
80
|
name: "FSBaseScenariosList",
|
|
60
|
-
components:
|
|
81
|
+
components:{
|
|
61
82
|
FSDataTable,
|
|
83
|
+
FSTagGroup,
|
|
62
84
|
FSIcon,
|
|
63
|
-
|
|
85
|
+
FSRow
|
|
64
86
|
},
|
|
65
87
|
props: {
|
|
66
88
|
tableCode: {
|
|
67
|
-
type: String
|
|
68
|
-
required:
|
|
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
|
|
69
97
|
},
|
|
70
98
|
scenarioOrganisationFilters: {
|
|
71
99
|
type: Object as PropType<ScenarioOrganisationFilters>,
|
|
@@ -77,79 +105,60 @@ export default defineComponent({
|
|
|
77
105
|
required: false,
|
|
78
106
|
default: null
|
|
79
107
|
},
|
|
80
|
-
|
|
108
|
+
showAssociation: {
|
|
81
109
|
type: Boolean,
|
|
82
110
|
required: false,
|
|
83
111
|
default: true
|
|
84
112
|
},
|
|
85
|
-
|
|
86
|
-
type:
|
|
87
|
-
|
|
88
|
-
|
|
113
|
+
scope: {
|
|
114
|
+
type: Number as PropType<ApplicationScope>,
|
|
115
|
+
required: false,
|
|
116
|
+
default: ApplicationScope.None
|
|
89
117
|
}
|
|
90
118
|
},
|
|
91
119
|
emits: ["update:modelValue"],
|
|
92
|
-
setup(props
|
|
120
|
+
setup(props) {
|
|
93
121
|
const { $tr } = useTranslations();
|
|
94
122
|
const { entities: scenarioOrganisations, fetching: fetchingScenarioOrganisations, getMany: getManyScenarioOrganisations } = useScenarioOrganisations();
|
|
95
123
|
const { entities: scenarioOrganisationTypes, fetching: fetchingScenarioOrganisationTypes, getMany: getManyScenarioOrganisationTypes } = useScenarioOrganisationTypes();
|
|
96
124
|
|
|
97
|
-
const
|
|
98
|
-
return props.modelValue.includes(value);
|
|
99
|
-
};
|
|
125
|
+
const { $r } = useRouteOrganisation();
|
|
100
126
|
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
{
|
|
104
|
-
|
|
105
|
-
|
|
127
|
+
const headerAssociation = computed(() => {
|
|
128
|
+
if(props.showAssociation){
|
|
129
|
+
return [{
|
|
130
|
+
columnId: "association",
|
|
131
|
+
text: $tr("ui.common.association", "Association"),
|
|
132
|
+
value: "association",
|
|
106
133
|
sortable: false,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
text: $tr("entity.scenario.modelLabel", "Model label"),
|
|
115
|
-
value: "modelLabel",
|
|
116
|
-
sortable: true
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
text: $tr("entity.scenario.dataCategoryLabel", "Data category label"),
|
|
120
|
-
value: "dataCategoryLabel",
|
|
121
|
-
sortable: true
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
text: $tr("ui.common.action", ""),
|
|
125
|
-
value: "action",
|
|
126
|
-
sortable: false
|
|
127
|
-
}
|
|
128
|
-
];
|
|
134
|
+
filterable: false,
|
|
135
|
+
index: -1,
|
|
136
|
+
hidden: false
|
|
137
|
+
}];
|
|
138
|
+
}
|
|
129
139
|
});
|
|
130
140
|
|
|
141
|
+
const headersOptions = computed(() => ({
|
|
142
|
+
criticity: {
|
|
143
|
+
fixedFilters: getEnumEntries(Criticity).map(e => ({
|
|
144
|
+
value: e.value,
|
|
145
|
+
text: AlertTools.criticityLabel(e.value)
|
|
146
|
+
})),
|
|
147
|
+
methodFilter: (value: Criticity, item: Criticity) => value == item
|
|
148
|
+
}
|
|
149
|
+
}));
|
|
131
150
|
|
|
132
151
|
const scenarios = computed(() => {
|
|
133
|
-
|
|
134
|
-
return
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
label: c.label,
|
|
142
|
-
modelLabel: c.modelLabel,
|
|
143
|
-
code: c.code,
|
|
144
|
-
icon: c.icon,
|
|
145
|
-
tags: c.tags,
|
|
146
|
-
criticity: c.criticity,
|
|
147
|
-
parameters: c.parameters
|
|
148
|
-
}
|
|
149
|
-
})
|
|
150
|
-
.concat(scenarioOrganisationTypes.value.map(c => {
|
|
152
|
+
if(props.scope == ApplicationScope.Organisation){
|
|
153
|
+
return scenarioOrganisations.value
|
|
154
|
+
}
|
|
155
|
+
else if(props.scope == ApplicationScope.OrganisationType){
|
|
156
|
+
return scenarioOrganisationTypes.value
|
|
157
|
+
}
|
|
158
|
+
else{
|
|
159
|
+
return scenarioOrganisations.value.map(c => {
|
|
151
160
|
return {
|
|
152
|
-
id:
|
|
161
|
+
id: c.id,
|
|
153
162
|
modelId: c.modelId,
|
|
154
163
|
dataCategoryId : c.dataCategoryId,
|
|
155
164
|
dataCategoryLabel: c.dataCategoryLabel,
|
|
@@ -163,43 +172,69 @@ export default defineComponent({
|
|
|
163
172
|
criticity: c.criticity,
|
|
164
173
|
parameters: c.parameters
|
|
165
174
|
}
|
|
166
|
-
})
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
175
|
+
})
|
|
176
|
+
.concat(scenarioOrganisationTypes.value.map(c => {
|
|
177
|
+
return {
|
|
178
|
+
id: c.id,
|
|
179
|
+
modelId: c.modelId,
|
|
180
|
+
dataCategoryId : c.dataCategoryId,
|
|
181
|
+
dataCategoryLabel: c.dataCategoryLabel,
|
|
182
|
+
scenarioId: c.scenarioId,
|
|
183
|
+
scope: c.scope,
|
|
184
|
+
label: c.label,
|
|
185
|
+
modelLabel: c.modelLabel,
|
|
186
|
+
code: c.code,
|
|
187
|
+
icon: c.icon,
|
|
188
|
+
tags: c.tags,
|
|
189
|
+
criticity: c.criticity,
|
|
190
|
+
parameters: c.parameters
|
|
191
|
+
}
|
|
192
|
+
}));
|
|
193
|
+
}
|
|
194
|
+
});
|
|
173
195
|
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
|
|
196
|
+
const routerLink = (item: any) => {
|
|
197
|
+
if(item.scope == ApplicationScope.OrganisationType){
|
|
198
|
+
return $r({ name: "scenario-organisation-type", params: { entityId: item.id } });
|
|
199
|
+
}
|
|
200
|
+
else
|
|
201
|
+
{
|
|
202
|
+
return $r({ name: "scenario-organisation", params: { entityId: item.id } });
|
|
203
|
+
}
|
|
204
|
+
};
|
|
177
205
|
|
|
178
|
-
|
|
179
|
-
|
|
206
|
+
const fetch = () =>{
|
|
207
|
+
if(props.scope == ApplicationScope.OrganisationType){
|
|
208
|
+
getManyScenarioOrganisationTypes(props.scenarioOrganisationTypeFilters)
|
|
209
|
+
}
|
|
210
|
+
else if(props.scope == ApplicationScope.Organisation){
|
|
211
|
+
getManyScenarioOrganisations(props.scenarioOrganisationFilters);
|
|
180
212
|
}
|
|
181
213
|
else{
|
|
182
|
-
|
|
214
|
+
getManyScenarioOrganisations(props.scenarioOrganisationFilters);
|
|
215
|
+
getManyScenarioOrganisationTypes(props.scenarioOrganisationTypeFilters)
|
|
183
216
|
}
|
|
184
217
|
}
|
|
185
|
-
|
|
186
|
-
watch(() => [props.scenarioOrganisationFilters,props.scenarioOrganisationTypeFilters], (next, previous) => {
|
|
218
|
+
|
|
219
|
+
watch(() => [props.scenarioOrganisationFilters,props.scenarioOrganisationTypeFilters, props.scope], (next, previous) => {
|
|
187
220
|
if ((!next && !previous) || !_.isEqual(next, previous)) {
|
|
188
221
|
fetch();
|
|
189
222
|
}
|
|
190
223
|
}, { immediate: true });
|
|
191
|
-
|
|
224
|
+
|
|
192
225
|
|
|
193
226
|
return {
|
|
194
227
|
fetchingScenarioOrganisationTypes,
|
|
195
228
|
fetchingScenarioOrganisations,
|
|
196
229
|
scenarioOrganisationTypes,
|
|
197
230
|
scenarioOrganisations,
|
|
231
|
+
headerAssociation,
|
|
232
|
+
ApplicationScope,
|
|
233
|
+
headersOptions,
|
|
234
|
+
AlertTools,
|
|
198
235
|
ColorEnum,
|
|
199
236
|
scenarios,
|
|
200
|
-
|
|
201
|
-
isSelected,
|
|
202
|
-
update
|
|
237
|
+
routerLink
|
|
203
238
|
};
|
|
204
239
|
}
|
|
205
240
|
});
|
package/components/lists/serviceAccountOrganisations/FSBaseServiceAccountOrganisationsList.vue
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
:items="serviceAccountOrganisations"
|
|
4
4
|
:itemTo="$props.itemTo"
|
|
5
5
|
:loading="fetchingServiceAccountOrganisations"
|
|
6
|
-
:
|
|
6
|
+
:selectable="$props.selectable"
|
|
7
7
|
:tableCode="$props.tableCode"
|
|
8
8
|
:modelValue="$props.modelValue"
|
|
9
9
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
height="32px"
|
|
34
34
|
width="32px"
|
|
35
35
|
:imageId="item.imageId"
|
|
36
|
+
:thumbnail="true"
|
|
36
37
|
/>
|
|
37
38
|
</template>
|
|
38
39
|
<template
|
|
@@ -40,7 +41,7 @@
|
|
|
40
41
|
>
|
|
41
42
|
<FSTagGroup
|
|
42
43
|
variant="slide"
|
|
43
|
-
:
|
|
44
|
+
:showRemove="false"
|
|
44
45
|
:tags="item.tags"
|
|
45
46
|
/>
|
|
46
47
|
</template>
|
|
@@ -63,11 +64,12 @@
|
|
|
63
64
|
</FSSpan>
|
|
64
65
|
</template>
|
|
65
66
|
<template
|
|
66
|
-
#item.tile="{ item, toggleSelect }"
|
|
67
|
+
#item.tile="{ index, item, toggleSelect }"
|
|
67
68
|
>
|
|
68
69
|
<FSServiceAccountOrganisationTileUI
|
|
70
|
+
:key="index"
|
|
69
71
|
:to="$props.itemTo && $props.itemTo(item)"
|
|
70
|
-
:
|
|
72
|
+
:selectable="$props.selectable"
|
|
71
73
|
:modelValue="isSelected(item.id)"
|
|
72
74
|
@update:modelValue="toggleSelect(item)"
|
|
73
75
|
v-bind="item"
|
|
@@ -104,8 +106,9 @@ export default defineComponent({
|
|
|
104
106
|
},
|
|
105
107
|
props: {
|
|
106
108
|
tableCode: {
|
|
107
|
-
type: String
|
|
108
|
-
required:
|
|
109
|
+
type: String as PropType<string | null>,
|
|
110
|
+
required: false,
|
|
111
|
+
default: null
|
|
109
112
|
},
|
|
110
113
|
serviceAccountOrganisationsFilters: {
|
|
111
114
|
type: Object as PropType<ServiceAccountOrganisationFilters | null>,
|
|
@@ -116,7 +119,7 @@ export default defineComponent({
|
|
|
116
119
|
type: Function as PropType<(item: ServiceAccountOrganisationInfos) => Partial<RouteLocation>>,
|
|
117
120
|
required: false
|
|
118
121
|
},
|
|
119
|
-
|
|
122
|
+
selectable: {
|
|
120
123
|
type: Boolean,
|
|
121
124
|
required: false,
|
|
122
125
|
default: true
|