@dative-gpi/foundation-core-components 0.0.230 → 0.1.68
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 +46 -53
- package/components/autocompletes/FSAutocompleteDashboard.vue +46 -53
- package/components/autocompletes/FSAutocompleteDashboardOrganisation.vue +24 -39
- package/components/autocompletes/FSAutocompleteDataCategory.vue +46 -38
- package/components/autocompletes/FSAutocompleteDataDefinition.vue +19 -39
- package/components/autocompletes/FSAutocompleteGroup.vue +17 -38
- package/components/autocompletes/FSAutocompleteLocation.vue +17 -38
- package/components/autocompletes/FSAutocompleteManufacturer.vue +57 -2
- package/components/autocompletes/FSAutocompleteModel.vue +58 -3
- package/components/autocompletes/FSAutocompleteOrganisationType.vue +17 -0
- package/components/autocompletes/FSAutocompleteRole.vue +46 -53
- package/components/autocompletes/FSAutocompleteServiceAccountRoleOrganisation.vue +99 -0
- package/components/autocompletes/FSAutocompleteUserOrganisation.vue +24 -57
- package/components/customProperties/FSMetaField.vue +5 -6
- package/components/customProperties/FSMetaFormContent.vue +4 -5
- package/components/customProperties/FSMetaGrid.vue +3 -4
- package/components/customProperties/FSMetaHistory.vue +16 -15
- package/components/customProperties/FSMetaValue.vue +67 -36
- package/components/customProperties/helpers.ts +5 -4
- package/components/entities/FSBaseEntitiesList.vue +50 -0
- package/components/entities/FSDialogSelectEntities.vue +76 -0
- package/components/entities/FSEntityField.vue +149 -0
- package/components/entities/FSSelectEntitiesList.vue +192 -0
- package/components/entities/FSSimpleEntitiesList.vue +100 -0
- package/components/explorers/FSBaseFoldersExplorer.vue +258 -0
- package/components/lists/FSDataTable.vue +4 -8
- package/components/lists/alerts/FSBaseAlertsList.vue +357 -0
- package/components/lists/alerts/FSButtonAcknowledgeAlert.vue +101 -0
- package/components/lists/authTokens/FSBaseAuthTokensList.vue +78 -0
- package/components/lists/chartOrganisationTypes/FSBaseChartOrganisationTypesList.vue +159 -0
- package/components/lists/chartOrganisations/FSBaseChartOrganisationsList.vue +159 -0
- package/components/lists/charts/FSBaseChartsList.vue +218 -0
- package/components/lists/comments/FSBaseCommentsList.vue +127 -0
- package/components/lists/dashboardOrganisationTypes/FSBaseDashboardOrganisationTypesList.vue +164 -0
- package/components/lists/dashboards/FSBaseDashboardsList.vue +222 -0
- package/components/lists/dashboards/FSSimpleDashboardsList.vue +63 -0
- package/components/lists/dataCategories/FSBaseDataCategoriesList.vue +154 -0
- package/components/lists/dataDefinitions/FSBaseDataDefinitionsList.vue +128 -0
- package/components/lists/deviceOrganisations/FSBaseDeviceOrganisationsList.vue +354 -0
- package/components/lists/deviceOrganisations/FSSimpleDeviceOrganisationsList.vue +44 -0
- package/components/lists/folders/FSBaseFoldersList.vue +116 -0
- package/components/lists/folders/FSSimpleFoldersList.vue +44 -0
- package/components/lists/groups/FSBaseGroupsList.vue +133 -0
- package/components/lists/groups/FSSimpleGroupsList.vue +44 -0
- package/components/lists/locations/FSBaseLocationsList.vue +115 -0
- package/components/lists/locations/FSSimpleLocationsList.vue +44 -0
- package/components/lists/models/FSBaseModelsList.vue +152 -0
- package/components/lists/models/FSSimpleModelsList.vue +44 -0
- package/components/lists/roleOrganisationTypes/FSBaseRoleOrganisationTypesList.vue +127 -0
- package/components/lists/roleOrganisations/FSBaseRoleOrganisationsList.vue +127 -0
- package/components/lists/scenarioOrganisationTypes/FSBaseScenarioOrganisationTypesList.vue +120 -0
- package/components/lists/scenarioOrganisations/FSBaseScenarioOrganisationsList.vue +107 -0
- package/components/lists/scenarios/FSBaseScenariosList.vue +206 -0
- package/components/lists/serviceAccountOrganisations/FSBaseServiceAccountOrganisationsList.vue +153 -0
- package/components/lists/serviceAccountRoleOrganisations/FSBaseServiceAccountRoleOrganisations.vue +127 -0
- package/components/lists/userOrganisations/FSBaseUserOrganisationsList.vue +169 -0
- package/components/lists/userOrganisations/FSSimpleUserOrganisationsList.vue +45 -0
- package/components/selects/FSAggregationSelector.vue +5 -5
- package/components/selects/FSAxisTypeSelector.vue +1 -1
- package/components/selects/FSDisplayAsSelector.vue +5 -5
- package/components/selects/FSFilterTypeSelector.vue +2 -2
- package/components/selects/FSHeatmapRuleSelector.vue +5 -5
- package/components/selects/FSOperationOnSelector.vue +5 -5
- package/components/selects/FSPlanningTypeSelector.vue +6 -5
- package/components/selects/FSPlotPerSelector.vue +5 -5
- package/components/selects/{FSSelectSelectedEntities.vue → FSSelectEntityType.vue} +12 -12
- package/components/selects/FSSerieTypeSelector.vue +5 -5
- package/components/tiles/FSDeviceOrganisationTile.vue +9 -2
- package/components/tiles/FSLocationTile.vue +65 -0
- package/components/tiles/FSServiceAccountOrganisationTile.vue +68 -0
- package/components/tiles/FSUserOrganisationTile.vue +0 -2
- package/components/treeviews/FSTreeViewFolder.vue +15 -3
- package/components/treeviews/FSTreeViewGroup.vue +15 -3
- package/package.json +7 -7
- package/utils/charts.ts +2 -1
- package/utils/dashboards.ts +31 -4
- package/utils/index.ts +2 -1
- package/utils/permissions.ts +80 -0
- package/utils/roles.ts +2 -3
- package/utils/tables.ts +41 -0
- package/utils/users.ts +4 -1
- package/components/selects/FSDataCategorySelector.vue +0 -62
- package/components/selects/FSDataDefinitionSelector.vue +0 -66
- package/components/selects/FSModelSelector.vue +0 -56
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSDataTable
|
|
3
|
+
:items="userOrganisations"
|
|
4
|
+
:itemTo="$props.itemTo"
|
|
5
|
+
:loading="fetchingUserOrganisations"
|
|
6
|
+
:showSelect="$props.editable"
|
|
7
|
+
:tableCode="$props.tableCode"
|
|
8
|
+
:modelValue="$props.modelValue"
|
|
9
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
10
|
+
v-bind="$attrs"
|
|
11
|
+
>
|
|
12
|
+
<template
|
|
13
|
+
v-for="(_, name) in $slots"
|
|
14
|
+
v-slot:[name]="slotData"
|
|
15
|
+
>
|
|
16
|
+
<slot
|
|
17
|
+
:name="name"
|
|
18
|
+
v-bind="slotData"
|
|
19
|
+
/>
|
|
20
|
+
</template>
|
|
21
|
+
<template
|
|
22
|
+
#header.imageId-title
|
|
23
|
+
>
|
|
24
|
+
<FSIcon>
|
|
25
|
+
mdi-panorama-variant-outline
|
|
26
|
+
</FSIcon>
|
|
27
|
+
</template>
|
|
28
|
+
<template
|
|
29
|
+
#item.imageId="{ item }"
|
|
30
|
+
>
|
|
31
|
+
<FSImage
|
|
32
|
+
v-if="item.imageId"
|
|
33
|
+
height="32px"
|
|
34
|
+
width="32px"
|
|
35
|
+
:imageId="item.imageId"
|
|
36
|
+
/>
|
|
37
|
+
</template>
|
|
38
|
+
<template
|
|
39
|
+
#item.allowEmails="{ item }"
|
|
40
|
+
>
|
|
41
|
+
<FSIconCheck
|
|
42
|
+
:value="item.allowEmails"
|
|
43
|
+
/>
|
|
44
|
+
</template>
|
|
45
|
+
<template
|
|
46
|
+
#item.allowSms="{ item }"
|
|
47
|
+
>
|
|
48
|
+
<FSIconCheck
|
|
49
|
+
:value="item.allowSms"
|
|
50
|
+
/>
|
|
51
|
+
</template>
|
|
52
|
+
<template
|
|
53
|
+
#item.tags="{ item }"
|
|
54
|
+
>
|
|
55
|
+
<FSTagGroup
|
|
56
|
+
variant="slide"
|
|
57
|
+
:editable="false"
|
|
58
|
+
:tags="item.tags"
|
|
59
|
+
/>
|
|
60
|
+
</template>
|
|
61
|
+
<template
|
|
62
|
+
#item.validity="{ item }"
|
|
63
|
+
>
|
|
64
|
+
<FSSpan
|
|
65
|
+
font="text-overline"
|
|
66
|
+
>
|
|
67
|
+
{{ userValidityLabel(item.validity) }}
|
|
68
|
+
</FSSpan>
|
|
69
|
+
</template>
|
|
70
|
+
<template
|
|
71
|
+
#item.userType="{ item }"
|
|
72
|
+
>
|
|
73
|
+
<FSSpan
|
|
74
|
+
font="text-overline"
|
|
75
|
+
>
|
|
76
|
+
{{ userTypeLabel(item.userType) }}
|
|
77
|
+
</FSSpan>
|
|
78
|
+
</template>
|
|
79
|
+
<template
|
|
80
|
+
#item.tile="{ item, toggleSelect }"
|
|
81
|
+
>
|
|
82
|
+
<FSUserOrganisationTileUI
|
|
83
|
+
:to="$props.itemTo && $props.itemTo(item)"
|
|
84
|
+
:editable="$props.editable"
|
|
85
|
+
:modelValue="isSelected(item.id)"
|
|
86
|
+
@update:modelValue="toggleSelect(item)"
|
|
87
|
+
v-bind="item"
|
|
88
|
+
/>
|
|
89
|
+
</template>
|
|
90
|
+
</FSDataTable>
|
|
91
|
+
</template>
|
|
92
|
+
|
|
93
|
+
<script lang="ts">
|
|
94
|
+
import { defineComponent, type PropType, watch } from "vue";
|
|
95
|
+
import { type RouteLocation } from "vue-router";
|
|
96
|
+
import _ from "lodash";
|
|
97
|
+
|
|
98
|
+
import type { UserOrganisationFilters, UserOrganisationInfos } from "@dative-gpi/foundation-core-domain/models";
|
|
99
|
+
import { userTypeLabel, userValidityLabel } from "@dative-gpi/foundation-core-components/utils";
|
|
100
|
+
import { useUserOrganisations } from "@dative-gpi/foundation-core-services/composables";
|
|
101
|
+
|
|
102
|
+
import FSDataTable from "../FSDataTable.vue";
|
|
103
|
+
|
|
104
|
+
import FSSpan from "@dative-gpi/foundation-shared-components/components/FSSpan.vue";
|
|
105
|
+
import FSImage from "@dative-gpi/foundation-shared-components/components/FSImage.vue";
|
|
106
|
+
import FSTagGroup from "@dative-gpi/foundation-shared-components/components/FSTagGroup.vue";
|
|
107
|
+
import FSIconCheck from "@dative-gpi/foundation-shared-components/components/FSIconCheck.vue";
|
|
108
|
+
import FSUserOrganisationTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSUserOrganisationTileUI.vue";
|
|
109
|
+
|
|
110
|
+
export default defineComponent({
|
|
111
|
+
name: "FSBaseUserOrganisationsList",
|
|
112
|
+
components: {
|
|
113
|
+
FSDataTable,
|
|
114
|
+
FSImage,
|
|
115
|
+
FSUserOrganisationTileUI,
|
|
116
|
+
FSSpan,
|
|
117
|
+
FSTagGroup,
|
|
118
|
+
FSIconCheck
|
|
119
|
+
|
|
120
|
+
},
|
|
121
|
+
props: {
|
|
122
|
+
tableCode: {
|
|
123
|
+
type: String,
|
|
124
|
+
required: true
|
|
125
|
+
},
|
|
126
|
+
userOrganisationsFilters: {
|
|
127
|
+
type: Object as PropType<UserOrganisationFilters | null>,
|
|
128
|
+
required: false,
|
|
129
|
+
default: null
|
|
130
|
+
},
|
|
131
|
+
itemTo: {
|
|
132
|
+
type: Function as PropType<(item: UserOrganisationInfos) => Partial<RouteLocation>>,
|
|
133
|
+
required: false
|
|
134
|
+
},
|
|
135
|
+
editable: {
|
|
136
|
+
type: Boolean,
|
|
137
|
+
required: false,
|
|
138
|
+
default: true
|
|
139
|
+
},
|
|
140
|
+
modelValue: {
|
|
141
|
+
type: Array as PropType<string[]>,
|
|
142
|
+
required: false,
|
|
143
|
+
default: () => []
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
emits: ["update:modelValue"],
|
|
147
|
+
setup(props) {
|
|
148
|
+
const { getMany: fetchUserOrganisations, entities: userOrganisations, fetching: fetchingUserOrganisations } = useUserOrganisations();
|
|
149
|
+
|
|
150
|
+
const isSelected = (id: string): boolean => {
|
|
151
|
+
return props.modelValue.includes(id);
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
watch(() => props.userOrganisationsFilters, (next, previous) => {
|
|
155
|
+
if ((!next && !previous) || !_.isEqual(next, previous)) {
|
|
156
|
+
fetchUserOrganisations(props.userOrganisationsFilters ?? undefined);
|
|
157
|
+
}
|
|
158
|
+
}, { immediate: true });
|
|
159
|
+
|
|
160
|
+
return {
|
|
161
|
+
fetchingUserOrganisations,
|
|
162
|
+
userOrganisations,
|
|
163
|
+
userValidityLabel,
|
|
164
|
+
userTypeLabel,
|
|
165
|
+
isSelected
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
</script>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSSimpleList
|
|
3
|
+
:items="userOrganisations"
|
|
4
|
+
itemLabel="name"
|
|
5
|
+
:loading="fetching"
|
|
6
|
+
v-bind="$attrs"
|
|
7
|
+
/>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script lang="ts">
|
|
11
|
+
import { defineComponent, type PropType, watch } from "vue";
|
|
12
|
+
|
|
13
|
+
import type { UserOrganisationFilters } from "@dative-gpi/foundation-core-domain/models";
|
|
14
|
+
import { useUserOrganisations } from "@dative-gpi/foundation-core-services/composables";
|
|
15
|
+
|
|
16
|
+
import FSSimpleList from "@dative-gpi/foundation-shared-components/components/lists/FSSimpleList.vue";
|
|
17
|
+
|
|
18
|
+
export default defineComponent({
|
|
19
|
+
name: "FSSimpleUserOrganisationsList",
|
|
20
|
+
components: {
|
|
21
|
+
FSSimpleList,
|
|
22
|
+
},
|
|
23
|
+
props: {
|
|
24
|
+
userOrganisationFilters: {
|
|
25
|
+
type: Object as PropType<UserOrganisationFilters>,
|
|
26
|
+
required: false,
|
|
27
|
+
default: () => ({})
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
setup(props){
|
|
31
|
+
const { entities: userOrganisations, getMany, fetching } = useUserOrganisations();
|
|
32
|
+
|
|
33
|
+
const fetch = () => {
|
|
34
|
+
getMany(props.userOrganisationFilters);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
watch(() => props.userOrganisationFilters, fetch, { immediate: true });
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
userOrganisations,
|
|
41
|
+
fetching
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
</script>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<FSAutocompleteField
|
|
3
3
|
:label="label ?? $tr('ui.common.aggregation-type','Aggregation')"
|
|
4
4
|
:items="aggregationTypeItems"
|
|
5
5
|
:modelValue="modelValue"
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
<script lang="ts">
|
|
12
12
|
import { computed, defineComponent, type PropType } from "vue";
|
|
13
13
|
|
|
14
|
-
import {AggregationType} from "@dative-gpi/foundation-
|
|
14
|
+
import { AggregationType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
15
15
|
|
|
16
16
|
import {aggregationTypeLabel, getEnumEntries} from "../../utils";
|
|
17
17
|
|
|
18
|
-
import
|
|
18
|
+
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
19
19
|
|
|
20
20
|
export default defineComponent({
|
|
21
21
|
components: {
|
|
22
|
-
|
|
22
|
+
FSAutocompleteField
|
|
23
23
|
},
|
|
24
24
|
props: {
|
|
25
25
|
modelValue : {
|
|
@@ -35,7 +35,7 @@ export default defineComponent({
|
|
|
35
35
|
setup() {
|
|
36
36
|
|
|
37
37
|
const aggregationTypeItems = computed(()=>{
|
|
38
|
-
return getEnumEntries(AggregationType).map((f)=>{
|
|
38
|
+
return getEnumEntries(AggregationType).filter(f=>f.value != AggregationType.None).map((f)=>{
|
|
39
39
|
return {
|
|
40
40
|
id: f.value,
|
|
41
41
|
label: aggregationTypeLabel(f.value)
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<script lang="ts">
|
|
12
12
|
import { computed, defineComponent, type PropType } from "vue";
|
|
13
13
|
|
|
14
|
-
import {AxisType} from "@dative-gpi/foundation-
|
|
14
|
+
import {AxisType} from "@dative-gpi/foundation-shared-domain/enums";
|
|
15
15
|
|
|
16
16
|
import {axisTypeLabel, getEnumEntries} from "../../utils";
|
|
17
17
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<FSAutocompleteField
|
|
3
3
|
:label="label ?? $tr('ui.common.display-as','Display as')"
|
|
4
4
|
:items="displayAsItems"
|
|
5
5
|
:modelValue="modelValue"
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
<script lang="ts">
|
|
12
12
|
import { computed, defineComponent, type PropType } from "vue";
|
|
13
13
|
|
|
14
|
-
import {DisplayAs} from "@dative-gpi/foundation-
|
|
14
|
+
import {DisplayAs} from "@dative-gpi/foundation-shared-domain/enums";
|
|
15
15
|
|
|
16
|
-
import
|
|
16
|
+
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
17
17
|
|
|
18
18
|
import {displayAsLabel, getEnumEntries} from "../../utils";
|
|
19
19
|
|
|
20
20
|
export default defineComponent({
|
|
21
21
|
components: {
|
|
22
|
-
|
|
22
|
+
FSAutocompleteField
|
|
23
23
|
},
|
|
24
24
|
props: {
|
|
25
25
|
modelValue: {
|
|
@@ -36,7 +36,7 @@ export default defineComponent({
|
|
|
36
36
|
setup() {
|
|
37
37
|
|
|
38
38
|
const displayAsItems = computed(()=>{
|
|
39
|
-
return getEnumEntries(DisplayAs).map((f)=>{
|
|
39
|
+
return getEnumEntries(DisplayAs).filter(f=>f.value != DisplayAs.None).map((f)=>{
|
|
40
40
|
return {
|
|
41
41
|
id: f.value,
|
|
42
42
|
label: displayAsLabel(f.value)
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<script lang="ts">
|
|
13
13
|
import { computed, defineComponent, type PropType } from "vue";
|
|
14
14
|
|
|
15
|
-
import {FilterType} from "@dative-gpi/foundation-
|
|
15
|
+
import {FilterType} from "@dative-gpi/foundation-shared-domain/enums";
|
|
16
16
|
|
|
17
17
|
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
18
18
|
|
|
@@ -37,7 +37,7 @@ export default defineComponent({
|
|
|
37
37
|
setup() {
|
|
38
38
|
|
|
39
39
|
const filterTypeItems = computed(()=>{
|
|
40
|
-
return getEnumEntries(FilterType).map((f)=>{
|
|
40
|
+
return getEnumEntries(FilterType).filter(f=>f.value != FilterType.None).map((f)=>{
|
|
41
41
|
return {
|
|
42
42
|
id: f.value,
|
|
43
43
|
label: filterTypeLabel(f.value)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<FSAutocompleteField
|
|
3
3
|
:label="label ?? $tr('ui.common.heat-rule','Heat rule')"
|
|
4
4
|
:items="heatmapRuleItems"
|
|
5
5
|
:modelValue="modelValue"
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
<script lang="ts">
|
|
12
12
|
import { computed, defineComponent, type PropType } from "vue";
|
|
13
13
|
|
|
14
|
-
import {HeatmapRule} from "@dative-gpi/foundation-
|
|
14
|
+
import {HeatmapRule} from "@dative-gpi/foundation-shared-domain/enums";
|
|
15
15
|
|
|
16
|
-
import
|
|
16
|
+
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
17
17
|
|
|
18
18
|
import {heatmapRuleLabel, getEnumEntries} from "../../utils";
|
|
19
19
|
|
|
20
20
|
export default defineComponent({
|
|
21
21
|
components: {
|
|
22
|
-
|
|
22
|
+
FSAutocompleteField
|
|
23
23
|
},
|
|
24
24
|
props: {
|
|
25
25
|
modelValue: {
|
|
@@ -36,7 +36,7 @@ export default defineComponent({
|
|
|
36
36
|
setup() {
|
|
37
37
|
|
|
38
38
|
const heatmapRuleItems = computed(()=>{
|
|
39
|
-
return getEnumEntries(HeatmapRule).map((f)=>{
|
|
39
|
+
return getEnumEntries(HeatmapRule).filter(f=>f.value != HeatmapRule.None).map((f)=>{
|
|
40
40
|
return {
|
|
41
41
|
id: f.value,
|
|
42
42
|
label: heatmapRuleLabel(f.value)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<FSAutocompleteField
|
|
3
3
|
:label="label ?? $tr('ui.common.operation-on','Operation on')"
|
|
4
4
|
:items="operationOnItems"
|
|
5
5
|
:modelValue="modelValue"
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
<script lang="ts">
|
|
12
12
|
import { computed, defineComponent, type PropType } from "vue";
|
|
13
13
|
|
|
14
|
-
import {OperationOn} from "@dative-gpi/foundation-
|
|
14
|
+
import {OperationOn} from "@dative-gpi/foundation-shared-domain/enums";
|
|
15
15
|
|
|
16
|
-
import
|
|
16
|
+
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
17
17
|
|
|
18
18
|
import {operationOnLabel, getEnumEntries} from "../../utils";
|
|
19
19
|
|
|
20
20
|
export default defineComponent({
|
|
21
21
|
components: {
|
|
22
|
-
|
|
22
|
+
FSAutocompleteField
|
|
23
23
|
},
|
|
24
24
|
props: {
|
|
25
25
|
modelValue: {
|
|
@@ -35,7 +35,7 @@ export default defineComponent({
|
|
|
35
35
|
setup() {
|
|
36
36
|
|
|
37
37
|
const operationOnItems = computed(()=>{
|
|
38
|
-
return getEnumEntries(OperationOn).map((f)=>{
|
|
38
|
+
return getEnumEntries(OperationOn).filter(f=>f.value != OperationOn.None).map((f)=>{
|
|
39
39
|
return {
|
|
40
40
|
id: f.value,
|
|
41
41
|
label: operationOnLabel(f.value)
|
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<FSAutocompleteField
|
|
3
3
|
:label="label ?? $tr('ui.common.planning-type','Planning type')"
|
|
4
4
|
:items="planningTypeItems"
|
|
5
5
|
:modelValue="modelValue"
|
|
6
6
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
+
v-bind="$attrs"
|
|
7
8
|
/>
|
|
8
9
|
</template>
|
|
9
10
|
|
|
10
11
|
<script lang="ts">
|
|
11
12
|
import { computed, defineComponent, type PropType } from "vue";
|
|
12
13
|
|
|
13
|
-
import {PlanningType} from "@dative-gpi/foundation-
|
|
14
|
+
import {PlanningType} from "@dative-gpi/foundation-shared-domain/enums";
|
|
14
15
|
|
|
15
|
-
import
|
|
16
|
+
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
16
17
|
|
|
17
18
|
import {planningTypeLabel, getEnumEntries} from "../../utils";
|
|
18
19
|
|
|
19
20
|
export default defineComponent({
|
|
20
21
|
components: {
|
|
21
|
-
|
|
22
|
+
FSAutocompleteField
|
|
22
23
|
},
|
|
23
24
|
props: {
|
|
24
25
|
modelValue: {
|
|
@@ -34,7 +35,7 @@ export default defineComponent({
|
|
|
34
35
|
setup() {
|
|
35
36
|
|
|
36
37
|
const planningTypeItems = computed(()=>{
|
|
37
|
-
return getEnumEntries(PlanningType).map((f)=>{
|
|
38
|
+
return getEnumEntries(PlanningType).filter(f=>f.value != PlanningType.None).map((f)=>{
|
|
38
39
|
return {
|
|
39
40
|
id: f.value,
|
|
40
41
|
label: planningTypeLabel(f.value)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<FSAutocompleteField
|
|
3
3
|
:label="label ?? $tr('ui.common.plot-per','Plot per')"
|
|
4
4
|
:items="plotPerItems"
|
|
5
5
|
:modelValue="modelValue"
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
<script lang="ts">
|
|
12
12
|
import { computed, defineComponent, type PropType } from "vue";
|
|
13
13
|
|
|
14
|
-
import {PlotPer} from "@dative-gpi/foundation-
|
|
14
|
+
import {PlotPer} from "@dative-gpi/foundation-shared-domain/enums";
|
|
15
15
|
|
|
16
|
-
import
|
|
16
|
+
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
17
17
|
|
|
18
18
|
import {plotPerLabel, getEnumEntries} from "../../utils";
|
|
19
19
|
|
|
20
20
|
export default defineComponent({
|
|
21
21
|
components: {
|
|
22
|
-
|
|
22
|
+
FSAutocompleteField
|
|
23
23
|
},
|
|
24
24
|
props: {
|
|
25
25
|
modelValue: {
|
|
@@ -35,7 +35,7 @@ export default defineComponent({
|
|
|
35
35
|
setup() {
|
|
36
36
|
|
|
37
37
|
const plotPerItems = computed(()=>{
|
|
38
|
-
return getEnumEntries(PlotPer).map((f)=>{
|
|
38
|
+
return getEnumEntries(PlotPer).filter(f=>f.value != PlotPer.None).map((f)=>{
|
|
39
39
|
return {
|
|
40
40
|
id: f.value,
|
|
41
41
|
label: plotPerLabel(f.value)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSSelectField
|
|
3
|
-
:items="
|
|
3
|
+
:items="entityTypes"
|
|
4
4
|
:clearable="false"
|
|
5
5
|
:modelValue="$props.modelValue"
|
|
6
6
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
@@ -13,20 +13,20 @@ import type { PropType} from "vue";
|
|
|
13
13
|
import { computed, defineComponent } from "vue";
|
|
14
14
|
|
|
15
15
|
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
16
|
-
import {
|
|
16
|
+
import { EntityType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
17
17
|
|
|
18
18
|
import FSSelectField from "@dative-gpi/foundation-shared-components/components/fields/FSSelectField.vue";
|
|
19
19
|
|
|
20
20
|
export default defineComponent({
|
|
21
|
-
name: "
|
|
21
|
+
name: "FSSelectEntityType",
|
|
22
22
|
components: {
|
|
23
23
|
FSSelectField
|
|
24
24
|
},
|
|
25
25
|
props: {
|
|
26
26
|
modelValue: {
|
|
27
|
-
type: Number as PropType<
|
|
27
|
+
type: Number as PropType<EntityType>,
|
|
28
28
|
required: false,
|
|
29
|
-
default:
|
|
29
|
+
default: EntityType.Device
|
|
30
30
|
},
|
|
31
31
|
useNone: {
|
|
32
32
|
type: Boolean,
|
|
@@ -38,21 +38,21 @@ export default defineComponent({
|
|
|
38
38
|
setup(props) {
|
|
39
39
|
const { $tr } = useTranslationsProvider();
|
|
40
40
|
|
|
41
|
-
const
|
|
41
|
+
const entityTypes = computed((): { id: EntityType; label: string }[] => {
|
|
42
42
|
const items = [
|
|
43
|
-
{ id:
|
|
44
|
-
{ id:
|
|
45
|
-
{ id:
|
|
46
|
-
{ id:
|
|
43
|
+
{ id: EntityType.Model, label: $tr("ui.entity-type.models", "Models") },
|
|
44
|
+
{ id: EntityType.Device, label: $tr("ui.entity-type.devices", "Devices") },
|
|
45
|
+
{ id: EntityType.Group, label: $tr("ui.entity-type.groups", "Groups") },
|
|
46
|
+
{ id: EntityType.Location, label: $tr("ui.entity-type.locations", "Locations") }
|
|
47
47
|
];
|
|
48
48
|
if (props.useNone) {
|
|
49
|
-
items.unshift({ id:
|
|
49
|
+
items.unshift({ id: EntityType.None, label: $tr("ui.entity-type.none", "None") });
|
|
50
50
|
}
|
|
51
51
|
return items;
|
|
52
52
|
});
|
|
53
53
|
|
|
54
54
|
return {
|
|
55
|
-
|
|
55
|
+
entityTypes
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<FSAutocompleteField
|
|
3
3
|
:label="label ?? $tr('ui.common.serie-type','Serie type')"
|
|
4
4
|
:items="serieTypeItems"
|
|
5
5
|
:modelValue="modelValue"
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
<script lang="ts">
|
|
12
12
|
import { computed, defineComponent, type PropType } from "vue";
|
|
13
13
|
|
|
14
|
-
import {SerieType} from "@dative-gpi/foundation-
|
|
14
|
+
import {SerieType} from "@dative-gpi/foundation-shared-domain/enums";
|
|
15
15
|
|
|
16
|
-
import
|
|
16
|
+
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
17
17
|
|
|
18
18
|
import {serieTypeLabel, getEnumEntries} from "../../utils";
|
|
19
19
|
|
|
20
20
|
export default defineComponent({
|
|
21
21
|
components: {
|
|
22
|
-
|
|
22
|
+
FSAutocompleteField
|
|
23
23
|
},
|
|
24
24
|
props: {
|
|
25
25
|
modelValue: {
|
|
@@ -35,7 +35,7 @@ export default defineComponent({
|
|
|
35
35
|
setup() {
|
|
36
36
|
|
|
37
37
|
const serieTypeItems = computed(()=>{
|
|
38
|
-
return getEnumEntries(SerieType).map((f)=>{
|
|
38
|
+
return getEnumEntries(SerieType).filter(f=>f.value != SerieType.None).map((f)=>{
|
|
39
39
|
return {
|
|
40
40
|
id: f.value,
|
|
41
41
|
label: serieTypeLabel(f.value)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
v-if="getting"
|
|
4
4
|
:editable="$props.editable"
|
|
5
5
|
:modelValue="$props.modelValue"
|
|
6
|
-
@update:modelValue="
|
|
6
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
7
|
/>
|
|
8
8
|
<FSDeviceOrganisationTileUI
|
|
9
9
|
v-else-if="entity"
|
|
@@ -16,8 +16,9 @@
|
|
|
16
16
|
:modelStatuses="entity.modelStatuses"
|
|
17
17
|
:deviceStatuses="entity.status?.statuses"
|
|
18
18
|
:editable="$props.editable"
|
|
19
|
+
:alertTo="$props.alertTo"
|
|
19
20
|
:modelValue="$props.modelValue"
|
|
20
|
-
@update:modelValue="
|
|
21
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
21
22
|
v-bind="$attrs"
|
|
22
23
|
/>
|
|
23
24
|
</template>
|
|
@@ -50,8 +51,14 @@ export default defineComponent({
|
|
|
50
51
|
type: Boolean,
|
|
51
52
|
required: false,
|
|
52
53
|
default: true
|
|
54
|
+
},
|
|
55
|
+
alertTo: {
|
|
56
|
+
type: Function,
|
|
57
|
+
required: false,
|
|
58
|
+
default: null
|
|
53
59
|
}
|
|
54
60
|
},
|
|
61
|
+
emits: ["update:modelValue"],
|
|
55
62
|
setup(props) {
|
|
56
63
|
const { get, getting, entity } = useDeviceOrganisation();
|
|
57
64
|
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSLoadTile
|
|
3
|
+
v-if="getting"
|
|
4
|
+
:editable="$props.editable"
|
|
5
|
+
:modelValue="modelValue"
|
|
6
|
+
@update:modelValue="(value) => $emit('update:modelValue', value)"
|
|
7
|
+
/>
|
|
8
|
+
<FSLocationTileUI
|
|
9
|
+
v-else-if="entity"
|
|
10
|
+
:icon="entity.icon"
|
|
11
|
+
:label="entity.label"
|
|
12
|
+
:code="entity.code"
|
|
13
|
+
:color="entity.color"
|
|
14
|
+
:deviceCount="entity.deviceOrganisationsCount"
|
|
15
|
+
:editable="$props.editable"
|
|
16
|
+
:modelValue="modelValue"
|
|
17
|
+
@update:modelValue="(value) => $emit('update:modelValue', value)"
|
|
18
|
+
v-bind="$attrs"
|
|
19
|
+
/>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script lang="ts">
|
|
23
|
+
import { defineComponent, watch } from "vue";
|
|
24
|
+
|
|
25
|
+
import { useLocation } from "@dative-gpi/foundation-core-services/composables";
|
|
26
|
+
|
|
27
|
+
import FSLocationTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSLocationTileUI.vue";
|
|
28
|
+
import FSLoadTile from "@dative-gpi/foundation-shared-components/components/tiles/FSLoadTile.vue";
|
|
29
|
+
|
|
30
|
+
export default defineComponent({
|
|
31
|
+
name: "FSLocationTile",
|
|
32
|
+
components: {
|
|
33
|
+
FSLocationTileUI,
|
|
34
|
+
FSLoadTile
|
|
35
|
+
},
|
|
36
|
+
props: {
|
|
37
|
+
locationId: {
|
|
38
|
+
type: String,
|
|
39
|
+
required: true
|
|
40
|
+
},
|
|
41
|
+
modelValue: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
required: false,
|
|
44
|
+
default: false
|
|
45
|
+
},
|
|
46
|
+
editable: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
required: false,
|
|
49
|
+
default: true
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
setup(props) {
|
|
53
|
+
const { get, getting, entity } = useLocation();
|
|
54
|
+
|
|
55
|
+
watch(() => props.locationId, () => {
|
|
56
|
+
get(props.locationId);
|
|
57
|
+
}, { immediate: true });
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
getting,
|
|
61
|
+
entity
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
</script>
|