@dative-gpi/foundation-core-components 1.0.139-widgethiddencode → 1.0.140-selectable
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 +0 -2
- package/components/autocompletes/FSAutocompleteDashboard.vue +0 -2
- package/components/autocompletes/FSAutocompleteRole.vue +0 -2
- package/components/customProperties/FSMetaField.vue +8 -8
- package/components/customProperties/FSMetaFormContent.vue +4 -3
- package/components/customProperties/helpers.ts +3 -113
- package/components/entities/FSEntityField.vue +3 -3
- package/components/explorers/FSBaseDevicesExplorer.vue +3 -3
- package/components/explorers/FSBaseFoldersExplorer.vue +1 -1
- package/components/lists/alerts/FSBaseAlertsList.vue +3 -3
- package/components/lists/authTokens/FSBaseAuthTokensList.vue +1 -0
- package/components/lists/chartOrganisationTypes/FSBaseChartOrganisationTypesList.vue +5 -5
- package/components/lists/chartOrganisations/FSBaseChartOrganisationsList.vue +5 -5
- package/components/lists/charts/FSBaseChartsList.vue +7 -9
- package/components/lists/dashboardOrganisationTypes/FSBaseDashboardOrganisationTypesList.vue +18 -1
- package/components/lists/dashboards/FSBaseDashboardsList.vue +20 -2
- package/components/lists/dashboards/FSSimpleDashboardsList.vue +13 -3
- package/components/lists/deviceOrganisations/FSBaseDeviceOrganisationsList.vue +4 -3
- package/components/lists/folders/FSBaseFoldersList.vue +1 -1
- package/components/lists/groups/FSBaseGroupsList.vue +4 -4
- package/components/lists/locations/FSBaseLocationsList.vue +3 -3
- package/components/lists/models/FSBaseModelsList.vue +2 -2
- package/components/lists/roleOrganisationTypes/FSBaseRoleOrganisationTypesList.vue +3 -3
- package/components/lists/roleOrganisations/FSBaseRoleOrganisationsList.vue +3 -3
- package/components/lists/scenarioOrganisationTypes/FSBaseScenarioOrganisationTypesList.vue +3 -3
- package/components/lists/scenarioOrganisations/FSBaseScenarioOrganisationsList.vue +3 -3
- package/components/lists/scenarios/FSBaseScenariosList.vue +1 -1
- package/components/lists/serviceAccountOrganisations/FSBaseServiceAccountOrganisationsList.vue +4 -4
- package/components/lists/serviceAccountRoleOrganisations/FSBaseServiceAccountRoleOrganisationsList.vue +3 -3
- package/components/lists/userOrganisations/FSBaseUserOrganisationsList.vue +4 -4
- 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 +3 -3
- package/components/tiles/FSGroupTile.vue +3 -3
- package/components/tiles/FSLocationTile.vue +4 -3
- package/components/tiles/FSServiceAccountOrganisationTile.vue +3 -3
- package/components/tiles/FSUserOrganisationTile.vue +3 -3
- package/package.json +7 -7
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
<FSChip
|
|
26
26
|
:color="chartOriginColor(item.type)"
|
|
27
27
|
:label="chartOriginLabel(item.type)"
|
|
28
|
-
:editable="false"
|
|
29
28
|
/>
|
|
30
29
|
</template>
|
|
31
30
|
<template
|
|
@@ -46,7 +45,6 @@
|
|
|
46
45
|
<FSChip
|
|
47
46
|
:color="chartOriginColor(props.item.type)"
|
|
48
47
|
:label="chartOriginLabel(props.item.type)"
|
|
49
|
-
:editable="false"
|
|
50
48
|
/>
|
|
51
49
|
</template>
|
|
52
50
|
</FSButton>
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
<FSChip
|
|
26
26
|
:color="dashboardTypeColor(item.type)"
|
|
27
27
|
:label="dashboardTypeLabel(item.type)"
|
|
28
|
-
:editable="false"
|
|
29
28
|
/>
|
|
30
29
|
</template>
|
|
31
30
|
<template
|
|
@@ -46,7 +45,6 @@
|
|
|
46
45
|
<FSChip
|
|
47
46
|
:color="dashboardTypeColor(props.item.type)"
|
|
48
47
|
:label="dashboardTypeLabel(props.item.type)"
|
|
49
|
-
:editable="false"
|
|
50
48
|
/>
|
|
51
49
|
</template>
|
|
52
50
|
</FSButton>
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
<FSChip
|
|
26
26
|
:color="roleTypeColor(item.type)"
|
|
27
27
|
:label="roleTypeLabel(item.type)"
|
|
28
|
-
:editable="false"
|
|
29
28
|
/>
|
|
30
29
|
</template>
|
|
31
30
|
<template
|
|
@@ -46,7 +45,6 @@
|
|
|
46
45
|
<FSChip
|
|
47
46
|
:color="roleTypeColor(props.item.type)"
|
|
48
47
|
:label="roleTypeLabel(props.item.type)"
|
|
49
|
-
:editable="false"
|
|
50
48
|
/>
|
|
51
49
|
</template>
|
|
52
50
|
</FSButton>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSSelectField
|
|
3
3
|
v-if="$props.customProperty.useOnlyAllowedValues"
|
|
4
|
-
:
|
|
4
|
+
:disabled="$props.disabled"
|
|
5
5
|
:itemTitle="itemTitle"
|
|
6
6
|
:label="$props.label"
|
|
7
7
|
:class="classes"
|
|
@@ -30,35 +30,35 @@
|
|
|
30
30
|
>
|
|
31
31
|
<FSNumberField
|
|
32
32
|
v-if="$props.customProperty.dataType === PropertyDataType.Number"
|
|
33
|
-
:
|
|
33
|
+
:disabled="$props.disabled"
|
|
34
34
|
:label="$props.label"
|
|
35
35
|
:modelValue="asNumber()"
|
|
36
36
|
@update:modelValue="onUpdate"
|
|
37
37
|
/>
|
|
38
38
|
<FSSwitch
|
|
39
39
|
v-else-if="$props.customProperty.dataType === PropertyDataType.Boolean"
|
|
40
|
-
:
|
|
40
|
+
:disabled="$props.disabled"
|
|
41
41
|
:label="$props.label"
|
|
42
42
|
:modelValue="asBoolean()"
|
|
43
43
|
@update:modelValue="onUpdate"
|
|
44
44
|
/>
|
|
45
45
|
<FSTextField
|
|
46
46
|
v-else-if="$props.customProperty.dataType === PropertyDataType.String"
|
|
47
|
-
:
|
|
47
|
+
:disabled="$props.disabled"
|
|
48
48
|
:label="$props.label"
|
|
49
49
|
:modelValue="$props.modelValue"
|
|
50
50
|
@update:modelValue="onUpdate"
|
|
51
51
|
/>
|
|
52
52
|
<FSDateTimeField
|
|
53
53
|
v-else-if="$props.customProperty.dataType === PropertyDataType.DateTime"
|
|
54
|
-
:
|
|
54
|
+
:disabled="$props.disabled"
|
|
55
55
|
:label="$props.label"
|
|
56
56
|
:modelValue="asNumber()"
|
|
57
57
|
@update:modelValue="onUpdate"
|
|
58
58
|
/>
|
|
59
59
|
<FSIconField
|
|
60
60
|
v-else-if="$props.customProperty.dataType === PropertyDataType.Icon"
|
|
61
|
-
:
|
|
61
|
+
:disabled="$props.disabled"
|
|
62
62
|
:label="$props.label"
|
|
63
63
|
:modelValue="modelValue"
|
|
64
64
|
@update:modelValue="onUpdate"
|
|
@@ -108,10 +108,10 @@ export default defineComponent({
|
|
|
108
108
|
required: false,
|
|
109
109
|
default: null
|
|
110
110
|
},
|
|
111
|
-
|
|
111
|
+
disabled: {
|
|
112
112
|
type: Boolean,
|
|
113
113
|
required: false,
|
|
114
|
-
default:
|
|
114
|
+
default: false
|
|
115
115
|
}
|
|
116
116
|
},
|
|
117
117
|
emits: ["update:modelValue"],
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<FSMetaField
|
|
18
18
|
v-for="(property, index) in properties"
|
|
19
19
|
:customProperty="property"
|
|
20
|
-
:
|
|
20
|
+
:disabled="disabled"
|
|
21
21
|
:key="index"
|
|
22
22
|
:modelValue="modelValue[property.code]"
|
|
23
23
|
@update:modelValue="(event) => $emit('update:modelValue', { ...modelValue, [property.code]: event})"
|
|
@@ -50,12 +50,13 @@ export default defineComponent({
|
|
|
50
50
|
type: Object as PropType<{ [key: string]: string }>,
|
|
51
51
|
required: true
|
|
52
52
|
},
|
|
53
|
-
|
|
53
|
+
disabled: {
|
|
54
54
|
type: Boolean,
|
|
55
55
|
required: false,
|
|
56
|
-
default:
|
|
56
|
+
default: false
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
|
+
emits: ["update:modelValue"],
|
|
59
60
|
setup(props) {
|
|
60
61
|
const categories = props.customProperties.reduce((acc, curr) => {
|
|
61
62
|
if (acc[curr.categoryLabel] === undefined) {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useDateExpression } from "@dative-gpi/foundation-shared-services/composables";
|
|
2
2
|
import { FilterType, PropertyDataType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
3
3
|
|
|
4
4
|
import { type CustomPropertyInfos, } from "../../../foundation-core-domain/models";
|
|
5
5
|
|
|
6
|
-
const {
|
|
6
|
+
const { convert: convertExpressionToEpoch } = useDateExpression();
|
|
7
7
|
|
|
8
8
|
export const getColor = (property: CustomPropertyInfos, value: string): string | undefined => {
|
|
9
9
|
if (property.colorful) {
|
|
10
10
|
for (const color of [...property.colorMap].sort((a, b) => b.priority - a.priority)) {
|
|
11
11
|
let filterValues = [...color.filterValues];
|
|
12
12
|
if ([PropertyDataType.DateTime].includes(property.dataType)) {
|
|
13
|
-
filterValues = filterValues.map(fv =>
|
|
13
|
+
filterValues = filterValues.map(fv => convertExpressionToEpoch(fv).toString());
|
|
14
14
|
}
|
|
15
15
|
switch (color.filterType) {
|
|
16
16
|
case FilterType.None: return color.color;
|
|
@@ -80,113 +80,3 @@ export const getColor = (property: CustomPropertyInfos, value: string): string |
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
|
|
84
|
-
const getEpoch = (expression: string): string => {
|
|
85
|
-
if (!isNaN(parseInt(expression))) {
|
|
86
|
-
return expression;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
const date = new Date();
|
|
90
|
-
if (expression.startsWith("now")) {
|
|
91
|
-
expression = expression.substring(3).replace(/\s/g, "");
|
|
92
|
-
}
|
|
93
|
-
else {
|
|
94
|
-
return (date.getTime()).toString();
|
|
95
|
-
}
|
|
96
|
-
let match = /^(?:(?:([-+])(\d*))?(\w+))?(?:\/(\w))?/g.exec(expression);
|
|
97
|
-
while (match != null && (match[0] != null && match[0].length > 0)) {
|
|
98
|
-
if (match[1] != null && match[3] != null) {
|
|
99
|
-
if (!["-", "+"].includes(match[1]) || isNaN(parseInt(match[2])) || !["s", "m", "h", "d", "w", "M", "y"].includes(match[3])) {
|
|
100
|
-
return (date.getTime()).toString();
|
|
101
|
-
}
|
|
102
|
-
const offset = match[1] == "-" ? -1 * parseInt(match[2]): 1* parseInt(match[2]);
|
|
103
|
-
switch (match[3]) {
|
|
104
|
-
case "s": {
|
|
105
|
-
date.setSeconds(date.getSeconds() + offset);
|
|
106
|
-
break;
|
|
107
|
-
}
|
|
108
|
-
case "m": {
|
|
109
|
-
date.setMinutes(date.getMinutes() + offset);
|
|
110
|
-
break;
|
|
111
|
-
}
|
|
112
|
-
case "h": {
|
|
113
|
-
date.setHours(date.getHours() + offset);
|
|
114
|
-
break;
|
|
115
|
-
}
|
|
116
|
-
case "d": {
|
|
117
|
-
date.setDate(date.getDate() + offset);
|
|
118
|
-
break;
|
|
119
|
-
}
|
|
120
|
-
case "w": {
|
|
121
|
-
date.setDate(date.getDate() + offset * 7);
|
|
122
|
-
break;
|
|
123
|
-
}
|
|
124
|
-
case "M": {
|
|
125
|
-
date.setMonth(date.getMonth() + offset);
|
|
126
|
-
break;
|
|
127
|
-
}
|
|
128
|
-
case "y": {
|
|
129
|
-
date.setFullYear(date.getFullYear() + offset);
|
|
130
|
-
break;
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
if (match[4] != null) {
|
|
135
|
-
if (!["s", "m", "h", "d", "w", "M", "y"].includes(match[4])) {
|
|
136
|
-
return (date.getTime()).toString();
|
|
137
|
-
}
|
|
138
|
-
switch (match[4]) {
|
|
139
|
-
case "s": {
|
|
140
|
-
date.setMilliseconds(0);
|
|
141
|
-
break;
|
|
142
|
-
}
|
|
143
|
-
case "m": {
|
|
144
|
-
date.setMilliseconds(0);
|
|
145
|
-
date.setSeconds(0);
|
|
146
|
-
break;
|
|
147
|
-
}
|
|
148
|
-
case "h": {
|
|
149
|
-
date.setMilliseconds(0);
|
|
150
|
-
date.setSeconds(0);
|
|
151
|
-
date.setMinutes(0);
|
|
152
|
-
break;
|
|
153
|
-
}
|
|
154
|
-
case "d": {
|
|
155
|
-
date.setMilliseconds(0);
|
|
156
|
-
date.setSeconds(0);
|
|
157
|
-
date.setMinutes(0);
|
|
158
|
-
date.setHours(0);
|
|
159
|
-
break;
|
|
160
|
-
}
|
|
161
|
-
case "w": {
|
|
162
|
-
date.setMilliseconds(0);
|
|
163
|
-
date.setSeconds(0);
|
|
164
|
-
date.setMinutes(0);
|
|
165
|
-
date.setHours(0);
|
|
166
|
-
date.setDate(date.getDate() - date.getDay() + (date.getDay() === 0 ? -6 : 1));
|
|
167
|
-
break;
|
|
168
|
-
}
|
|
169
|
-
case "M": {
|
|
170
|
-
date.setMilliseconds(0);
|
|
171
|
-
date.setSeconds(0);
|
|
172
|
-
date.setMinutes(0);
|
|
173
|
-
date.setHours(0);
|
|
174
|
-
date.setDate(1);
|
|
175
|
-
break;
|
|
176
|
-
}
|
|
177
|
-
case "y": {
|
|
178
|
-
date.setMilliseconds(0);
|
|
179
|
-
date.setSeconds(0);
|
|
180
|
-
date.setMinutes(0);
|
|
181
|
-
date.setHours(0);
|
|
182
|
-
date.setDate(1);
|
|
183
|
-
date.setMonth(0);
|
|
184
|
-
break;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
expression = expression.substring(match[0].length);
|
|
189
|
-
match = /(?:(?:([-+])(\d*))?(\w+))?(?:\/(\w))?/g.exec(expression);
|
|
190
|
-
}
|
|
191
|
-
return (date.getTime() + getOffsetDifference()).toString();
|
|
192
|
-
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
:description="$props.description"
|
|
4
4
|
:hideHeader="$props.hideHeader"
|
|
5
5
|
:required="$props.required"
|
|
6
|
-
:
|
|
6
|
+
:disabled="$props.disabled"
|
|
7
7
|
:label="$props.label"
|
|
8
8
|
:messages="$props.messages"
|
|
9
9
|
:entityType="$props.entityType"
|
|
@@ -96,10 +96,10 @@ export default defineComponent({
|
|
|
96
96
|
required: false,
|
|
97
97
|
default: null
|
|
98
98
|
},
|
|
99
|
-
|
|
99
|
+
disabled: {
|
|
100
100
|
type: Boolean,
|
|
101
101
|
required: false,
|
|
102
|
-
default:
|
|
102
|
+
default: false
|
|
103
103
|
},
|
|
104
104
|
entityType: {
|
|
105
105
|
type: Number as PropType<EntityType>,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
:loading="fetchingDeviceExplorerElements"
|
|
5
5
|
:singleSelect="$props.singleSelect"
|
|
6
6
|
:items="deviceExplorerElements"
|
|
7
|
-
:showSelect="$props.
|
|
7
|
+
:showSelect="$props.selectable"
|
|
8
8
|
:tableCode="$props.tableCode"
|
|
9
9
|
:itemTo="$props.itemTo"
|
|
10
10
|
:noSearch="$props.recursiveSearch"
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
>
|
|
53
53
|
<FSTagGroup
|
|
54
54
|
variant="slide"
|
|
55
|
-
:
|
|
55
|
+
:disabled="true"
|
|
56
56
|
:tags="item.tags"
|
|
57
57
|
/>
|
|
58
58
|
</template>
|
|
@@ -221,7 +221,7 @@ export default defineComponent({
|
|
|
221
221
|
required: false,
|
|
222
222
|
default: null
|
|
223
223
|
},
|
|
224
|
-
|
|
224
|
+
selectable: {
|
|
225
225
|
type: Boolean,
|
|
226
226
|
required: false,
|
|
227
227
|
default: true
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
>
|
|
51
51
|
<FSTagGroup
|
|
52
52
|
variant="slide"
|
|
53
|
-
:
|
|
53
|
+
:showRemove="false"
|
|
54
54
|
:tags="item.tags"
|
|
55
55
|
/>
|
|
56
56
|
</template>
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
<FSTagGroup
|
|
61
61
|
variant="slide"
|
|
62
62
|
:tags="item.groupByValues.map((gbv: any) => `${gbv.label}: ${gbv.value}`)"
|
|
63
|
-
:
|
|
63
|
+
:showRemove="false"
|
|
64
64
|
/>
|
|
65
65
|
</template>
|
|
66
66
|
<template
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
<FSTagGroup
|
|
121
121
|
variant="slide"
|
|
122
122
|
:tags="item.history.map((h: any) => AlertTools.statusLabel(h.status))"
|
|
123
|
-
:
|
|
123
|
+
:showRemove="false"
|
|
124
124
|
/>
|
|
125
125
|
</template>
|
|
126
126
|
<template
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
:headersOptions="headersOptions"
|
|
8
8
|
:tableCode="$props.tableCode"
|
|
9
9
|
:modelValue="$props.modelValue"
|
|
10
|
-
:showSelect="$props.
|
|
10
|
+
:showSelect="$props.selectable"
|
|
11
11
|
:singleSelect="$props.singleSelect"
|
|
12
12
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
13
13
|
v-bind="$attrs"
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
>
|
|
52
52
|
<FSTagGroup
|
|
53
53
|
variant="slide"
|
|
54
|
-
:
|
|
54
|
+
:disabled="true"
|
|
55
55
|
:tags="item.tags"
|
|
56
56
|
/>
|
|
57
57
|
</template>
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
#item.modelsLabels="{ item }"
|
|
74
74
|
>
|
|
75
75
|
<FSTagGroup
|
|
76
|
-
:
|
|
76
|
+
:disabled="true"
|
|
77
77
|
:tags="item.modelsLabels.map((d: any) => d.label)"
|
|
78
78
|
/>
|
|
79
79
|
</template>
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
:label="item.label"
|
|
85
85
|
:category-label="item.chartCategoryLabel"
|
|
86
86
|
:singleSelect="$props.singleSelect"
|
|
87
|
-
:
|
|
87
|
+
:selectable="$props.selectable"
|
|
88
88
|
:icon="item.icon"
|
|
89
89
|
:imageId="item.imageId"
|
|
90
90
|
:type="item.chartType"
|
|
@@ -149,7 +149,7 @@ export default defineComponent({
|
|
|
149
149
|
default: () => [],
|
|
150
150
|
required: false
|
|
151
151
|
},
|
|
152
|
-
|
|
152
|
+
selectable: {
|
|
153
153
|
type: Boolean,
|
|
154
154
|
required: false,
|
|
155
155
|
default: true
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
:tableCode="$props.tableCode"
|
|
9
9
|
:modelValue="$props.modelValue"
|
|
10
10
|
:singleSelect="$props.singleSelect"
|
|
11
|
-
:showSelect="$props.
|
|
11
|
+
:showSelect="$props.selectable"
|
|
12
12
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
13
13
|
v-bind="$attrs"
|
|
14
14
|
>
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
>
|
|
52
52
|
<FSTagGroup
|
|
53
53
|
variant="slide"
|
|
54
|
-
:
|
|
54
|
+
:disabled="true"
|
|
55
55
|
:tags="item.tags"
|
|
56
56
|
/>
|
|
57
57
|
</template>
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
#item.modelsLabels="{ item }"
|
|
60
60
|
>
|
|
61
61
|
<FSTagGroup
|
|
62
|
-
:
|
|
62
|
+
:disabled="true"
|
|
63
63
|
:tags="item.modelsLabels.map((d: any) => d.label)"
|
|
64
64
|
/>
|
|
65
65
|
</template>
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
<FSChartTileUI
|
|
84
84
|
:label="item.label"
|
|
85
85
|
:singleSelect="$props.singleSelect"
|
|
86
|
-
:
|
|
86
|
+
:selectable="$props.selectable"
|
|
87
87
|
:categoryLabel="item.chartCategoryLabel"
|
|
88
88
|
:icon="item.icon"
|
|
89
89
|
:imageId="item.imageId"
|
|
@@ -149,7 +149,7 @@ export default defineComponent({
|
|
|
149
149
|
default: () => [],
|
|
150
150
|
required: false
|
|
151
151
|
},
|
|
152
|
-
|
|
152
|
+
selectable: {
|
|
153
153
|
type: Boolean,
|
|
154
154
|
required: false,
|
|
155
155
|
default: true
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
:loading="fetchingChartOrganisationTypes || fetchingChartOrganisations"
|
|
5
5
|
:headersOptions="headersOptions"
|
|
6
6
|
:items="charts"
|
|
7
|
-
:showSelect="$props.
|
|
7
|
+
:showSelect="$props.selectable"
|
|
8
8
|
:singleSelect="$props.singleSelect"
|
|
9
9
|
:tableCode="$props.tableCode"
|
|
10
10
|
:modelValue="$props.modelValue"
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
>
|
|
51
51
|
<FSTagGroup
|
|
52
52
|
variant="slide"
|
|
53
|
-
:
|
|
53
|
+
:disabled="true"
|
|
54
54
|
:tags="item.tags"
|
|
55
55
|
/>
|
|
56
56
|
</template>
|
|
@@ -72,12 +72,12 @@
|
|
|
72
72
|
#item.modelsLabels="{ item }"
|
|
73
73
|
>
|
|
74
74
|
<FSTagGroup
|
|
75
|
-
:
|
|
75
|
+
:disabled="true"
|
|
76
76
|
:tags="item.modelsLabels.map((d: any) => d.label)"
|
|
77
77
|
/>
|
|
78
78
|
</template>
|
|
79
79
|
<template
|
|
80
|
-
#item.tile="{ item
|
|
80
|
+
#item.tile="{ item }"
|
|
81
81
|
>
|
|
82
82
|
<FSChartTileUI
|
|
83
83
|
:label="item.label"
|
|
@@ -86,11 +86,9 @@
|
|
|
86
86
|
:imageId="item.imageId"
|
|
87
87
|
:type="item.chartType"
|
|
88
88
|
:singleSelect="$props.singleSelect"
|
|
89
|
-
:
|
|
90
|
-
:activeColor="ColorEnum.Primary"
|
|
89
|
+
:selectable="$props.selectable"
|
|
91
90
|
:modelValue="isSelected(item.id)"
|
|
92
|
-
@update:modelValue="
|
|
93
|
-
@click="update(item.id)"
|
|
91
|
+
@update:modelValue="update(item.id)"
|
|
94
92
|
/>
|
|
95
93
|
</template>
|
|
96
94
|
</FSDataTable>
|
|
@@ -147,7 +145,7 @@ export default defineComponent({
|
|
|
147
145
|
default: () => [],
|
|
148
146
|
required: false
|
|
149
147
|
},
|
|
150
|
-
|
|
148
|
+
selectable: {
|
|
151
149
|
type: Boolean,
|
|
152
150
|
required: false,
|
|
153
151
|
default: true
|
package/components/lists/dashboardOrganisationTypes/FSBaseDashboardOrganisationTypesList.vue
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
:itemTo="$props.itemTo"
|
|
7
7
|
:tableCode="$props.tableCode"
|
|
8
8
|
:modelValue="$props.modelValue"
|
|
9
|
+
:showSelect="$props.selectable"
|
|
10
|
+
:singleSelect="$props.singleSelect"
|
|
9
11
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
10
12
|
v-bind="$attrs"
|
|
11
13
|
>
|
|
@@ -59,7 +61,7 @@
|
|
|
59
61
|
>
|
|
60
62
|
<FSTagGroup
|
|
61
63
|
variant="slide"
|
|
62
|
-
:
|
|
64
|
+
:showRemove="false"
|
|
63
65
|
:tags="item.tags"
|
|
64
66
|
/>
|
|
65
67
|
</template>
|
|
@@ -68,6 +70,8 @@
|
|
|
68
70
|
>
|
|
69
71
|
<FSDashboardOrganisationTypeTileUI
|
|
70
72
|
:bottomColor="item.colors"
|
|
73
|
+
:selectable="$props.selectable"
|
|
74
|
+
:singleSelect="$props.singleSelect"
|
|
71
75
|
:to="$props.itemTo && $props.itemTo(item)"
|
|
72
76
|
:modelValue="isSelected(item.id)"
|
|
73
77
|
@update:modelValue="toggleSelect(item)"
|
|
@@ -125,8 +129,21 @@ export default defineComponent({
|
|
|
125
129
|
type: Array as PropType<string[]>,
|
|
126
130
|
required: false,
|
|
127
131
|
default: () => []
|
|
132
|
+
},
|
|
133
|
+
selectable: {
|
|
134
|
+
type: Boolean,
|
|
135
|
+
required: false,
|
|
136
|
+
default: true
|
|
137
|
+
},
|
|
138
|
+
singleSelect: {
|
|
139
|
+
type: Boolean,
|
|
140
|
+
required: false,
|
|
141
|
+
default: false
|
|
128
142
|
}
|
|
129
143
|
},
|
|
144
|
+
emits: [
|
|
145
|
+
"update:modelValue"
|
|
146
|
+
],
|
|
130
147
|
setup(props) {
|
|
131
148
|
const { getMany: getDashboardOrganisationTypes, fetching: fetchingDashboardOrganisationTypes, entities: dashboardOrganisationTypes } = useDashboardOrganisationTypes();
|
|
132
149
|
const { fetch: fetchUserOrganisation, entity: userOrganisation } = useCurrentUserOrganisation();
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
:itemTo="$props.itemTo"
|
|
6
6
|
:loading="fetchingDashboardOrganisationTypes || fetchingDashboardOrganisations || fetchingDashboardShallows"
|
|
7
7
|
:tableCode="$props.tableCode"
|
|
8
|
+
:showSelect="$props.selectable"
|
|
9
|
+
:singleSelect="$props.singleSelect"
|
|
8
10
|
:modelValue="selecteds"
|
|
9
11
|
@update:modelValue="onSelect"
|
|
10
12
|
v-bind="$attrs"
|
|
@@ -44,7 +46,7 @@
|
|
|
44
46
|
>
|
|
45
47
|
<FSTagGroup
|
|
46
48
|
variant="slide"
|
|
47
|
-
:
|
|
49
|
+
:showRemove="false"
|
|
48
50
|
:tags="item.tags"
|
|
49
51
|
/>
|
|
50
52
|
</template>
|
|
@@ -54,6 +56,8 @@
|
|
|
54
56
|
<FSDashboardOrganisationTypeTileUI
|
|
55
57
|
v-if="item.dashboardType == DashboardType.OrganisationType"
|
|
56
58
|
:bottomColor="item.colors"
|
|
59
|
+
:selectable="$props.selectable"
|
|
60
|
+
:singleSelect="$props.singleSelect"
|
|
57
61
|
:to="$props.itemTo && $props.itemTo(item)"
|
|
58
62
|
:modelValue="isSelected(item.id)"
|
|
59
63
|
@update:modelValue="toggleSelect(item)"
|
|
@@ -62,6 +66,8 @@
|
|
|
62
66
|
<FSDashboardOrganisationTileUI
|
|
63
67
|
v-if="item.dashboardType == DashboardType.Organisation"
|
|
64
68
|
:bottomColor="item.colors"
|
|
69
|
+
:selectable="$props.selectable"
|
|
70
|
+
:singleSelect="$props.singleSelect"
|
|
65
71
|
:to="$props.itemTo && $props.itemTo(item)"
|
|
66
72
|
:modelValue="isSelected(item.id)"
|
|
67
73
|
@update:modelValue="toggleSelect(item)"
|
|
@@ -70,6 +76,8 @@
|
|
|
70
76
|
<FSDashboardShallowTileUI
|
|
71
77
|
v-if="item.dashboardType == DashboardType.Shallow"
|
|
72
78
|
:bottomColor="item.colors"
|
|
79
|
+
:selectable="$props.selectable"
|
|
80
|
+
:singleSelect="$props.singleSelect"
|
|
73
81
|
:modelValue="isSelected(item.id)"
|
|
74
82
|
@update:modelValue="toggleSelect(item)"
|
|
75
83
|
:to="$props.itemTo && $props.itemTo(item)"
|
|
@@ -138,7 +146,17 @@ export default defineComponent({
|
|
|
138
146
|
type: Array as PropType<string[]>,
|
|
139
147
|
default: () => [],
|
|
140
148
|
required: false
|
|
141
|
-
}
|
|
149
|
+
},
|
|
150
|
+
selectable: {
|
|
151
|
+
type: Boolean,
|
|
152
|
+
required: false,
|
|
153
|
+
default: true
|
|
154
|
+
},
|
|
155
|
+
singleSelect: {
|
|
156
|
+
type: Boolean,
|
|
157
|
+
required: false,
|
|
158
|
+
default: false
|
|
159
|
+
},
|
|
142
160
|
},
|
|
143
161
|
emits: ["update", "update:modelValue", "update:type"],
|
|
144
162
|
setup(props, { emit }) {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import { defineComponent, type PropType, watch, computed } from "vue";
|
|
11
11
|
|
|
12
12
|
import type { DashboardOrganisationFilters, DashboardOrganisationTypeFilters } from "@dative-gpi/foundation-core-domain/models";
|
|
13
|
-
import { useDashboardOrganisations, useDashboardOrganisationTypes } from "@dative-gpi/foundation-core-services/composables";
|
|
13
|
+
import { useDashboardOrganisations, useDashboardOrganisationTypes, useDashboardShallows } from "@dative-gpi/foundation-core-services/composables";
|
|
14
14
|
|
|
15
15
|
import FSSimpleList from "@dative-gpi/foundation-shared-components/components/lists/FSSimpleList.vue";
|
|
16
16
|
|
|
@@ -29,6 +29,11 @@ export default defineComponent({
|
|
|
29
29
|
type: Object as PropType<DashboardOrganisationTypeFilters>,
|
|
30
30
|
required: false,
|
|
31
31
|
default: () => ({})
|
|
32
|
+
},
|
|
33
|
+
dashboardShallowFilters: {
|
|
34
|
+
type: Object as PropType<DashboardOrganisationTypeFilters>,
|
|
35
|
+
required: false,
|
|
36
|
+
default: () => ({})
|
|
32
37
|
}
|
|
33
38
|
},
|
|
34
39
|
setup(props){
|
|
@@ -38,17 +43,22 @@ export default defineComponent({
|
|
|
38
43
|
const { entities: dashboardOrganisationTypes,
|
|
39
44
|
getMany: getManyDashboardOrganisationTypes,
|
|
40
45
|
fetching: fetchingDashboardOrganisationTypes } = useDashboardOrganisationTypes();
|
|
46
|
+
const { entities: dashboardShallows,
|
|
47
|
+
getMany: getManyDashboardShallows,
|
|
48
|
+
fetching: fetchingDashboardShallows } = useDashboardShallows();
|
|
41
49
|
|
|
42
50
|
const fetching = computed(() => fetchingDashboardOrganisations.value
|
|
43
|
-
|| fetchingDashboardOrganisationTypes.value
|
|
51
|
+
|| fetchingDashboardOrganisationTypes.value
|
|
52
|
+
|| fetchingDashboardShallows.value);
|
|
44
53
|
|
|
45
54
|
const dashboards = computed(() => {
|
|
46
|
-
return [...dashboardOrganisations.value, ...dashboardOrganisationTypes.value];
|
|
55
|
+
return [...dashboardOrganisations.value, ...dashboardOrganisationTypes.value, ...dashboardShallows.value];
|
|
47
56
|
});
|
|
48
57
|
|
|
49
58
|
const fetch = () => {
|
|
50
59
|
getManyDashboardOrganisations(props.dashboardOrganisationFilters);
|
|
51
60
|
getManyDashboardOrganisationTypes(props.dashboardOrganisationTypeFilters);
|
|
61
|
+
getManyDashboardShallows(props.dashboardShallowFilters);
|
|
52
62
|
}
|
|
53
63
|
|
|
54
64
|
watch(() => [props.dashboardOrganisationFilters, props.dashboardOrganisationTypeFilters], fetch, { immediate: true });
|