@dative-gpi/foundation-core-components 1.0.65 → 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 +75 -14
- 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,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSAutocompleteField
|
|
3
|
+
:label="$props.label ?? $tr('ui.common.chart', 'Chart')"
|
|
3
4
|
:toggleSet="!$props.toggleSetDisabled && toggleSet"
|
|
4
5
|
:multiple="$props.multiple"
|
|
5
6
|
:placeholder="placeholder"
|
|
@@ -24,7 +25,6 @@
|
|
|
24
25
|
<FSChip
|
|
25
26
|
:color="chartOriginColor(item.type)"
|
|
26
27
|
:label="chartOriginLabel(item.type)"
|
|
27
|
-
:editable="false"
|
|
28
28
|
/>
|
|
29
29
|
</template>
|
|
30
30
|
<template
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
<FSChip
|
|
46
46
|
:color="chartOriginColor(props.item.type)"
|
|
47
47
|
:label="chartOriginLabel(props.item.type)"
|
|
48
|
-
:editable="false"
|
|
49
48
|
/>
|
|
50
49
|
</template>
|
|
51
50
|
</FSButton>
|
|
@@ -58,10 +57,9 @@ import { computed, defineComponent, type PropType } from "vue";
|
|
|
58
57
|
|
|
59
58
|
import { type ChartOrganisationFilters, type ChartOrganisationTypeFilters } from "@dative-gpi/foundation-core-domain/models";
|
|
60
59
|
import { useChartOrganisations, useChartOrganisationTypes } from "@dative-gpi/foundation-core-services/composables";
|
|
60
|
+
import { chartOriginColor, chartOriginLabel } from "@dative-gpi/foundation-shared-components/tools";
|
|
61
61
|
import { useAutocomplete } from "@dative-gpi/foundation-shared-components/composables";
|
|
62
62
|
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui";
|
|
63
|
-
|
|
64
|
-
import { chartOriginColor, chartOriginLabel } from "../../utils";
|
|
65
63
|
import { ChartOrigin } from "@dative-gpi/foundation-shared-domain/enums";
|
|
66
64
|
|
|
67
65
|
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
@@ -117,9 +115,14 @@ export default defineComponent({
|
|
|
117
115
|
type: Boolean,
|
|
118
116
|
required: false,
|
|
119
117
|
default: false
|
|
118
|
+
},
|
|
119
|
+
label: {
|
|
120
|
+
type: String as PropType<string | null>,
|
|
121
|
+
required: false,
|
|
122
|
+
default: null
|
|
120
123
|
}
|
|
121
124
|
},
|
|
122
|
-
emits: ["update:modelValue", "update:type"],
|
|
125
|
+
emits: ["update", "update:modelValue", "update:type"],
|
|
123
126
|
setup(props, { emit }) {
|
|
124
127
|
const { getMany: getManyChartOrganisationTypes, fetching: fetchingChartOrganisationTypes, entities: chartOrganisationTypes } = useChartOrganisationTypes();
|
|
125
128
|
const { getMany: getManyChartOrganisations, fetching: fetchingChartOrganisations, entities: chartOrganisations } = useChartOrganisations();
|
|
@@ -145,19 +148,23 @@ export default defineComponent({
|
|
|
145
148
|
|
|
146
149
|
const placeholder = computed((): string | null => {
|
|
147
150
|
if (props.multiple && props.modelValue) {
|
|
148
|
-
return $tr("
|
|
151
|
+
return $tr("autocomplete.chart.placeholder", "{0} chart(s) selected", props.modelValue.length);
|
|
149
152
|
}
|
|
150
153
|
return null;
|
|
151
154
|
});
|
|
152
155
|
|
|
153
156
|
const update = (value: Chart[] | Chart | null) => {
|
|
154
157
|
if (Array.isArray(value)) {
|
|
155
|
-
|
|
156
|
-
|
|
158
|
+
const newModelValue = value.map(v => v.id);
|
|
159
|
+
const newType = value.map(v => v.type);
|
|
160
|
+
emit("update:modelValue", newModelValue);
|
|
161
|
+
emit("update:type", newType);
|
|
162
|
+
emit("update", { modelValue: newModelValue, type: newType });
|
|
157
163
|
}
|
|
158
164
|
else {
|
|
159
165
|
emit("update:modelValue", value?.id);
|
|
160
166
|
emit("update:type", value?.type);
|
|
167
|
+
emit("update", { modelValue: value?.id, type: value?.type });
|
|
161
168
|
}
|
|
162
169
|
};
|
|
163
170
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSAutocompleteField
|
|
3
|
+
:label="$props.label ?? $tr('ui.common.dashboard', 'Dashboard')"
|
|
3
4
|
:toggleSet="!$props.toggleSetDisabled && toggleSet"
|
|
4
5
|
:multiple="$props.multiple"
|
|
5
6
|
:placeholder="placeholder"
|
|
@@ -24,7 +25,6 @@
|
|
|
24
25
|
<FSChip
|
|
25
26
|
:color="dashboardTypeColor(item.type)"
|
|
26
27
|
:label="dashboardTypeLabel(item.type)"
|
|
27
|
-
:editable="false"
|
|
28
28
|
/>
|
|
29
29
|
</template>
|
|
30
30
|
<template
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
<FSChip
|
|
46
46
|
:color="dashboardTypeColor(props.item.type)"
|
|
47
47
|
:label="dashboardTypeLabel(props.item.type)"
|
|
48
|
-
:editable="false"
|
|
49
48
|
/>
|
|
50
49
|
</template>
|
|
51
50
|
</FSButton>
|
|
@@ -123,9 +122,14 @@ export default defineComponent({
|
|
|
123
122
|
type: Boolean,
|
|
124
123
|
required: false,
|
|
125
124
|
default: false
|
|
125
|
+
},
|
|
126
|
+
label: {
|
|
127
|
+
type: String as PropType<string | null>,
|
|
128
|
+
required: false,
|
|
129
|
+
default: null
|
|
126
130
|
}
|
|
127
131
|
},
|
|
128
|
-
emits: ["update:modelValue", "update:type"],
|
|
132
|
+
emits: ["update", "update:modelValue", "update:type"],
|
|
129
133
|
setup(props, { emit }) {
|
|
130
134
|
const { getMany: getManyDashboardOrganisationTypes, fetching: fetchingDashboardOrganisationTypes, entities: dashboardOrganisationTypes } = useDashboardOrganisationTypes();
|
|
131
135
|
const { getMany: getManyDashboardOrganisations, fetching: fetchingDashboardOrganisations, entities: dashboardOrganisations } = useDashboardOrganisations();
|
|
@@ -157,19 +161,23 @@ export default defineComponent({
|
|
|
157
161
|
|
|
158
162
|
const placeholder = computed((): string | null => {
|
|
159
163
|
if (props.multiple && props.modelValue) {
|
|
160
|
-
return $tr("
|
|
164
|
+
return $tr("autocomplete.dashboard.placeholder", "{0} dashboard(s) selected", props.modelValue.length);
|
|
161
165
|
}
|
|
162
166
|
return null;
|
|
163
167
|
});
|
|
164
168
|
|
|
165
169
|
const update = (value: Dashboard[] | Dashboard | null) => {
|
|
166
170
|
if (Array.isArray(value)) {
|
|
167
|
-
|
|
168
|
-
|
|
171
|
+
const newModelValue = value.map(v => v.id);
|
|
172
|
+
const newType = value.map(v => v.type);
|
|
173
|
+
emit("update:modelValue", newModelValue);
|
|
174
|
+
emit("update:type", newType);
|
|
175
|
+
emit("update", { modelValue: newModelValue, type: newType });
|
|
169
176
|
}
|
|
170
177
|
else {
|
|
171
178
|
emit("update:modelValue", value?.id);
|
|
172
179
|
emit("update:type", value?.type);
|
|
180
|
+
emit("update", { modelValue: value?.id, type: value?.type });
|
|
173
181
|
}
|
|
174
182
|
};
|
|
175
183
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSAutocompleteField
|
|
3
|
+
:label="$props.label ?? $tr('ui.common.dashboard', 'Dashboard')"
|
|
3
4
|
:toggleSet="!$props.toggleSetDisabled && toggleSet"
|
|
4
5
|
:items="dashboardOrganisations"
|
|
5
6
|
:multiple="$props.multiple"
|
|
@@ -59,6 +60,11 @@ export default defineComponent({
|
|
|
59
60
|
type: Boolean,
|
|
60
61
|
required: false,
|
|
61
62
|
default: false
|
|
63
|
+
},
|
|
64
|
+
label: {
|
|
65
|
+
type: String as PropType<string | null>,
|
|
66
|
+
required: false,
|
|
67
|
+
default: null
|
|
62
68
|
}
|
|
63
69
|
},
|
|
64
70
|
emits: ["update:modelValue"],
|
|
@@ -72,7 +78,7 @@ export default defineComponent({
|
|
|
72
78
|
|
|
73
79
|
const placeholder = computed((): string | null => {
|
|
74
80
|
if (props.multiple && props.modelValue) {
|
|
75
|
-
return $tr("
|
|
81
|
+
return $tr("autocomplete.dashboard.placeholder", "{0} dashboard(s) selected", props.modelValue.length);
|
|
76
82
|
}
|
|
77
83
|
return null;
|
|
78
84
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSAutocompleteField
|
|
3
|
+
:label="$props.label ?? $tr('ui.common.data-category', 'Data category')"
|
|
3
4
|
:toggleSet="!$props.toggleSetDisabled && toggleSet"
|
|
4
5
|
:multiple="$props.multiple"
|
|
5
6
|
:placeholder="placeholder"
|
|
@@ -15,13 +16,13 @@
|
|
|
15
16
|
<FSChip
|
|
16
17
|
v-if="item.correlated"
|
|
17
18
|
prependIcon="mdi-link"
|
|
18
|
-
:label="$tr('
|
|
19
|
+
:label="$tr('autocomplete.data-category.linked','Linked')"
|
|
19
20
|
:color="ColorEnum.Success"
|
|
20
21
|
/>
|
|
21
22
|
<FSChip
|
|
22
23
|
v-else
|
|
23
24
|
prependIcon="mdi-link-off"
|
|
24
|
-
:label="$tr('
|
|
25
|
+
:label="$tr('autocomplete.data-category.not-linked','Not linked')"
|
|
25
26
|
:color="ColorEnum.Warning"
|
|
26
27
|
/>
|
|
27
28
|
</template>
|
|
@@ -41,13 +42,13 @@
|
|
|
41
42
|
<FSChip
|
|
42
43
|
v-if="props.item.correlated"
|
|
43
44
|
prependIcon="mdi-link"
|
|
44
|
-
:label="$tr('
|
|
45
|
+
:label="$tr('autocomplete.data-category.linked','Linked')"
|
|
45
46
|
:color="ColorEnum.Success"
|
|
46
47
|
/>
|
|
47
48
|
<FSChip
|
|
48
49
|
v-else
|
|
49
50
|
prependIcon="mdi-link-off"
|
|
50
|
-
:label="$tr('
|
|
51
|
+
:label="$tr('autocomplete.data-category.not-linked','Not linked')"
|
|
51
52
|
:color="ColorEnum.Warning"
|
|
52
53
|
/>
|
|
53
54
|
</template>
|
|
@@ -96,6 +97,11 @@ export default defineComponent({
|
|
|
96
97
|
type: Boolean,
|
|
97
98
|
required: false,
|
|
98
99
|
default: false
|
|
100
|
+
},
|
|
101
|
+
label: {
|
|
102
|
+
type: String as PropType<string | null>,
|
|
103
|
+
required: false,
|
|
104
|
+
default: null
|
|
99
105
|
}
|
|
100
106
|
},
|
|
101
107
|
emits: ["update:modelValue"],
|
|
@@ -109,7 +115,7 @@ export default defineComponent({
|
|
|
109
115
|
|
|
110
116
|
const placeholder = computed((): string | null => {
|
|
111
117
|
if (props.multiple && props.modelValue) {
|
|
112
|
-
return $tr("
|
|
118
|
+
return $tr("autocomplete.data-category.placeholder", "{0} data category(ies) selected", props.modelValue.length);
|
|
113
119
|
}
|
|
114
120
|
return null;
|
|
115
121
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSAutocompleteField
|
|
3
|
+
:label="$props.label ?? $tr('ui.common.data-definition', 'Data')"
|
|
3
4
|
:toggleSet="!$props.toggleSetDisabled && toggleSet"
|
|
4
5
|
:multiple="$props.multiple"
|
|
5
6
|
:placeholder="placeholder"
|
|
@@ -79,6 +80,11 @@ export default defineComponent({
|
|
|
79
80
|
type: Boolean,
|
|
80
81
|
required: false,
|
|
81
82
|
default: false
|
|
83
|
+
},
|
|
84
|
+
label: {
|
|
85
|
+
type: String as PropType<string | null>,
|
|
86
|
+
required: false,
|
|
87
|
+
default: null
|
|
82
88
|
}
|
|
83
89
|
},
|
|
84
90
|
emits: ["update:modelValue"],
|
|
@@ -92,7 +98,7 @@ export default defineComponent({
|
|
|
92
98
|
|
|
93
99
|
const placeholder = computed((): string | null => {
|
|
94
100
|
if (props.multiple && props.modelValue) {
|
|
95
|
-
return $tr("
|
|
101
|
+
return $tr("autocomplete.data-definition.placeholder", "{0} data definition(s) selected", props.modelValue.length);
|
|
96
102
|
}
|
|
97
103
|
return null;
|
|
98
104
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSAutocompleteField
|
|
3
|
+
:label="$props.label ?? $tr('ui.common.group', 'Group')"
|
|
3
4
|
:toggleSet="!$props.toggleSetDisabled && toggleSet"
|
|
4
5
|
:multiple="$props.multiple"
|
|
5
6
|
:placeholder="placeholder"
|
|
@@ -58,6 +59,11 @@ export default defineComponent({
|
|
|
58
59
|
type: Boolean,
|
|
59
60
|
required: false,
|
|
60
61
|
default: false
|
|
62
|
+
},
|
|
63
|
+
label: {
|
|
64
|
+
type: String as PropType<string | null>,
|
|
65
|
+
required: false,
|
|
66
|
+
default: null
|
|
61
67
|
}
|
|
62
68
|
},
|
|
63
69
|
emits: ["update:modelValue"],
|
|
@@ -71,7 +77,7 @@ export default defineComponent({
|
|
|
71
77
|
|
|
72
78
|
const placeholder = computed((): string | null => {
|
|
73
79
|
if (props.multiple && props.modelValue) {
|
|
74
|
-
return $tr("
|
|
80
|
+
return $tr("autocomplete.group.placeholder", "{0} group(s) selected", props.modelValue.length);
|
|
75
81
|
}
|
|
76
82
|
return null;
|
|
77
83
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSAutocompleteField
|
|
3
|
+
:label="$props.label ?? $tr('ui.common.location', 'Location')"
|
|
3
4
|
:toggleSet="!$props.toggleSetDisabled && toggleSet"
|
|
4
5
|
:multiple="$props.multiple"
|
|
5
6
|
:placeholder="placeholder"
|
|
@@ -58,6 +59,11 @@ export default defineComponent({
|
|
|
58
59
|
type: Boolean,
|
|
59
60
|
required: false,
|
|
60
61
|
default: false
|
|
62
|
+
},
|
|
63
|
+
label: {
|
|
64
|
+
type: String as PropType<string | null>,
|
|
65
|
+
required: false,
|
|
66
|
+
default: null
|
|
61
67
|
}
|
|
62
68
|
},
|
|
63
69
|
emits: ["update:modelValue"],
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSAutocompleteField
|
|
3
|
+
:label="$props.label ?? $tr('ui.common.manufacturer', 'Manufacturer')"
|
|
3
4
|
:toggleSet="!$props.toggleSetDisabled && toggleSet"
|
|
4
5
|
:multiple="$props.multiple"
|
|
5
6
|
:placeholder="placeholder"
|
|
@@ -17,6 +18,7 @@
|
|
|
17
18
|
height="26px"
|
|
18
19
|
width="26px"
|
|
19
20
|
:imageId="item.imageId"
|
|
21
|
+
:thumbnail="true"
|
|
20
22
|
/>
|
|
21
23
|
</template>
|
|
22
24
|
<template
|
|
@@ -38,6 +40,7 @@
|
|
|
38
40
|
height="26px"
|
|
39
41
|
width="26px"
|
|
40
42
|
:imageId="props.item.imageId"
|
|
43
|
+
:thumbnail="true"
|
|
41
44
|
/>
|
|
42
45
|
</template>
|
|
43
46
|
</FSButton>
|
|
@@ -84,6 +87,11 @@ export default defineComponent({
|
|
|
84
87
|
type: Boolean,
|
|
85
88
|
required: false,
|
|
86
89
|
default: false
|
|
90
|
+
},
|
|
91
|
+
label: {
|
|
92
|
+
type: String as PropType<string | null>,
|
|
93
|
+
required: false,
|
|
94
|
+
default: null
|
|
87
95
|
}
|
|
88
96
|
},
|
|
89
97
|
emits: ["update:modelValue"],
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSAutocompleteField
|
|
3
|
+
:label="$props.label ?? $tr('ui.common.model', 'Model')"
|
|
3
4
|
:toggleSet="!$props.toggleSetDisabled && toggleSet"
|
|
4
5
|
:multiple="$props.multiple"
|
|
5
6
|
:placeholder="placeholder"
|
|
@@ -17,6 +18,7 @@
|
|
|
17
18
|
height="26px"
|
|
18
19
|
width="26px"
|
|
19
20
|
:imageId="item.imageId"
|
|
21
|
+
:thumbnail="true"
|
|
20
22
|
/>
|
|
21
23
|
</template>
|
|
22
24
|
<template
|
|
@@ -38,6 +40,7 @@
|
|
|
38
40
|
height="26px"
|
|
39
41
|
width="26px"
|
|
40
42
|
:imageId="props.item.imageId"
|
|
43
|
+
:thumbnail="true"
|
|
41
44
|
/>
|
|
42
45
|
</template>
|
|
43
46
|
</FSButton>
|
|
@@ -84,6 +87,11 @@ export default defineComponent({
|
|
|
84
87
|
type: Boolean,
|
|
85
88
|
required: false,
|
|
86
89
|
default: false
|
|
90
|
+
},
|
|
91
|
+
label: {
|
|
92
|
+
type: String as PropType<string | null>,
|
|
93
|
+
required: false,
|
|
94
|
+
default: null
|
|
87
95
|
}
|
|
88
96
|
},
|
|
89
97
|
emits: ["update:modelValue"],
|
|
@@ -97,7 +105,7 @@ export default defineComponent({
|
|
|
97
105
|
|
|
98
106
|
const placeholder = computed((): string | null => {
|
|
99
107
|
if (props.multiple && props.modelValue) {
|
|
100
|
-
return $tr("
|
|
108
|
+
return $tr("autocomplete.model.placeholder", "{0} model(s) selected", props.modelValue.length);
|
|
101
109
|
}
|
|
102
110
|
return null;
|
|
103
111
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSAutocompleteField
|
|
3
|
+
:label="$props.label ?? $tr('ui.common.organisation-type', 'Organisation type')"
|
|
3
4
|
:toggleSet="!$props.toggleSetDisabled && toggleSet"
|
|
4
5
|
:multiple="$props.multiple"
|
|
5
6
|
:placeholder="placeholder"
|
|
@@ -46,6 +47,11 @@ export default defineComponent({
|
|
|
46
47
|
type: Boolean,
|
|
47
48
|
required: false,
|
|
48
49
|
default: false
|
|
50
|
+
},
|
|
51
|
+
label: {
|
|
52
|
+
type: String as PropType<string | null>,
|
|
53
|
+
required: false,
|
|
54
|
+
default: null
|
|
49
55
|
}
|
|
50
56
|
},
|
|
51
57
|
emits: ["update:modelValue"],
|
|
@@ -59,7 +65,7 @@ export default defineComponent({
|
|
|
59
65
|
|
|
60
66
|
const placeholder = computed((): string | null => {
|
|
61
67
|
if (props.multiple && props.modelValue) {
|
|
62
|
-
return $tr("
|
|
68
|
+
return $tr("autocomplete.organisation-type.placeholder", "{0} organisation type(s) selected", props.modelValue.length);
|
|
63
69
|
}
|
|
64
70
|
return null;
|
|
65
71
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSAutocompleteField
|
|
3
|
+
:label="$props.label ?? $tr('ui.common.role', 'Role')"
|
|
3
4
|
:toggleSet="!$props.toggleSetDisabled && toggleSet"
|
|
4
5
|
:multiple="$props.multiple"
|
|
5
6
|
:placeholder="placeholder"
|
|
@@ -24,7 +25,6 @@
|
|
|
24
25
|
<FSChip
|
|
25
26
|
:color="roleTypeColor(item.type)"
|
|
26
27
|
:label="roleTypeLabel(item.type)"
|
|
27
|
-
:editable="false"
|
|
28
28
|
/>
|
|
29
29
|
</template>
|
|
30
30
|
<template
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
<FSChip
|
|
46
46
|
:color="roleTypeColor(props.item.type)"
|
|
47
47
|
:label="roleTypeLabel(props.item.type)"
|
|
48
|
-
:editable="false"
|
|
49
48
|
/>
|
|
50
49
|
</template>
|
|
51
50
|
</FSButton>
|
|
@@ -117,9 +116,14 @@ export default defineComponent({
|
|
|
117
116
|
type: Boolean,
|
|
118
117
|
required: false,
|
|
119
118
|
default: false
|
|
119
|
+
},
|
|
120
|
+
label: {
|
|
121
|
+
type: String as PropType<string | null>,
|
|
122
|
+
required: false,
|
|
123
|
+
default: null
|
|
120
124
|
}
|
|
121
125
|
},
|
|
122
|
-
emits: ["update:modelValue", "update:type"],
|
|
126
|
+
emits: ["update", "update:modelValue", "update:type"],
|
|
123
127
|
setup(props, { emit }) {
|
|
124
128
|
const { getMany: getManyRoleOrganisationTypes, fetching: fetchingRoleOrganisationTypes, entities: roleOrganisationTypes } = useRoleOrganisationTypes();
|
|
125
129
|
const { getMany: getManyRoleOrganisations, fetching: fetchingRoleOrganisations, entities: roleOrganisations } = useRoleOrganisations();
|
|
@@ -145,19 +149,23 @@ export default defineComponent({
|
|
|
145
149
|
|
|
146
150
|
const placeholder = computed((): string | null => {
|
|
147
151
|
if (props.multiple && props.modelValue) {
|
|
148
|
-
return $tr("
|
|
152
|
+
return $tr("autocomplete.role.placeholder", "{0} role(s) selected", props.modelValue.length);
|
|
149
153
|
}
|
|
150
154
|
return null;
|
|
151
155
|
});
|
|
152
156
|
|
|
153
157
|
const update = (value: Role[] | Role | null) => {
|
|
154
158
|
if (Array.isArray(value)) {
|
|
155
|
-
|
|
156
|
-
|
|
159
|
+
const newModelValue = value.map(v => v.id);
|
|
160
|
+
const newType = value.map(v => v.type);
|
|
161
|
+
emit("update:modelValue", newModelValue);
|
|
162
|
+
emit("update:type", newType);
|
|
163
|
+
emit("update", { modelValue: newModelValue, type: newType });
|
|
157
164
|
}
|
|
158
165
|
else {
|
|
159
166
|
emit("update:modelValue", value?.id);
|
|
160
167
|
emit("update:type", value?.type);
|
|
168
|
+
emit("update", { modelValue: value?.id, type: value?.type });
|
|
161
169
|
}
|
|
162
170
|
};
|
|
163
171
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSAutocompleteField
|
|
3
|
+
:label="$props.label ?? $tr('ui.common.service-account-role', 'Service account role')"
|
|
3
4
|
:toggleSet="!$props.toggleSetDisabled && toggleSet"
|
|
4
5
|
:items="serviceAccountRoleOrganisations"
|
|
5
6
|
:multiple="$props.multiple"
|
|
@@ -58,6 +59,11 @@ export default defineComponent({
|
|
|
58
59
|
type: Boolean,
|
|
59
60
|
required: false,
|
|
60
61
|
default: false
|
|
62
|
+
},
|
|
63
|
+
label: {
|
|
64
|
+
type: String as PropType<string | null>,
|
|
65
|
+
required: false,
|
|
66
|
+
default: null
|
|
61
67
|
}
|
|
62
68
|
},
|
|
63
69
|
emits: ["update:modelValue"],
|
|
@@ -71,7 +77,7 @@ export default defineComponent({
|
|
|
71
77
|
|
|
72
78
|
const placeholder = computed((): string | null => {
|
|
73
79
|
if (props.multiple && props.modelValue) {
|
|
74
|
-
return $tr("
|
|
80
|
+
return $tr("autocomplete.service-account-role.placeholder", "{0} role(s) selected", props.modelValue.length);
|
|
75
81
|
}
|
|
76
82
|
return null;
|
|
77
83
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSAutocompleteField
|
|
3
3
|
itemTitle="name"
|
|
4
|
+
:label="$props.label ?? $tr('ui.common.user', 'User')"
|
|
4
5
|
:toggleSet="!$props.toggleSetDisabled && toggleSet"
|
|
5
6
|
:multiple="$props.multiple"
|
|
6
7
|
:placeholder="placeholder"
|
|
@@ -18,6 +19,7 @@
|
|
|
18
19
|
height="26px"
|
|
19
20
|
width="26px"
|
|
20
21
|
:imageId="item.imageId"
|
|
22
|
+
:thumbnail="true"
|
|
21
23
|
/>
|
|
22
24
|
</template>
|
|
23
25
|
<template
|
|
@@ -39,6 +41,7 @@
|
|
|
39
41
|
height="26px"
|
|
40
42
|
width="26px"
|
|
41
43
|
:imageId="props.item.imageId"
|
|
44
|
+
:thumbnail="true"
|
|
42
45
|
/>
|
|
43
46
|
</template>
|
|
44
47
|
</FSButton>
|
|
@@ -85,6 +88,11 @@ export default defineComponent({
|
|
|
85
88
|
type: Boolean,
|
|
86
89
|
required: false,
|
|
87
90
|
default: false
|
|
91
|
+
},
|
|
92
|
+
label: {
|
|
93
|
+
type: String as PropType<string | null>,
|
|
94
|
+
required: false,
|
|
95
|
+
default: null
|
|
88
96
|
}
|
|
89
97
|
},
|
|
90
98
|
emits: ["update:modelValue"],
|
|
@@ -98,7 +106,7 @@ export default defineComponent({
|
|
|
98
106
|
|
|
99
107
|
const placeholder = computed((): string | null => {
|
|
100
108
|
if (props.multiple && props.modelValue) {
|
|
101
|
-
return $tr("
|
|
109
|
+
return $tr("autocomplete.user.placeholder", "{0} user(s) selected", props.modelValue.length);
|
|
102
110
|
}
|
|
103
111
|
return null;
|
|
104
112
|
});
|