@dative-gpi/foundation-core-components 1.0.58 → 1.0.61
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/entities/FSBaseEntitiesList.vue +2 -2
- package/components/entities/FSDialogSelectEntities.vue +55 -3
- package/components/explorers/FSBaseFoldersExplorer.vue +235 -0
- package/components/lists/FSDataTable.vue +3 -0
- package/components/lists/alerts/FSBaseAlertsList.vue +16 -7
- package/components/lists/deviceOrganisations/FSBaseDeviceOrganisationsList.vue +13 -3
- package/components/lists/folders/FSBaseFoldersList.vue +16 -136
- package/components/lists/groups/FSBaseGroupsList.vue +11 -4
- package/components/lists/locations/FSBaseLocationsList.vue +45 -9
- package/components/lists/models/FSBaseModelsList.vue +15 -9
- package/components/lists/roleOrganisationTypes/FSBaseRoleOrganisationTypesList.vue +15 -9
- package/components/lists/roleOrganisations/FSBaseRoleOrganisationsList.vue +15 -9
- package/components/lists/scenarioOrganisationTypes/FSBaseScenarioOrganisationTypesList.vue +15 -9
- package/components/lists/scenarioOrganisations/FSBaseScenarioOrganisationsList.vue +15 -9
- package/components/lists/scenarios/FSBaseScenariosList.vue +13 -7
- package/components/lists/serviceAccountOrganisations/FSBaseServiceAccountOrganisationsList.vue +21 -17
- package/components/lists/userOrganisations/FSBaseUserOrganisationsList.vue +18 -15
- package/components/tiles/FSDeviceOrganisationTile.vue +9 -2
- package/components/treeviews/FSTreeViewFolder.vue +15 -3
- package/components/treeviews/FSTreeViewGroup.vue +15 -3
- package/package.json +7 -7
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<FSDataTable
|
|
3
3
|
:loading="fetchingGroups"
|
|
4
4
|
:items="groups"
|
|
5
|
+
:showSelect="$props.editable"
|
|
5
6
|
:tableCode="$props.tableCode"
|
|
6
7
|
:modelValue="$props.modelValue"
|
|
7
8
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
#item.tile="{ item, toggleSelect }"
|
|
47
48
|
>
|
|
48
49
|
<FSGroupTileUI
|
|
50
|
+
:editable="$props.editable"
|
|
49
51
|
:modelValue="isSelected(item.id)"
|
|
50
52
|
@update:modelValue="toggleSelect(item)"
|
|
51
53
|
v-bind="item"
|
|
@@ -80,19 +82,24 @@ export default defineComponent({
|
|
|
80
82
|
FSTagGroup
|
|
81
83
|
},
|
|
82
84
|
props: {
|
|
85
|
+
tableCode: {
|
|
86
|
+
type: String,
|
|
87
|
+
required: true
|
|
88
|
+
},
|
|
83
89
|
groupsFilters: {
|
|
84
90
|
type: Object as PropType<GroupFilters>,
|
|
85
91
|
required: false,
|
|
86
92
|
default: null
|
|
87
93
|
},
|
|
94
|
+
editable: {
|
|
95
|
+
type: Boolean,
|
|
96
|
+
required: false,
|
|
97
|
+
default: true
|
|
98
|
+
},
|
|
88
99
|
modelValue: {
|
|
89
100
|
type: Array as PropType<string[]>,
|
|
90
101
|
required: false,
|
|
91
102
|
default: () => []
|
|
92
|
-
},
|
|
93
|
-
tableCode: {
|
|
94
|
-
type: String,
|
|
95
|
-
required: true
|
|
96
103
|
}
|
|
97
104
|
},
|
|
98
105
|
emits: ["update:modelValue"],
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSDataTable
|
|
3
|
-
mode="table"
|
|
4
3
|
:loading="fetchingLocations"
|
|
5
|
-
:disableIterator="true"
|
|
6
4
|
:items="locations"
|
|
5
|
+
:showSelect="$props.editable"
|
|
7
6
|
:tableCode="tableCode"
|
|
8
7
|
:modelValue="$props.modelValue"
|
|
9
8
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
@@ -25,36 +24,68 @@
|
|
|
25
24
|
{{ item.icon }}
|
|
26
25
|
</FSIcon>
|
|
27
26
|
</template>
|
|
27
|
+
|
|
28
|
+
<template
|
|
29
|
+
#item.tile="{ item, toggleSelect }"
|
|
30
|
+
>
|
|
31
|
+
<FSLocationTileUI
|
|
32
|
+
v-bind="item"
|
|
33
|
+
:bottomColor="item.colors"
|
|
34
|
+
:editable="true"
|
|
35
|
+
:singleSelect="singleSelect"
|
|
36
|
+
:modelValue="isSelected(item.id)"
|
|
37
|
+
:to="$props.itemTo && $props.itemTo(item)"
|
|
38
|
+
@update:modelValue="toggleSelect(item)"
|
|
39
|
+
/>
|
|
40
|
+
</template>
|
|
28
41
|
</FSDataTable>
|
|
29
42
|
</template>
|
|
30
43
|
|
|
31
44
|
<script lang="ts">
|
|
32
|
-
import { defineComponent, type PropType, watch } from "vue";
|
|
33
45
|
import _ from "lodash";
|
|
46
|
+
import type { RouteLocation } from "vue-router";
|
|
47
|
+
import { defineComponent, type PropType, watch } from "vue";
|
|
34
48
|
|
|
35
49
|
import { useLocations } from "@dative-gpi/foundation-core-services/composables";
|
|
36
|
-
import type { LocationFilters } from "@dative-gpi/foundation-core-domain/models";
|
|
50
|
+
import type { LocationFilters, LocationInfos } from "@dative-gpi/foundation-core-domain/models";
|
|
37
51
|
|
|
38
|
-
import FSDataTable from "../FSDataTable.vue";
|
|
39
52
|
import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
|
|
40
53
|
|
|
54
|
+
import FSDataTable from "../FSDataTable.vue";
|
|
55
|
+
import FSLocationTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSLocationTileUI.vue";
|
|
56
|
+
|
|
41
57
|
export default defineComponent({
|
|
42
|
-
name: "
|
|
58
|
+
name: "FSBaseLocationsList",
|
|
43
59
|
components: {
|
|
60
|
+
FSLocationTileUI,
|
|
44
61
|
FSDataTable,
|
|
45
62
|
FSIcon
|
|
46
63
|
},
|
|
47
64
|
props: {
|
|
48
|
-
|
|
65
|
+
locationsFilters: {
|
|
49
66
|
type: Object as PropType<LocationFilters>,
|
|
50
67
|
required: false,
|
|
51
68
|
default: null
|
|
52
69
|
},
|
|
70
|
+
editable: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
required: false,
|
|
73
|
+
default: true
|
|
74
|
+
},
|
|
53
75
|
modelValue: {
|
|
54
76
|
type: Array as PropType<string[]>,
|
|
55
77
|
default: () => [],
|
|
56
78
|
required: false
|
|
57
79
|
},
|
|
80
|
+
itemTo: {
|
|
81
|
+
type: Function as PropType<(item: LocationInfos) => Partial<RouteLocation>>,
|
|
82
|
+
required: false
|
|
83
|
+
},
|
|
84
|
+
singleSelect: {
|
|
85
|
+
type: Boolean,
|
|
86
|
+
required: false,
|
|
87
|
+
default: false
|
|
88
|
+
},
|
|
58
89
|
tableCode: {
|
|
59
90
|
type: String,
|
|
60
91
|
required: true
|
|
@@ -64,14 +95,19 @@ export default defineComponent({
|
|
|
64
95
|
setup(props) {
|
|
65
96
|
const { getMany: fetchLocations, fetching: fetchingLocations, entities: locations } = useLocations();
|
|
66
97
|
|
|
67
|
-
watch(() => props.
|
|
98
|
+
watch(() => props.locationsFilters, (next, previous) => {
|
|
68
99
|
if ((!next && !previous) || !_.isEqual(next, previous)) {
|
|
69
|
-
fetchLocations(props.
|
|
100
|
+
fetchLocations(props.locationsFilters);
|
|
70
101
|
}
|
|
71
102
|
}, { immediate: true });
|
|
72
103
|
|
|
104
|
+
const isSelected = (id: string) => {
|
|
105
|
+
return props.modelValue?.includes(id);
|
|
106
|
+
};
|
|
107
|
+
|
|
73
108
|
return {
|
|
74
109
|
fetchingLocations,
|
|
110
|
+
isSelected,
|
|
75
111
|
locations
|
|
76
112
|
};
|
|
77
113
|
}
|
|
@@ -48,27 +48,29 @@
|
|
|
48
48
|
/>
|
|
49
49
|
</template>
|
|
50
50
|
<template
|
|
51
|
-
#item.tile="{ item }"
|
|
51
|
+
#item.tile="{ item, toggleSelect }"
|
|
52
52
|
>
|
|
53
53
|
<FSModelTileUI
|
|
54
|
+
v-bind="item"
|
|
54
55
|
:imageId="item.imageId"
|
|
55
56
|
:label="item.label"
|
|
56
|
-
:
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
:modelValue="isSelected(item.id)"
|
|
58
|
+
:to="$props.itemTo && $props.itemTo(item)"
|
|
59
|
+
@update:modelValue="toggleSelect(item)"
|
|
59
60
|
/>
|
|
60
61
|
</template>
|
|
61
62
|
</FSDataTable>
|
|
62
63
|
</template>
|
|
63
64
|
|
|
64
65
|
<script lang="ts">
|
|
65
|
-
import { defineComponent, type PropType, watch } from "vue";
|
|
66
66
|
import _ from "lodash";
|
|
67
|
+
import type { RouteLocation } from "vue-router";
|
|
68
|
+
import { defineComponent, type PropType, watch } from "vue";
|
|
67
69
|
|
|
68
70
|
import {ColorEnum} from "@dative-gpi/foundation-shared-components/models";
|
|
69
71
|
|
|
70
72
|
import { useModels } from "@dative-gpi/foundation-core-services/composables";
|
|
71
|
-
import type { ModelFilters } from "@dative-gpi/foundation-core-domain/models";
|
|
73
|
+
import type { ModelFilters, ModelInfos } from "@dative-gpi/foundation-core-domain/models";
|
|
72
74
|
|
|
73
75
|
import FSDataTable from "../FSDataTable.vue";
|
|
74
76
|
import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
|
|
@@ -86,7 +88,7 @@ export default defineComponent({
|
|
|
86
88
|
FSIcon,
|
|
87
89
|
},
|
|
88
90
|
props: {
|
|
89
|
-
|
|
91
|
+
modelsFilters: {
|
|
90
92
|
type: Object as PropType<ModelFilters>,
|
|
91
93
|
required: false,
|
|
92
94
|
default: null
|
|
@@ -96,6 +98,10 @@ export default defineComponent({
|
|
|
96
98
|
default: () => [],
|
|
97
99
|
required: false
|
|
98
100
|
},
|
|
101
|
+
itemTo: {
|
|
102
|
+
type: Function as PropType<(item: ModelInfos) => Partial<RouteLocation>>,
|
|
103
|
+
required: false
|
|
104
|
+
},
|
|
99
105
|
tableCode: {
|
|
100
106
|
type: String,
|
|
101
107
|
required: true
|
|
@@ -109,9 +115,9 @@ export default defineComponent({
|
|
|
109
115
|
return props.modelValue.includes(id);
|
|
110
116
|
};
|
|
111
117
|
|
|
112
|
-
watch(() => props.
|
|
118
|
+
watch(() => props.modelsFilters, (next, previous) => {
|
|
113
119
|
if ((!next && !previous) || !_.isEqual(next, previous)) {
|
|
114
|
-
fetchModels(props.
|
|
120
|
+
fetchModels(props.modelsFilters);
|
|
115
121
|
}
|
|
116
122
|
}, { immediate: true });
|
|
117
123
|
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
:items="roleOrganisationTypes"
|
|
4
4
|
:itemTo="$props.itemTo"
|
|
5
5
|
:loading="fetchingRoleOrganisations"
|
|
6
|
+
:showSelect="$props.editable"
|
|
6
7
|
:tableCode="$props.tableCode"
|
|
7
8
|
:modelValue="$props.modelValue"
|
|
8
9
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
@@ -76,24 +77,29 @@ export default defineComponent({
|
|
|
76
77
|
FSDataTable,
|
|
77
78
|
},
|
|
78
79
|
props: {
|
|
80
|
+
tableCode: {
|
|
81
|
+
type: String,
|
|
82
|
+
required: true
|
|
83
|
+
},
|
|
79
84
|
roleOrganisationTypesFilters: {
|
|
80
85
|
type: Object as PropType<RoleOrganisationTypeFilters | null>,
|
|
81
86
|
required: false,
|
|
82
87
|
default: null
|
|
83
88
|
},
|
|
84
|
-
modelValue: {
|
|
85
|
-
type: Array as PropType<string[]>,
|
|
86
|
-
required: false,
|
|
87
|
-
default: () => []
|
|
88
|
-
},
|
|
89
|
-
tableCode: {
|
|
90
|
-
type: String,
|
|
91
|
-
required: true
|
|
92
|
-
},
|
|
93
89
|
itemTo: {
|
|
94
90
|
type: Function as PropType<(item: RoleOrganisationTypeInfos) => Partial<RouteLocation>>,
|
|
95
91
|
required: false
|
|
96
92
|
},
|
|
93
|
+
editable: {
|
|
94
|
+
type: Boolean,
|
|
95
|
+
required: false,
|
|
96
|
+
default: true
|
|
97
|
+
},
|
|
98
|
+
modelValue: {
|
|
99
|
+
type: Array as PropType<string[]>,
|
|
100
|
+
required: false,
|
|
101
|
+
default: () => []
|
|
102
|
+
}
|
|
97
103
|
},
|
|
98
104
|
emits: ["update:modelValue"],
|
|
99
105
|
setup(props) {
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
:items="roleOrganisations"
|
|
4
4
|
:itemTo="$props.itemTo"
|
|
5
5
|
:loading="fetchingRoleOrganisations"
|
|
6
|
+
:showSelect="$props.editable"
|
|
6
7
|
:tableCode="$props.tableCode"
|
|
7
8
|
:modelValue="$props.modelValue"
|
|
8
9
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
@@ -76,24 +77,29 @@ export default defineComponent({
|
|
|
76
77
|
FSTagGroup
|
|
77
78
|
},
|
|
78
79
|
props: {
|
|
80
|
+
tableCode: {
|
|
81
|
+
type: String,
|
|
82
|
+
required: true
|
|
83
|
+
},
|
|
79
84
|
roleOrganisationsFilters: {
|
|
80
85
|
type: Object as PropType<RoleOrganisationFilters | null>,
|
|
81
86
|
required: false,
|
|
82
87
|
default: null
|
|
83
88
|
},
|
|
84
|
-
modelValue: {
|
|
85
|
-
type: Array as PropType<string[]>,
|
|
86
|
-
required: false,
|
|
87
|
-
default: () => []
|
|
88
|
-
},
|
|
89
|
-
tableCode: {
|
|
90
|
-
type: String,
|
|
91
|
-
required: true
|
|
92
|
-
},
|
|
93
89
|
itemTo: {
|
|
94
90
|
type: Function as PropType<(item: RoleOrganisationInfos) => Partial<RouteLocation>>,
|
|
95
91
|
required: false
|
|
96
92
|
},
|
|
93
|
+
editable: {
|
|
94
|
+
type: Boolean,
|
|
95
|
+
required: false,
|
|
96
|
+
default: true
|
|
97
|
+
},
|
|
98
|
+
modelValue: {
|
|
99
|
+
type: Array as PropType<string[]>,
|
|
100
|
+
required: false,
|
|
101
|
+
default: () => []
|
|
102
|
+
}
|
|
97
103
|
},
|
|
98
104
|
emits: ["update:modelValue"],
|
|
99
105
|
setup(props) {
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
:items="scenarioOrganisationTypes"
|
|
4
4
|
:itemTo="$props.itemTo"
|
|
5
5
|
:loading="fetchingScenarioOrganisationTypes"
|
|
6
|
-
:
|
|
6
|
+
:showSelect="$props.editable"
|
|
7
7
|
:tableCode="$props.tableCode"
|
|
8
|
+
:modelValue="$props.modelValue"
|
|
8
9
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
9
10
|
v-bind="$attrs"
|
|
10
11
|
>
|
|
@@ -71,24 +72,29 @@ export default defineComponent({
|
|
|
71
72
|
FSTagGroup
|
|
72
73
|
},
|
|
73
74
|
props: {
|
|
74
|
-
|
|
75
|
-
type:
|
|
76
|
-
|
|
77
|
-
required: false
|
|
75
|
+
tableCode: {
|
|
76
|
+
type: String,
|
|
77
|
+
required: true
|
|
78
78
|
},
|
|
79
79
|
scenarioOrganisationTypeFilters: {
|
|
80
80
|
type: Object as PropType<ScenarioOrganisationTypeFilters>,
|
|
81
81
|
required: false,
|
|
82
82
|
default: null
|
|
83
83
|
},
|
|
84
|
-
tableCode: {
|
|
85
|
-
type: String,
|
|
86
|
-
required: true
|
|
87
|
-
},
|
|
88
84
|
itemTo: {
|
|
89
85
|
type: Function as PropType<(item: ScenarioOrganisationTypeInfos) => Partial<RouteLocation>>,
|
|
90
86
|
required: false
|
|
91
87
|
},
|
|
88
|
+
editable: {
|
|
89
|
+
type: Boolean,
|
|
90
|
+
required: false,
|
|
91
|
+
default: true
|
|
92
|
+
},
|
|
93
|
+
modelValue: {
|
|
94
|
+
type: Array as PropType<string[]>,
|
|
95
|
+
default: () => [],
|
|
96
|
+
required: false
|
|
97
|
+
}
|
|
92
98
|
},
|
|
93
99
|
emits: ["update:modelValue"],
|
|
94
100
|
setup(props) {
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
:items="scenarioOrganisations"
|
|
4
4
|
:itemTo="$props.itemTo"
|
|
5
5
|
:loading="fetchingScenarioOrganisations"
|
|
6
|
-
:
|
|
6
|
+
:showSelect="$props.editable"
|
|
7
7
|
:tableCode="$props.tableCode"
|
|
8
|
+
:modelValue="$props.modelValue"
|
|
8
9
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
9
10
|
v-bind="$attrs"
|
|
10
11
|
>
|
|
@@ -58,24 +59,29 @@ export default defineComponent({
|
|
|
58
59
|
FSTagGroup
|
|
59
60
|
},
|
|
60
61
|
props: {
|
|
61
|
-
|
|
62
|
-
type:
|
|
63
|
-
|
|
64
|
-
required: false
|
|
62
|
+
tableCode: {
|
|
63
|
+
type: String,
|
|
64
|
+
required: true
|
|
65
65
|
},
|
|
66
66
|
scenarioOrganisationFilters: {
|
|
67
67
|
type: Object as PropType<ScenarioOrganisationFilters>,
|
|
68
68
|
required: false,
|
|
69
69
|
default: null
|
|
70
70
|
},
|
|
71
|
-
tableCode: {
|
|
72
|
-
type: String,
|
|
73
|
-
required: true
|
|
74
|
-
},
|
|
75
71
|
itemTo: {
|
|
76
72
|
type: Function as PropType<(item: ScenarioOrganisationInfos) => Partial<RouteLocation>>,
|
|
77
73
|
required: false
|
|
78
74
|
},
|
|
75
|
+
editable: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
required: false,
|
|
78
|
+
default: true
|
|
79
|
+
},
|
|
80
|
+
modelValue: {
|
|
81
|
+
type: Array as PropType<string[]>,
|
|
82
|
+
default: () => [],
|
|
83
|
+
required: false
|
|
84
|
+
}
|
|
79
85
|
},
|
|
80
86
|
emits: ["update:modelValue"],
|
|
81
87
|
setup(props) {
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
:loading="fetchingScenarioOrganisationTypes || fetchingScenarioOrganisations"
|
|
4
4
|
:headers="headers"
|
|
5
5
|
:items="scenarios"
|
|
6
|
+
:showSelect="$props.editable"
|
|
6
7
|
:tableCode="$props.tableCode"
|
|
7
8
|
:modelValue="$props.modelValue"
|
|
8
9
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
@@ -62,10 +63,9 @@ export default defineComponent({
|
|
|
62
63
|
FSTagGroup
|
|
63
64
|
},
|
|
64
65
|
props: {
|
|
65
|
-
|
|
66
|
-
type:
|
|
67
|
-
|
|
68
|
-
required: false
|
|
66
|
+
tableCode: {
|
|
67
|
+
type: String,
|
|
68
|
+
required: true
|
|
69
69
|
},
|
|
70
70
|
scenarioOrganisationFilters: {
|
|
71
71
|
type: Object as PropType<ScenarioOrganisationFilters>,
|
|
@@ -77,9 +77,15 @@ export default defineComponent({
|
|
|
77
77
|
required: false,
|
|
78
78
|
default: null
|
|
79
79
|
},
|
|
80
|
-
|
|
81
|
-
type:
|
|
82
|
-
required:
|
|
80
|
+
editable: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
required: false,
|
|
83
|
+
default: true
|
|
84
|
+
},
|
|
85
|
+
modelValue: {
|
|
86
|
+
type: Array as PropType<string[]>,
|
|
87
|
+
default: () => [],
|
|
88
|
+
required: false
|
|
83
89
|
}
|
|
84
90
|
},
|
|
85
91
|
emits: ["update:modelValue"],
|
package/components/lists/serviceAccountOrganisations/FSBaseServiceAccountOrganisationsList.vue
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
:items="serviceAccountOrganisations"
|
|
4
4
|
:itemTo="$props.itemTo"
|
|
5
5
|
:loading="fetchingServiceAccountOrganisations"
|
|
6
|
+
:showSelect="$props.editable"
|
|
6
7
|
:tableCode="$props.tableCode"
|
|
7
8
|
:modelValue="$props.modelValue"
|
|
8
9
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
@@ -57,16 +58,12 @@
|
|
|
57
58
|
<template
|
|
58
59
|
#item.tile="{ item, toggleSelect }"
|
|
59
60
|
>
|
|
60
|
-
<
|
|
61
|
-
:imageId="item.imageId"
|
|
62
|
-
:label="item.label"
|
|
63
|
-
:userType="item.userType"
|
|
64
|
-
:roleIcon="item.roleIcon"
|
|
65
|
-
:roleLabel="item.roleLabel"
|
|
66
|
-
:admin="item.admin"
|
|
61
|
+
<FSServiceAccountOrganisationTileUI
|
|
67
62
|
:to="$props.itemTo && $props.itemTo(item)"
|
|
63
|
+
:editable="$props.editable"
|
|
68
64
|
:modelValue="isSelected(item.id)"
|
|
69
65
|
@update:modelValue="toggleSelect(item)"
|
|
66
|
+
v-bind="item"
|
|
70
67
|
/>
|
|
71
68
|
</template>
|
|
72
69
|
</FSDataTable>
|
|
@@ -81,11 +78,13 @@ import _ from "lodash";
|
|
|
81
78
|
import type { ServiceAccountOrganisationFilters, ServiceAccountOrganisationInfos } from "@dative-gpi/foundation-core-domain/models";
|
|
82
79
|
import { userTypeLabel, userValidityLabel } from "@dative-gpi/foundation-core-components/utils";
|
|
83
80
|
import { useServiceAccountOrganisations } from "@dative-gpi/foundation-core-services/composables";
|
|
81
|
+
|
|
84
82
|
import FSDataTable from "../FSDataTable.vue";
|
|
83
|
+
|
|
85
84
|
import FSSpan from "@dative-gpi/foundation-shared-components/components/FSSpan.vue";
|
|
86
85
|
import FSImage from "@dative-gpi/foundation-shared-components/components/FSImage.vue";
|
|
87
86
|
import FSTagGroup from "@dative-gpi/foundation-shared-components/components/FSTagGroup.vue";
|
|
88
|
-
import
|
|
87
|
+
import FSServiceAccountOrganisationTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSServiceAccountOrganisationTileUI.vue";
|
|
89
88
|
|
|
90
89
|
export default defineComponent({
|
|
91
90
|
name: "FSBaseServiceAccountOrganisationsList",
|
|
@@ -94,26 +93,31 @@ export default defineComponent({
|
|
|
94
93
|
FSImage,
|
|
95
94
|
FSTagGroup,
|
|
96
95
|
FSSpan,
|
|
97
|
-
|
|
96
|
+
FSServiceAccountOrganisationTileUI
|
|
98
97
|
},
|
|
99
98
|
props: {
|
|
99
|
+
tableCode: {
|
|
100
|
+
type: String,
|
|
101
|
+
required: true
|
|
102
|
+
},
|
|
100
103
|
serviceAccountOrganisationsFilters: {
|
|
101
104
|
type: Object as PropType<ServiceAccountOrganisationFilters | null>,
|
|
102
105
|
required: false,
|
|
103
106
|
default: null
|
|
104
107
|
},
|
|
108
|
+
itemTo: {
|
|
109
|
+
type: Function as PropType<(item: ServiceAccountOrganisationInfos) => Partial<RouteLocation>>,
|
|
110
|
+
required: false
|
|
111
|
+
},
|
|
112
|
+
editable: {
|
|
113
|
+
type: Boolean,
|
|
114
|
+
required: false,
|
|
115
|
+
default: true
|
|
116
|
+
},
|
|
105
117
|
modelValue: {
|
|
106
118
|
type: Array as PropType<string[]>,
|
|
107
119
|
required: false,
|
|
108
120
|
default: () => []
|
|
109
|
-
},
|
|
110
|
-
tableCode: {
|
|
111
|
-
type: String,
|
|
112
|
-
required: true
|
|
113
|
-
},
|
|
114
|
-
itemTo: {
|
|
115
|
-
type: Function as PropType<(item: ServiceAccountOrganisationInfos) => Partial<RouteLocation>>,
|
|
116
|
-
required: false
|
|
117
121
|
}
|
|
118
122
|
},
|
|
119
123
|
emits: ["update:modelValue"],
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
:items="userOrganisations"
|
|
4
4
|
:itemTo="$props.itemTo"
|
|
5
5
|
:loading="fetchingUserOrganisations"
|
|
6
|
-
:
|
|
6
|
+
:showSelect="$props.editable"
|
|
7
7
|
:tableCode="$props.tableCode"
|
|
8
|
+
:modelValue="$props.modelValue"
|
|
8
9
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
9
10
|
v-bind="$attrs"
|
|
10
11
|
>
|
|
@@ -72,15 +73,11 @@
|
|
|
72
73
|
#item.tile="{ item, toggleSelect }"
|
|
73
74
|
>
|
|
74
75
|
<FSUserOrganisationTileUI
|
|
75
|
-
:roleLabel="item.roleLabel"
|
|
76
|
-
:roleIcon="item.roleIcon"
|
|
77
|
-
:userType="item.userType"
|
|
78
|
-
:imageId="item.imageId"
|
|
79
|
-
:admin="item.admin"
|
|
80
|
-
:name="item.name"
|
|
81
76
|
:to="$props.itemTo && $props.itemTo(item)"
|
|
77
|
+
:editable="$props.editable"
|
|
82
78
|
:modelValue="isSelected(item.id)"
|
|
83
79
|
@update:modelValue="toggleSelect(item)"
|
|
80
|
+
v-bind="item"
|
|
84
81
|
/>
|
|
85
82
|
</template>
|
|
86
83
|
</FSDataTable>
|
|
@@ -97,6 +94,7 @@ import { userTypeLabel, userValidityLabel } from "@dative-gpi/foundation-core-co
|
|
|
97
94
|
import { useUserOrganisations } from "@dative-gpi/foundation-core-services/composables";
|
|
98
95
|
|
|
99
96
|
import FSDataTable from "../FSDataTable.vue";
|
|
97
|
+
|
|
100
98
|
import FSSpan from "@dative-gpi/foundation-shared-components/components/FSSpan.vue";
|
|
101
99
|
import FSImage from "@dative-gpi/foundation-shared-components/components/FSImage.vue";
|
|
102
100
|
import FSTagGroup from "@dative-gpi/foundation-shared-components/components/FSTagGroup.vue";
|
|
@@ -115,23 +113,28 @@ export default defineComponent({
|
|
|
115
113
|
|
|
116
114
|
},
|
|
117
115
|
props: {
|
|
116
|
+
tableCode: {
|
|
117
|
+
type: String,
|
|
118
|
+
required: true
|
|
119
|
+
},
|
|
118
120
|
userOrganisationsFilters: {
|
|
119
121
|
type: Object as PropType<UserOrganisationFilters | null>,
|
|
120
122
|
required: false,
|
|
121
123
|
default: null
|
|
122
124
|
},
|
|
123
|
-
modelValue: {
|
|
124
|
-
type: Array as PropType<string[]>,
|
|
125
|
-
required: false,
|
|
126
|
-
default: () => []
|
|
127
|
-
},
|
|
128
125
|
itemTo: {
|
|
129
126
|
type: Function as PropType<(item: UserOrganisationInfos) => Partial<RouteLocation>>,
|
|
130
127
|
required: false
|
|
131
128
|
},
|
|
132
|
-
|
|
133
|
-
type:
|
|
134
|
-
required:
|
|
129
|
+
editable: {
|
|
130
|
+
type: Boolean,
|
|
131
|
+
required: false,
|
|
132
|
+
default: true
|
|
133
|
+
},
|
|
134
|
+
modelValue: {
|
|
135
|
+
type: Array as PropType<string[]>,
|
|
136
|
+
required: false,
|
|
137
|
+
default: () => []
|
|
135
138
|
}
|
|
136
139
|
},
|
|
137
140
|
emits: ["update:modelValue"],
|
|
@@ -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
|
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
</template>
|
|
21
21
|
|
|
22
22
|
<script lang="ts">
|
|
23
|
-
import { defineComponent, type PropType } from "vue";
|
|
23
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
24
24
|
|
|
25
|
+
import { type FolderFilters, type FolderInfos } from "@dative-gpi/foundation-core-domain/models";
|
|
25
26
|
import { useTreeView } from "@dative-gpi/foundation-shared-components/composables";
|
|
26
|
-
import { type FolderFilters } from "@dative-gpi/foundation-core-domain/models";
|
|
27
27
|
import { useFolders } from "@dative-gpi/foundation-core-services/composables";
|
|
28
28
|
|
|
29
29
|
import FSTreeViewField from "@dative-gpi/foundation-shared-components/components/fields/FSTreeViewField.vue";
|
|
@@ -41,6 +41,11 @@ export default defineComponent({
|
|
|
41
41
|
required: false,
|
|
42
42
|
default: null
|
|
43
43
|
},
|
|
44
|
+
exclude: {
|
|
45
|
+
type: String as PropType<string | null>,
|
|
46
|
+
required: false,
|
|
47
|
+
default: null
|
|
48
|
+
},
|
|
44
49
|
modelValue: {
|
|
45
50
|
type: [Array, String] as PropType<string[] | string | null>,
|
|
46
51
|
required: false,
|
|
@@ -54,7 +59,14 @@ export default defineComponent({
|
|
|
54
59
|
},
|
|
55
60
|
emits: ["update:modelValue"],
|
|
56
61
|
setup(props, { emit }) {
|
|
57
|
-
const { getMany: getManyFolders, fetching: fetchingFolders, entities
|
|
62
|
+
const { getMany: getManyFolders, fetching: fetchingFolders, entities } = useFolders();
|
|
63
|
+
|
|
64
|
+
const folders = computed((): FolderInfos[] => {
|
|
65
|
+
if (!props.exclude) {
|
|
66
|
+
return entities.value;
|
|
67
|
+
}
|
|
68
|
+
return entities.value.filter(g => g.id !== props.exclude && !g.path.some(p => p.id === props.exclude));
|
|
69
|
+
});
|
|
58
70
|
|
|
59
71
|
const fetch = () => {
|
|
60
72
|
return getManyFolders({ ...props.folderFilters });
|