@dative-gpi/foundation-core-components 0.1.120 → 1.0.1
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 +208 -0
- package/components/autocompletes/FSAutocompleteDashboard.vue +33 -37
- package/components/autocompletes/FSAutocompleteDashboardOrganisation.vue +115 -0
- package/components/autocompletes/FSAutocompleteDataCategory.vue +16 -25
- package/components/autocompletes/FSAutocompleteDataDefinition.vue +17 -26
- package/components/autocompletes/FSAutocompleteGroup.vue +18 -27
- package/components/autocompletes/FSAutocompleteLocation.vue +22 -31
- package/components/autocompletes/FSAutocompleteManufacturer.vue +8 -8
- package/components/autocompletes/FSAutocompleteModel.vue +4 -4
- package/components/autocompletes/FSAutocompleteOrganisationType.vue +4 -4
- package/components/autocompletes/FSAutocompleteRole.vue +30 -34
- package/components/autocompletes/FSAutocompleteUserOrganisation.vue +20 -34
- package/components/customProperties/FSMetaField.vue +139 -107
- package/components/customProperties/FSMetaFormContent.vue +3 -2
- package/components/customProperties/FSMetaGrid.vue +4 -3
- package/components/customProperties/FSMetaHistory.vue +3 -2
- package/components/customProperties/FSMetaValue.vue +4 -2
- package/components/customProperties/helpers.ts +2 -1
- package/components/lists/FSDataTable.vue +48 -133
- package/components/selects/FSAggregationSelector.vue +51 -0
- package/components/selects/FSAxisTypeSelector.vue +48 -0
- package/components/selects/FSDataCategorySelector.vue +62 -0
- package/components/selects/FSDataDefinitionSelector.vue +66 -0
- package/components/selects/FSDisplayAsSelector.vue +52 -0
- package/components/selects/FSFilterTypeSelector.vue +53 -0
- package/components/selects/FSHeatmapRuleSelector.vue +52 -0
- package/components/selects/FSModelSelector.vue +56 -0
- package/components/selects/FSOperationOnSelector.vue +51 -0
- package/components/selects/FSPlanningTypeSelector.vue +50 -0
- package/components/selects/FSPlotPerSelector.vue +51 -0
- package/components/selects/FSSelectSelectedEntities.vue +59 -0
- package/components/selects/FSSerieTypeSelector.vue +51 -0
- package/components/tiles/FSDashboardOrganisationTile.vue +3 -2
- package/components/tiles/FSDashboardOrganisationTypeTile.vue +3 -2
- package/components/tiles/FSDashboardShallowTile.vue +4 -3
- package/components/tiles/FSFolderTile.vue +2 -1
- package/components/tiles/FSServiceAccountOrganisationTile.vue +68 -0
- package/components/tiles/FSUserOrganisationTile.vue +19 -21
- package/components/treeviews/FSTreeViewFolder.vue +77 -0
- package/components/treeviews/FSTreeViewGroup.vue +77 -0
- package/package.json +14 -12
- package/utils/charts.ts +136 -0
- package/utils/dashboards.ts +6 -5
- package/utils/index.ts +1 -0
- package/utils/roles.ts +2 -1
- package/utils/users.ts +11 -2
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSSelectField
|
|
3
|
+
:label="label ?? $tr('ui.common.aggregation-type','Aggregation')"
|
|
4
|
+
:items="aggregationTypeItems"
|
|
5
|
+
:modelValue="modelValue"
|
|
6
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
13
|
+
|
|
14
|
+
import {AggregationType} from "@dative-gpi/foundation-core-domain/models";
|
|
15
|
+
|
|
16
|
+
import {aggregationTypeLabel, getEnumEntries} from "../../utils";
|
|
17
|
+
|
|
18
|
+
import FSSelectField from "@dative-gpi/foundation-shared-components/components/fields/FSSelectField.vue";
|
|
19
|
+
|
|
20
|
+
export default defineComponent({
|
|
21
|
+
components: {
|
|
22
|
+
FSSelectField
|
|
23
|
+
},
|
|
24
|
+
props: {
|
|
25
|
+
modelValue : {
|
|
26
|
+
type: Number as PropType<AggregationType>,
|
|
27
|
+
required: false
|
|
28
|
+
},
|
|
29
|
+
label : {
|
|
30
|
+
type: String,
|
|
31
|
+
required: false
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
emits: ['update:modelValue'],
|
|
35
|
+
setup() {
|
|
36
|
+
|
|
37
|
+
const aggregationTypeItems = computed(()=>{
|
|
38
|
+
return getEnumEntries(AggregationType).map((f)=>{
|
|
39
|
+
return {
|
|
40
|
+
id: f.value,
|
|
41
|
+
label: aggregationTypeLabel(f.value)
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
return {
|
|
47
|
+
aggregationTypeItems
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
</script>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSToggleSet
|
|
3
|
+
:hideHeader="true"
|
|
4
|
+
:values="axisTypeItems"
|
|
5
|
+
:modelValue="modelValue"
|
|
6
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
13
|
+
|
|
14
|
+
import {AxisType} from "@dative-gpi/foundation-core-domain/models";
|
|
15
|
+
|
|
16
|
+
import {axisTypeLabel, getEnumEntries} from "../../utils";
|
|
17
|
+
|
|
18
|
+
import FSToggleSet from "@dative-gpi/foundation-shared-components/components/FSToggleSet.vue";
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
export default defineComponent({
|
|
22
|
+
components: {
|
|
23
|
+
FSToggleSet
|
|
24
|
+
},
|
|
25
|
+
props: {
|
|
26
|
+
modelValue: {
|
|
27
|
+
type: Number as PropType<AxisType>,
|
|
28
|
+
required: false
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
emits: ['update:modelValue'],
|
|
32
|
+
setup() {
|
|
33
|
+
|
|
34
|
+
const axisTypeItems = computed(()=>{
|
|
35
|
+
return getEnumEntries(AxisType).map((f)=>{
|
|
36
|
+
return {
|
|
37
|
+
id: f.value,
|
|
38
|
+
label: axisTypeLabel(f.value)
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
return {
|
|
44
|
+
axisTypeItems
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
})
|
|
48
|
+
</script>
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSAutocompleteField
|
|
3
|
+
:label="label ?? $tr('ui.common.data-category', 'Data category')"
|
|
4
|
+
:items="toggleDataCategories"
|
|
5
|
+
:modelValue="modelValue"
|
|
6
|
+
:toggleSet="toggleDataCategories.length < 5"
|
|
7
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
8
|
+
v-bind="$attrs"
|
|
9
|
+
/>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script lang="ts">
|
|
13
|
+
import { computed, defineComponent, watch } from "vue";
|
|
14
|
+
|
|
15
|
+
import {useDataCategories} from "@dative-gpi/foundation-core-services/composables";
|
|
16
|
+
|
|
17
|
+
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
18
|
+
|
|
19
|
+
export default defineComponent({
|
|
20
|
+
components: {
|
|
21
|
+
FSAutocompleteField
|
|
22
|
+
},
|
|
23
|
+
props:{
|
|
24
|
+
modelValue: {
|
|
25
|
+
type: String,
|
|
26
|
+
required: false
|
|
27
|
+
},
|
|
28
|
+
modelId: {
|
|
29
|
+
type: String,
|
|
30
|
+
required: false,
|
|
31
|
+
},
|
|
32
|
+
label: {
|
|
33
|
+
type: String,
|
|
34
|
+
required: false
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
emits: ['update:modelValue'],
|
|
38
|
+
setup(props) {
|
|
39
|
+
const {getMany : fetchdataCategories, entities : dataCategories} = useDataCategories()
|
|
40
|
+
|
|
41
|
+
const toggleDataCategories = computed(()=>{
|
|
42
|
+
return dataCategories.value.map((d) => {
|
|
43
|
+
return {
|
|
44
|
+
id: d.id,
|
|
45
|
+
label: d.label
|
|
46
|
+
}
|
|
47
|
+
})
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
watch(() => props.modelId, () => {
|
|
51
|
+
fetchdataCategories({modelId: props.modelId})
|
|
52
|
+
}, {immediate: true})
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
return {
|
|
56
|
+
toggleDataCategories,
|
|
57
|
+
dataCategories
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
</script>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSAutocompleteField
|
|
3
|
+
:label="label ?? $tr('ui.common.data-definition', 'Data')"
|
|
4
|
+
:items="toggleDataDefinitions"
|
|
5
|
+
:modelValue="modelValue"
|
|
6
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import { computed, defineComponent, watch } from "vue";
|
|
13
|
+
|
|
14
|
+
import {useDataDefinitions} from "@dative-gpi/foundation-core-services/composables";
|
|
15
|
+
|
|
16
|
+
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
17
|
+
|
|
18
|
+
export default defineComponent({
|
|
19
|
+
components: {
|
|
20
|
+
FSAutocompleteField
|
|
21
|
+
},
|
|
22
|
+
props:{
|
|
23
|
+
modelValue: {
|
|
24
|
+
type: String,
|
|
25
|
+
required: false
|
|
26
|
+
},
|
|
27
|
+
modelId: {
|
|
28
|
+
type: String,
|
|
29
|
+
required: false,
|
|
30
|
+
},
|
|
31
|
+
dataCategoryId: {
|
|
32
|
+
type: String,
|
|
33
|
+
required: false,
|
|
34
|
+
},
|
|
35
|
+
label: {
|
|
36
|
+
type: String,
|
|
37
|
+
required: false
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
},
|
|
41
|
+
emits: ['update:modelValue'],
|
|
42
|
+
setup(props) {
|
|
43
|
+
|
|
44
|
+
const {getMany : fetchDataDefinitions, entities : dataDefinitions} = useDataDefinitions()
|
|
45
|
+
|
|
46
|
+
const toggleDataDefinitions = computed(()=>{
|
|
47
|
+
return dataDefinitions.value.map((d) => {
|
|
48
|
+
return {
|
|
49
|
+
id: d.id,
|
|
50
|
+
label: d.label
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
watch(() => [props.modelId, props.dataCategoryId], async () => {
|
|
56
|
+
await fetchDataDefinitions({modelsIds: props.modelId ? [props.modelId] : undefined, dataCategoryId: props.dataCategoryId})
|
|
57
|
+
}, {immediate: true})
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
toggleDataDefinitions,
|
|
61
|
+
dataDefinitions
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
</script>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSSelectField
|
|
3
|
+
:label="label ?? $tr('ui.common.display-as','Display as')"
|
|
4
|
+
:items="displayAsItems"
|
|
5
|
+
:modelValue="modelValue"
|
|
6
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
13
|
+
|
|
14
|
+
import {DisplayAs} from "@dative-gpi/foundation-core-domain/models";
|
|
15
|
+
|
|
16
|
+
import FSSelectField from "@dative-gpi/foundation-shared-components/components/fields/FSSelectField.vue";
|
|
17
|
+
|
|
18
|
+
import {displayAsLabel, getEnumEntries} from "../../utils";
|
|
19
|
+
|
|
20
|
+
export default defineComponent({
|
|
21
|
+
components: {
|
|
22
|
+
FSSelectField
|
|
23
|
+
},
|
|
24
|
+
props: {
|
|
25
|
+
modelValue: {
|
|
26
|
+
type: Number as PropType<DisplayAs>,
|
|
27
|
+
required: false
|
|
28
|
+
},
|
|
29
|
+
label: {
|
|
30
|
+
type: String,
|
|
31
|
+
required: false
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
},
|
|
35
|
+
emits: ['update:modelValue'],
|
|
36
|
+
setup() {
|
|
37
|
+
|
|
38
|
+
const displayAsItems = computed(()=>{
|
|
39
|
+
return getEnumEntries(DisplayAs).map((f)=>{
|
|
40
|
+
return {
|
|
41
|
+
id: f.value,
|
|
42
|
+
label: displayAsLabel(f.value)
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
return {
|
|
48
|
+
displayAsItems,
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
</script>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSAutocompleteField
|
|
3
|
+
:label="label ?? $tr('ui.common.filter-type','Filter type')"
|
|
4
|
+
:toggleSet="true"
|
|
5
|
+
:items="filterTypeItems"
|
|
6
|
+
:modelValue="modelValue"
|
|
7
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
8
|
+
v-bind="$attrs"
|
|
9
|
+
/>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script lang="ts">
|
|
13
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
14
|
+
|
|
15
|
+
import {FilterType} from "@dative-gpi/foundation-core-domain/models";
|
|
16
|
+
|
|
17
|
+
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
18
|
+
|
|
19
|
+
import {filterTypeLabel, getEnumEntries} from "../../utils";
|
|
20
|
+
|
|
21
|
+
export default defineComponent({
|
|
22
|
+
components: {
|
|
23
|
+
FSAutocompleteField
|
|
24
|
+
},
|
|
25
|
+
props: {
|
|
26
|
+
modelValue: {
|
|
27
|
+
type: Number as PropType<FilterType>,
|
|
28
|
+
required: false,
|
|
29
|
+
default : FilterType.None
|
|
30
|
+
},
|
|
31
|
+
label: {
|
|
32
|
+
type: String,
|
|
33
|
+
required: false
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
emits: ['update:modelValue'],
|
|
37
|
+
setup() {
|
|
38
|
+
|
|
39
|
+
const filterTypeItems = computed(()=>{
|
|
40
|
+
return getEnumEntries(FilterType).map((f)=>{
|
|
41
|
+
return {
|
|
42
|
+
id: f.value,
|
|
43
|
+
label: filterTypeLabel(f.value)
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
return {
|
|
49
|
+
filterTypeItems
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
</script>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSSelectField
|
|
3
|
+
:label="label ?? $tr('ui.common.heat-rule','Heat rule')"
|
|
4
|
+
:items="heatmapRuleItems"
|
|
5
|
+
:modelValue="modelValue"
|
|
6
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
13
|
+
|
|
14
|
+
import {HeatmapRule} from "@dative-gpi/foundation-core-domain/models";
|
|
15
|
+
|
|
16
|
+
import FSSelectField from "@dative-gpi/foundation-shared-components/components/fields/FSSelectField.vue";
|
|
17
|
+
|
|
18
|
+
import {heatmapRuleLabel, getEnumEntries} from "../../utils";
|
|
19
|
+
|
|
20
|
+
export default defineComponent({
|
|
21
|
+
components: {
|
|
22
|
+
FSSelectField
|
|
23
|
+
},
|
|
24
|
+
props: {
|
|
25
|
+
modelValue: {
|
|
26
|
+
type: Number as PropType<HeatmapRule>,
|
|
27
|
+
required: false
|
|
28
|
+
},
|
|
29
|
+
label: {
|
|
30
|
+
type: String,
|
|
31
|
+
required: false
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
},
|
|
35
|
+
emits: ['update:modelValue'],
|
|
36
|
+
setup() {
|
|
37
|
+
|
|
38
|
+
const heatmapRuleItems = computed(()=>{
|
|
39
|
+
return getEnumEntries(HeatmapRule).map((f)=>{
|
|
40
|
+
return {
|
|
41
|
+
id: f.value,
|
|
42
|
+
label: heatmapRuleLabel(f.value)
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
return {
|
|
48
|
+
heatmapRuleItems
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
</script>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSAutocompleteField
|
|
3
|
+
:label="label ?? $tr('ui.common.model', 'Model')"
|
|
4
|
+
:items="modelItems"
|
|
5
|
+
:toggleSet="modelItems.length < 5"
|
|
6
|
+
:modelValue="modelValue"
|
|
7
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
8
|
+
v-bind="$attrs"
|
|
9
|
+
/>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script lang="ts">
|
|
13
|
+
import { computed, defineComponent, onMounted } from "vue";
|
|
14
|
+
|
|
15
|
+
import {useModels} from "@dative-gpi/foundation-core-services/composables";
|
|
16
|
+
|
|
17
|
+
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
18
|
+
|
|
19
|
+
export default defineComponent({
|
|
20
|
+
components: {
|
|
21
|
+
FSAutocompleteField
|
|
22
|
+
},
|
|
23
|
+
props:{
|
|
24
|
+
modelValue: {
|
|
25
|
+
type: String,
|
|
26
|
+
required: false
|
|
27
|
+
},
|
|
28
|
+
label: {
|
|
29
|
+
type: String,
|
|
30
|
+
required: false
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
emits: ['update:modelValue'],
|
|
34
|
+
setup(){
|
|
35
|
+
const {getMany : fetchModels, entities : models} = useModels()
|
|
36
|
+
|
|
37
|
+
const modelItems = computed(()=>{
|
|
38
|
+
return models.value.map((d) => {
|
|
39
|
+
return {
|
|
40
|
+
id: d.id,
|
|
41
|
+
label: d.label
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
})
|
|
45
|
+
|
|
46
|
+
onMounted(() => {
|
|
47
|
+
fetchModels()
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
return {
|
|
51
|
+
modelItems,
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
</script>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSSelectField
|
|
3
|
+
:label="label ?? $tr('ui.common.operation-on','Operation on')"
|
|
4
|
+
:items="operationOnItems"
|
|
5
|
+
:modelValue="modelValue"
|
|
6
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
13
|
+
|
|
14
|
+
import {OperationOn} from "@dative-gpi/foundation-core-domain/models";
|
|
15
|
+
|
|
16
|
+
import FSSelectField from "@dative-gpi/foundation-shared-components/components/fields/FSSelectField.vue";
|
|
17
|
+
|
|
18
|
+
import {operationOnLabel, getEnumEntries} from "../../utils";
|
|
19
|
+
|
|
20
|
+
export default defineComponent({
|
|
21
|
+
components: {
|
|
22
|
+
FSSelectField
|
|
23
|
+
},
|
|
24
|
+
props: {
|
|
25
|
+
modelValue: {
|
|
26
|
+
type: Number as PropType<OperationOn>,
|
|
27
|
+
required: false
|
|
28
|
+
},
|
|
29
|
+
label : {
|
|
30
|
+
type: String,
|
|
31
|
+
required: false
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
emits: ['update:modelValue'],
|
|
35
|
+
setup() {
|
|
36
|
+
|
|
37
|
+
const operationOnItems = computed(()=>{
|
|
38
|
+
return getEnumEntries(OperationOn).map((f)=>{
|
|
39
|
+
return {
|
|
40
|
+
id: f.value,
|
|
41
|
+
label: operationOnLabel(f.value)
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
return {
|
|
47
|
+
operationOnItems
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
</script>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSSelectField
|
|
3
|
+
:label="label ?? $tr('ui.common.planning-type','Planning type')"
|
|
4
|
+
:items="planningTypeItems"
|
|
5
|
+
:modelValue="modelValue"
|
|
6
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
+
/>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script lang="ts">
|
|
11
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
12
|
+
|
|
13
|
+
import {PlanningType} from "@dative-gpi/foundation-core-domain/models";
|
|
14
|
+
|
|
15
|
+
import FSSelectField from "@dative-gpi/foundation-shared-components/components/fields/FSSelectField.vue";
|
|
16
|
+
|
|
17
|
+
import {planningTypeLabel, getEnumEntries} from "../../utils";
|
|
18
|
+
|
|
19
|
+
export default defineComponent({
|
|
20
|
+
components: {
|
|
21
|
+
FSSelectField
|
|
22
|
+
},
|
|
23
|
+
props: {
|
|
24
|
+
modelValue: {
|
|
25
|
+
type: Number as PropType<PlanningType>,
|
|
26
|
+
required: false
|
|
27
|
+
},
|
|
28
|
+
label: {
|
|
29
|
+
type: String,
|
|
30
|
+
required: false
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
emits: ['update:modelValue'],
|
|
34
|
+
setup() {
|
|
35
|
+
|
|
36
|
+
const planningTypeItems = computed(()=>{
|
|
37
|
+
return getEnumEntries(PlanningType).map((f)=>{
|
|
38
|
+
return {
|
|
39
|
+
id: f.value,
|
|
40
|
+
label: planningTypeLabel(f.value)
|
|
41
|
+
}
|
|
42
|
+
})
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
return {
|
|
46
|
+
planningTypeItems
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
</script>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSSelectField
|
|
3
|
+
:label="label ?? $tr('ui.common.plot-per','Plot per')"
|
|
4
|
+
:items="plotPerItems"
|
|
5
|
+
:modelValue="modelValue"
|
|
6
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
13
|
+
|
|
14
|
+
import {PlotPer} from "@dative-gpi/foundation-core-domain/models";
|
|
15
|
+
|
|
16
|
+
import FSSelectField from "@dative-gpi/foundation-shared-components/components/fields/FSSelectField.vue";
|
|
17
|
+
|
|
18
|
+
import {plotPerLabel, getEnumEntries} from "../../utils";
|
|
19
|
+
|
|
20
|
+
export default defineComponent({
|
|
21
|
+
components: {
|
|
22
|
+
FSSelectField
|
|
23
|
+
},
|
|
24
|
+
props: {
|
|
25
|
+
modelValue: {
|
|
26
|
+
type: Number as PropType<PlotPer>,
|
|
27
|
+
required: false
|
|
28
|
+
},
|
|
29
|
+
label: {
|
|
30
|
+
type: String,
|
|
31
|
+
required: false
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
emits: ['update:modelValue'],
|
|
35
|
+
setup() {
|
|
36
|
+
|
|
37
|
+
const plotPerItems = computed(()=>{
|
|
38
|
+
return getEnumEntries(PlotPer).map((f)=>{
|
|
39
|
+
return {
|
|
40
|
+
id: f.value,
|
|
41
|
+
label: plotPerLabel(f.value)
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
return {
|
|
47
|
+
plotPerItems
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
})
|
|
51
|
+
</script>
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSSelectField
|
|
3
|
+
:items="selectedEntities"
|
|
4
|
+
:clearable="false"
|
|
5
|
+
:modelValue="$props.modelValue"
|
|
6
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import type { PropType} from "vue";
|
|
13
|
+
import { computed, defineComponent } from "vue";
|
|
14
|
+
|
|
15
|
+
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
16
|
+
import { SelectedEntities } from "@dative-gpi/foundation-core-domain/models";
|
|
17
|
+
|
|
18
|
+
import FSSelectField from "@dative-gpi/foundation-shared-components/components/fields/FSSelectField.vue";
|
|
19
|
+
|
|
20
|
+
export default defineComponent({
|
|
21
|
+
name: "FSSelectSelectedEntities",
|
|
22
|
+
components: {
|
|
23
|
+
FSSelectField
|
|
24
|
+
},
|
|
25
|
+
props: {
|
|
26
|
+
modelValue: {
|
|
27
|
+
type: Number as PropType<SelectedEntities>,
|
|
28
|
+
required: false,
|
|
29
|
+
default: SelectedEntities.Devices
|
|
30
|
+
},
|
|
31
|
+
useNone: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
required: false,
|
|
34
|
+
default: false
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
emits: ["update:modelValue"],
|
|
38
|
+
setup(props) {
|
|
39
|
+
const { $tr } = useTranslationsProvider();
|
|
40
|
+
|
|
41
|
+
const selectedEntities = computed((): { id: SelectedEntities; label: string }[] => {
|
|
42
|
+
const items = [
|
|
43
|
+
{ id: SelectedEntities.Models, label: $tr("ui.selected-entities.models", "Models") },
|
|
44
|
+
{ id: SelectedEntities.Devices, label: $tr("ui.selected-entities.devices", "Devices") },
|
|
45
|
+
{ id: SelectedEntities.Groups, label: $tr("ui.selected-entities.groups", "Groups") },
|
|
46
|
+
{ id: SelectedEntities.Locations, label: $tr("ui.selected-entities.locations", "Locations") }
|
|
47
|
+
];
|
|
48
|
+
if (props.useNone) {
|
|
49
|
+
items.unshift({ id: SelectedEntities.None, label: $tr("ui.selected-entities.none", "None") });
|
|
50
|
+
}
|
|
51
|
+
return items;
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
return {
|
|
55
|
+
selectedEntities
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
</script>
|