@dative-gpi/foundation-core-components 1.0.56 → 1.0.58-groupings
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/FSMetaValue.vue +63 -31
- package/components/customProperties/helpers.ts +57 -165
- package/components/entities/FSBaseEntitiesList.vue +14 -4
- package/components/entities/FSDialogSelectEntities.vue +28 -106
- package/components/entities/FSEntityField.vue +75 -14
- package/components/entities/FSSelectEntitiesList.vue +225 -0
- package/components/explorers/FSBaseDevicesExplorer.vue +312 -0
- package/components/explorers/FSBaseFoldersExplorer.vue +286 -0
- package/components/lists/FSDataTable.vue +23 -21
- package/components/lists/alerts/FSBaseAlertsList.vue +95 -97
- package/components/lists/alerts/FSButtonAcknowledgeAlert.vue +4 -4
- package/components/lists/authTokens/FSBaseAuthTokensList.vue +6 -4
- package/components/lists/chartOrganisationTypes/FSBaseChartOrganisationTypesList.vue +103 -38
- package/components/lists/chartOrganisations/FSBaseChartOrganisationsList.vue +104 -39
- package/components/lists/charts/FSBaseChartsList.vue +147 -66
- package/components/lists/comments/FSBaseCommentsList.vue +39 -23
- package/components/lists/connectivityScenarios/FSBaseConnectivityScenariosList.vue +128 -0
- package/components/lists/dashboardOrganisationTypes/FSBaseDashboardOrganisationTypesList.vue +39 -7
- package/components/lists/dashboards/FSBaseDashboardsList.vue +44 -13
- package/components/lists/dashboards/FSSimpleDashboardsList.vue +33 -7
- package/components/lists/dataCategories/FSBaseDataCategoriesList.vue +6 -5
- package/components/lists/dataDefinitions/FSBaseDataDefinitionsList.vue +6 -4
- package/components/lists/deviceOrganisations/FSBaseDeviceOrganisationsList.vue +179 -61
- package/components/lists/folders/FSBaseFoldersList.vue +37 -146
- package/components/lists/groupings/FSBaseGroupingsList.vue +117 -0
- package/components/lists/groups/FSBaseGroupsList.vue +24 -7
- package/components/lists/locations/FSBaseLocationsList.vue +52 -13
- package/components/lists/models/FSBaseModelsList.vue +45 -15
- package/components/lists/roleOrganisationTypes/FSBaseRoleOrganisationTypesList.vue +17 -10
- package/components/lists/roleOrganisations/FSBaseRoleOrganisationsList.vue +28 -21
- package/components/lists/scenarioOrganisationTypes/FSBaseScenarioOrganisationTypesList.vue +56 -13
- package/components/lists/scenarioOrganisations/FSBaseScenarioOrganisationsList.vue +56 -12
- package/components/lists/scenarios/FSBaseScenariosList.vue +122 -81
- package/components/lists/serviceAccountOrganisations/FSBaseServiceAccountOrganisationsList.vue +31 -18
- package/components/lists/serviceAccountRoleOrganisations/FSBaseServiceAccountRoleOrganisationsList.vue +128 -0
- package/components/lists/userOrganisations/FSBaseUserOrganisationsList.vue +30 -19
- 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 +12 -5
- package/components/tiles/FSFolderTile.vue +3 -3
- 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/FSTreeViewFolder.vue +15 -3
- package/components/treeviews/FSTreeViewGroup.vue +22 -4
- package/package.json +9 -9
- package/utils/dashboards.ts +3 -3
- 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
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSDataTable
|
|
3
|
+
defaultMode="iterator"
|
|
4
|
+
:loading="fetchingGroupings"
|
|
5
|
+
:items="groupings"
|
|
6
|
+
:selectable="$props.selectable"
|
|
7
|
+
:showSearch="$props.showSearch"
|
|
8
|
+
:disableTable="$props.disableTable"
|
|
9
|
+
:tableCode="$props.tableCode"
|
|
10
|
+
:modelValue="$props.modelValue"
|
|
11
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
12
|
+
v-bind="$attrs"
|
|
13
|
+
>
|
|
14
|
+
<template
|
|
15
|
+
v-for="(_, name) in $slots"
|
|
16
|
+
v-slot:[name]="slotData"
|
|
17
|
+
>
|
|
18
|
+
<slot
|
|
19
|
+
:name="name"
|
|
20
|
+
v-bind="slotData"
|
|
21
|
+
/>
|
|
22
|
+
</template>
|
|
23
|
+
<template
|
|
24
|
+
#item.icon="{ item }"
|
|
25
|
+
>
|
|
26
|
+
<FSIcon>
|
|
27
|
+
{{ item.icon }}
|
|
28
|
+
</FSIcon>
|
|
29
|
+
</template>
|
|
30
|
+
<template
|
|
31
|
+
#item.tile="{ item, toggleSelect }"
|
|
32
|
+
>
|
|
33
|
+
<FSGroupingTileUI
|
|
34
|
+
:selectable="$props.selectable"
|
|
35
|
+
:modelValue="isSelected(item.id)"
|
|
36
|
+
@update:modelValue="toggleSelect(item)"
|
|
37
|
+
v-bind="item"
|
|
38
|
+
/>
|
|
39
|
+
</template>
|
|
40
|
+
</FSDataTable>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script lang="ts">
|
|
44
|
+
import { defineComponent, watch } from "vue";
|
|
45
|
+
import type { PropType} from "vue";
|
|
46
|
+
import _ from "lodash";
|
|
47
|
+
|
|
48
|
+
import type { GroupingFilters } from "@dative-gpi/foundation-core-domain/models";
|
|
49
|
+
import { useGroupings } from "@dative-gpi/foundation-core-services/composables";
|
|
50
|
+
|
|
51
|
+
import FSDataTable from "../FSDataTable.vue";
|
|
52
|
+
|
|
53
|
+
import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
|
|
54
|
+
import FSGroupingTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSGroupingTileUI.vue";
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
export default defineComponent({
|
|
58
|
+
name: "FSBaseGroupingsList",
|
|
59
|
+
components: {
|
|
60
|
+
FSDataTable,
|
|
61
|
+
FSIcon,
|
|
62
|
+
FSGroupingTileUI
|
|
63
|
+
},
|
|
64
|
+
props: {
|
|
65
|
+
tableCode: {
|
|
66
|
+
type: String as PropType<string | null>,
|
|
67
|
+
required: false,
|
|
68
|
+
default: null
|
|
69
|
+
},
|
|
70
|
+
groupingsFilters: {
|
|
71
|
+
type: Object as PropType<GroupingFilters>,
|
|
72
|
+
required: false,
|
|
73
|
+
default: null
|
|
74
|
+
},
|
|
75
|
+
selectable: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
required: false,
|
|
78
|
+
default: false
|
|
79
|
+
},
|
|
80
|
+
modelValue: {
|
|
81
|
+
type: Array as PropType<string[]>,
|
|
82
|
+
required: false,
|
|
83
|
+
default: () => []
|
|
84
|
+
},
|
|
85
|
+
showSearch: {
|
|
86
|
+
type: Boolean,
|
|
87
|
+
required: false,
|
|
88
|
+
default: false
|
|
89
|
+
},
|
|
90
|
+
disableTable: {
|
|
91
|
+
type: Boolean,
|
|
92
|
+
required: false,
|
|
93
|
+
default: true
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
emits: ["update:modelValue"],
|
|
97
|
+
setup(props) {
|
|
98
|
+
const { getMany: fetchGroupings, fetching: fetchingGroupings, entities: groupings } = useGroupings();
|
|
99
|
+
|
|
100
|
+
const isSelected = (id: string) => {
|
|
101
|
+
return props.modelValue.includes(id);
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
watch(() => props.groupingsFilters, (next, previous) => {
|
|
105
|
+
if ((!next && !previous) || !_.isEqual(next, previous)) {
|
|
106
|
+
fetchGroupings(props.groupingsFilters);
|
|
107
|
+
}
|
|
108
|
+
}, { immediate: true });
|
|
109
|
+
|
|
110
|
+
return {
|
|
111
|
+
fetchingGroupings,
|
|
112
|
+
groupings,
|
|
113
|
+
isSelected
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
</script>
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSDataTable
|
|
3
|
+
defaultMode="iterator"
|
|
3
4
|
:loading="fetchingGroups"
|
|
4
5
|
:items="groups"
|
|
6
|
+
:selectable="$props.selectable"
|
|
5
7
|
:tableCode="$props.tableCode"
|
|
6
8
|
:modelValue="$props.modelValue"
|
|
7
9
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
@@ -16,14 +18,22 @@
|
|
|
16
18
|
v-bind="slotData"
|
|
17
19
|
/>
|
|
18
20
|
</template>
|
|
21
|
+
<template
|
|
22
|
+
#header.imageId-title
|
|
23
|
+
>
|
|
24
|
+
<FSIcon>
|
|
25
|
+
mdi-panorama-variant-outline
|
|
26
|
+
</FSIcon>
|
|
27
|
+
</template>
|
|
19
28
|
<template
|
|
20
29
|
#item.imageId="{ item }"
|
|
21
30
|
>
|
|
22
31
|
<FSImage
|
|
23
32
|
v-if="item.imageId"
|
|
24
|
-
height="
|
|
25
|
-
width="
|
|
33
|
+
height="32px"
|
|
34
|
+
width="32px"
|
|
26
35
|
:imageId="item.imageId"
|
|
36
|
+
:thumbnail="true"
|
|
27
37
|
/>
|
|
28
38
|
</template>
|
|
29
39
|
<template
|
|
@@ -38,7 +48,7 @@
|
|
|
38
48
|
>
|
|
39
49
|
<FSTagGroup
|
|
40
50
|
variant="slide"
|
|
41
|
-
:
|
|
51
|
+
:showRemove="false"
|
|
42
52
|
:tags="item.tags"
|
|
43
53
|
/>
|
|
44
54
|
</template>
|
|
@@ -46,6 +56,7 @@
|
|
|
46
56
|
#item.tile="{ item, toggleSelect }"
|
|
47
57
|
>
|
|
48
58
|
<FSGroupTileUI
|
|
59
|
+
:selectable="$props.selectable"
|
|
49
60
|
:modelValue="isSelected(item.id)"
|
|
50
61
|
@update:modelValue="toggleSelect(item)"
|
|
51
62
|
v-bind="item"
|
|
@@ -80,19 +91,25 @@ export default defineComponent({
|
|
|
80
91
|
FSTagGroup
|
|
81
92
|
},
|
|
82
93
|
props: {
|
|
94
|
+
tableCode: {
|
|
95
|
+
type: String as PropType<string | null>,
|
|
96
|
+
required: false,
|
|
97
|
+
default: null
|
|
98
|
+
},
|
|
83
99
|
groupsFilters: {
|
|
84
100
|
type: Object as PropType<GroupFilters>,
|
|
85
101
|
required: false,
|
|
86
102
|
default: null
|
|
87
103
|
},
|
|
104
|
+
selectable: {
|
|
105
|
+
type: Boolean,
|
|
106
|
+
required: false,
|
|
107
|
+
default: true
|
|
108
|
+
},
|
|
88
109
|
modelValue: {
|
|
89
110
|
type: Array as PropType<string[]>,
|
|
90
111
|
required: false,
|
|
91
112
|
default: () => []
|
|
92
|
-
},
|
|
93
|
-
tableCode: {
|
|
94
|
-
type: String,
|
|
95
|
-
required: true
|
|
96
113
|
}
|
|
97
114
|
},
|
|
98
115
|
emits: ["update:modelValue"],
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSDataTable
|
|
3
|
-
|
|
3
|
+
defaultMode="iterator"
|
|
4
4
|
:loading="fetchingLocations"
|
|
5
|
-
:disableIterator="true"
|
|
6
5
|
:items="locations"
|
|
6
|
+
:selectable="$props.selectable"
|
|
7
7
|
:tableCode="tableCode"
|
|
8
8
|
:modelValue="$props.modelValue"
|
|
9
9
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
@@ -25,53 +25,92 @@
|
|
|
25
25
|
{{ item.icon }}
|
|
26
26
|
</FSIcon>
|
|
27
27
|
</template>
|
|
28
|
+
|
|
29
|
+
<template
|
|
30
|
+
#item.tile="{ item, toggleSelect }"
|
|
31
|
+
>
|
|
32
|
+
<FSLocationTileUI
|
|
33
|
+
v-bind="item"
|
|
34
|
+
:bottomColor="item.colors"
|
|
35
|
+
:address="item.address.placeLabel"
|
|
36
|
+
:selectable="$props.selectable"
|
|
37
|
+
:singleSelect="singleSelect"
|
|
38
|
+
:modelValue="isSelected(item.id)"
|
|
39
|
+
:to="$props.itemTo && $props.itemTo(item)"
|
|
40
|
+
@update:modelValue="toggleSelect(item)"
|
|
41
|
+
/>
|
|
42
|
+
</template>
|
|
28
43
|
</FSDataTable>
|
|
29
44
|
</template>
|
|
30
45
|
|
|
31
46
|
<script lang="ts">
|
|
32
|
-
import { defineComponent, type PropType, watch } from "vue";
|
|
33
47
|
import _ from "lodash";
|
|
48
|
+
import type { RouteLocation } from "vue-router";
|
|
49
|
+
import { defineComponent, type PropType, watch } from "vue";
|
|
34
50
|
|
|
35
51
|
import { useLocations } from "@dative-gpi/foundation-core-services/composables";
|
|
36
|
-
import type { LocationFilters } from "@dative-gpi/foundation-core-domain/models";
|
|
52
|
+
import type { LocationFilters, LocationInfos } from "@dative-gpi/foundation-core-domain/models";
|
|
37
53
|
|
|
38
|
-
import FSDataTable from "../FSDataTable.vue";
|
|
39
54
|
import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
|
|
40
55
|
|
|
56
|
+
import FSDataTable from "../FSDataTable.vue";
|
|
57
|
+
import FSLocationTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSLocationTileUI.vue";
|
|
58
|
+
|
|
41
59
|
export default defineComponent({
|
|
42
|
-
name: "
|
|
60
|
+
name: "FSBaseLocationsList",
|
|
43
61
|
components: {
|
|
62
|
+
FSLocationTileUI,
|
|
44
63
|
FSDataTable,
|
|
45
64
|
FSIcon
|
|
46
65
|
},
|
|
47
66
|
props: {
|
|
48
|
-
|
|
67
|
+
tableCode: {
|
|
68
|
+
type: String as PropType<string | null>,
|
|
69
|
+
required: false,
|
|
70
|
+
default: null
|
|
71
|
+
},
|
|
72
|
+
locationsFilters: {
|
|
49
73
|
type: Object as PropType<LocationFilters>,
|
|
50
74
|
required: false,
|
|
51
75
|
default: null
|
|
52
76
|
},
|
|
77
|
+
selectable: {
|
|
78
|
+
type: Boolean,
|
|
79
|
+
required: false,
|
|
80
|
+
default: true
|
|
81
|
+
},
|
|
82
|
+
itemTo: {
|
|
83
|
+
type: Function as PropType<(item: LocationInfos) => Partial<RouteLocation>>,
|
|
84
|
+
required: false
|
|
85
|
+
},
|
|
86
|
+
singleSelect: {
|
|
87
|
+
type: Boolean,
|
|
88
|
+
required: false,
|
|
89
|
+
default: false
|
|
90
|
+
},
|
|
53
91
|
modelValue: {
|
|
54
92
|
type: Array as PropType<string[]>,
|
|
55
93
|
default: () => [],
|
|
56
94
|
required: false
|
|
57
|
-
},
|
|
58
|
-
tableCode: {
|
|
59
|
-
type: String,
|
|
60
|
-
required: true
|
|
61
95
|
}
|
|
62
96
|
},
|
|
63
97
|
emits: ["update:modelValue"],
|
|
64
98
|
setup(props) {
|
|
65
99
|
const { getMany: fetchLocations, fetching: fetchingLocations, entities: locations } = useLocations();
|
|
66
100
|
|
|
67
|
-
watch(() => props.
|
|
101
|
+
watch(() => props.locationsFilters, (next, previous) => {
|
|
68
102
|
if ((!next && !previous) || !_.isEqual(next, previous)) {
|
|
69
|
-
fetchLocations(props.
|
|
103
|
+
fetchLocations(props.locationsFilters);
|
|
70
104
|
}
|
|
71
105
|
}, { immediate: true });
|
|
72
106
|
|
|
107
|
+
const isSelected = (id: string) => {
|
|
108
|
+
return props.modelValue?.includes(id);
|
|
109
|
+
};
|
|
110
|
+
|
|
73
111
|
return {
|
|
74
112
|
fetchingLocations,
|
|
113
|
+
isSelected,
|
|
75
114
|
locations
|
|
76
115
|
};
|
|
77
116
|
}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSDataTable
|
|
3
|
+
defaultMode="iterator"
|
|
4
|
+
:singleSelect="$props.singleSelect"
|
|
5
|
+
:selectable="$props.selectable"
|
|
6
|
+
:tableCode="$props.tableCode"
|
|
3
7
|
:loading="fetchingModels"
|
|
4
8
|
:items="models"
|
|
5
|
-
:tableCode="$props.tableCode"
|
|
6
9
|
:modelValue="$props.modelValue"
|
|
7
10
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
8
11
|
v-bind="$attrs"
|
|
@@ -16,6 +19,13 @@
|
|
|
16
19
|
v-bind="slotData"
|
|
17
20
|
/>
|
|
18
21
|
</template>
|
|
22
|
+
<template
|
|
23
|
+
#header.imageId-title
|
|
24
|
+
>
|
|
25
|
+
<FSIcon>
|
|
26
|
+
mdi-panorama-variant-outline
|
|
27
|
+
</FSIcon>
|
|
28
|
+
</template>
|
|
19
29
|
<template
|
|
20
30
|
#header.connectable-title
|
|
21
31
|
>
|
|
@@ -31,6 +41,7 @@
|
|
|
31
41
|
height="32px"
|
|
32
42
|
width="32px"
|
|
33
43
|
:imageId="item.imageId"
|
|
44
|
+
:thumbnail="true"
|
|
34
45
|
/>
|
|
35
46
|
</template>
|
|
36
47
|
<template
|
|
@@ -48,27 +59,31 @@
|
|
|
48
59
|
/>
|
|
49
60
|
</template>
|
|
50
61
|
<template
|
|
51
|
-
#item.tile="{ item }"
|
|
62
|
+
#item.tile="{ item, toggleSelect }"
|
|
52
63
|
>
|
|
53
64
|
<FSModelTileUI
|
|
65
|
+
:to="$props.itemTo && $props.itemTo(item)"
|
|
66
|
+
:selectable="$props.selectable"
|
|
67
|
+
:singleSelect="$props.singleSelect"
|
|
54
68
|
:imageId="item.imageId"
|
|
55
69
|
:label="item.label"
|
|
56
|
-
:
|
|
57
|
-
@
|
|
58
|
-
v-bind="
|
|
70
|
+
:modelValue="isSelected(item.id)"
|
|
71
|
+
@update:modelValue="toggleSelect(item)"
|
|
72
|
+
v-bind="item"
|
|
59
73
|
/>
|
|
60
74
|
</template>
|
|
61
75
|
</FSDataTable>
|
|
62
76
|
</template>
|
|
63
77
|
|
|
64
78
|
<script lang="ts">
|
|
65
|
-
import { defineComponent, type PropType, watch } from "vue";
|
|
66
79
|
import _ from "lodash";
|
|
80
|
+
import type { RouteLocation } from "vue-router";
|
|
81
|
+
import { defineComponent, type PropType, watch } from "vue";
|
|
67
82
|
|
|
68
83
|
import {ColorEnum} from "@dative-gpi/foundation-shared-components/models";
|
|
69
84
|
|
|
70
85
|
import { useModels } from "@dative-gpi/foundation-core-services/composables";
|
|
71
|
-
import type { ModelFilters } from "@dative-gpi/foundation-core-domain/models";
|
|
86
|
+
import type { ModelFilters, ModelInfos } from "@dative-gpi/foundation-core-domain/models";
|
|
72
87
|
|
|
73
88
|
import FSDataTable from "../FSDataTable.vue";
|
|
74
89
|
import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
|
|
@@ -86,19 +101,34 @@ export default defineComponent({
|
|
|
86
101
|
FSIcon,
|
|
87
102
|
},
|
|
88
103
|
props: {
|
|
89
|
-
|
|
104
|
+
tableCode: {
|
|
105
|
+
type: String as PropType<string | null>,
|
|
106
|
+
required: false,
|
|
107
|
+
default: null
|
|
108
|
+
},
|
|
109
|
+
modelsFilters: {
|
|
90
110
|
type: Object as PropType<ModelFilters>,
|
|
91
111
|
required: false,
|
|
92
112
|
default: null
|
|
93
113
|
},
|
|
114
|
+
itemTo: {
|
|
115
|
+
type: Function as PropType<(item: ModelInfos) => Partial<RouteLocation>>,
|
|
116
|
+
required: false
|
|
117
|
+
},
|
|
118
|
+
selectable: {
|
|
119
|
+
type: Boolean,
|
|
120
|
+
required: false,
|
|
121
|
+
default: true
|
|
122
|
+
},
|
|
123
|
+
singleSelect: {
|
|
124
|
+
type: Boolean,
|
|
125
|
+
required: false,
|
|
126
|
+
default: false
|
|
127
|
+
},
|
|
94
128
|
modelValue: {
|
|
95
129
|
type: Array as PropType<string[]>,
|
|
96
130
|
default: () => [],
|
|
97
131
|
required: false
|
|
98
|
-
},
|
|
99
|
-
tableCode: {
|
|
100
|
-
type: String,
|
|
101
|
-
required: true
|
|
102
132
|
}
|
|
103
133
|
},
|
|
104
134
|
emits: ["update:modelValue"],
|
|
@@ -109,16 +139,16 @@ export default defineComponent({
|
|
|
109
139
|
return props.modelValue.includes(id);
|
|
110
140
|
};
|
|
111
141
|
|
|
112
|
-
watch(() => props.
|
|
142
|
+
watch(() => props.modelsFilters, (next, previous) => {
|
|
113
143
|
if ((!next && !previous) || !_.isEqual(next, previous)) {
|
|
114
|
-
fetchModels(props.
|
|
144
|
+
fetchModels(props.modelsFilters);
|
|
115
145
|
}
|
|
116
146
|
}, { immediate: true });
|
|
117
147
|
|
|
118
148
|
return {
|
|
119
149
|
fetchingModels,
|
|
120
|
-
models,
|
|
121
150
|
ColorEnum,
|
|
151
|
+
models,
|
|
122
152
|
isSelected
|
|
123
153
|
};
|
|
124
154
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
:items="roleOrganisationTypes"
|
|
4
4
|
:itemTo="$props.itemTo"
|
|
5
5
|
:loading="fetchingRoleOrganisations"
|
|
6
|
+
:selectable="$props.selectable"
|
|
6
7
|
:tableCode="$props.tableCode"
|
|
7
8
|
:modelValue="$props.modelValue"
|
|
8
9
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
@@ -43,7 +44,7 @@
|
|
|
43
44
|
>
|
|
44
45
|
<FSTagGroup
|
|
45
46
|
variant="slide"
|
|
46
|
-
:
|
|
47
|
+
:showRemove="false"
|
|
47
48
|
:tags="item.tags"
|
|
48
49
|
/>
|
|
49
50
|
</template>
|
|
@@ -76,24 +77,30 @@ export default defineComponent({
|
|
|
76
77
|
FSDataTable,
|
|
77
78
|
},
|
|
78
79
|
props: {
|
|
79
|
-
|
|
80
|
-
type:
|
|
80
|
+
tableCode: {
|
|
81
|
+
type: String as PropType<string | null>,
|
|
81
82
|
required: false,
|
|
82
83
|
default: null
|
|
83
84
|
},
|
|
84
|
-
|
|
85
|
-
type:
|
|
85
|
+
roleOrganisationTypesFilters: {
|
|
86
|
+
type: Object as PropType<RoleOrganisationTypeFilters | null>,
|
|
86
87
|
required: false,
|
|
87
|
-
default:
|
|
88
|
-
},
|
|
89
|
-
tableCode: {
|
|
90
|
-
type: String,
|
|
91
|
-
required: true
|
|
88
|
+
default: null
|
|
92
89
|
},
|
|
93
90
|
itemTo: {
|
|
94
91
|
type: Function as PropType<(item: RoleOrganisationTypeInfos) => Partial<RouteLocation>>,
|
|
95
92
|
required: false
|
|
96
93
|
},
|
|
94
|
+
selectable: {
|
|
95
|
+
type: Boolean,
|
|
96
|
+
required: false,
|
|
97
|
+
default: true
|
|
98
|
+
},
|
|
99
|
+
modelValue: {
|
|
100
|
+
type: Array as PropType<string[]>,
|
|
101
|
+
required: false,
|
|
102
|
+
default: () => []
|
|
103
|
+
}
|
|
97
104
|
},
|
|
98
105
|
emits: ["update:modelValue"],
|
|
99
106
|
setup(props) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSDataTable
|
|
3
|
-
:items="roleOrganisations"
|
|
4
|
-
:itemTo="$props.itemTo"
|
|
5
3
|
:loading="fetchingRoleOrganisations"
|
|
4
|
+
:selectable="$props.selectable"
|
|
6
5
|
:tableCode="$props.tableCode"
|
|
6
|
+
:items="roleOrganisations"
|
|
7
|
+
:itemTo="$props.itemTo"
|
|
7
8
|
:modelValue="$props.modelValue"
|
|
8
9
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
9
10
|
v-bind="$attrs"
|
|
@@ -43,7 +44,7 @@
|
|
|
43
44
|
>
|
|
44
45
|
<FSTagGroup
|
|
45
46
|
variant="slide"
|
|
46
|
-
:
|
|
47
|
+
:showRemove="false"
|
|
47
48
|
:tags="item.tags"
|
|
48
49
|
/>
|
|
49
50
|
</template>
|
|
@@ -51,49 +52,55 @@
|
|
|
51
52
|
</template>
|
|
52
53
|
|
|
53
54
|
<script lang="ts">
|
|
54
|
-
import type
|
|
55
|
-
import {
|
|
56
|
-
import type { RouteLocation } from "vue-router";
|
|
55
|
+
import { defineComponent, type PropType, watch } from "vue";
|
|
56
|
+
import { type RouteLocation } from "vue-router";
|
|
57
57
|
import _ from "lodash";
|
|
58
58
|
|
|
59
|
-
import type
|
|
59
|
+
import { type RoleOrganisationFilters, type RoleOrganisationInfos } from "@dative-gpi/foundation-core-domain/models";
|
|
60
60
|
import { userTypeIcon, userTypeLabel } from "@dative-gpi/foundation-core-components/utils";
|
|
61
61
|
import { useRoleOrganisations } from "@dative-gpi/foundation-core-services/composables";
|
|
62
62
|
|
|
63
|
-
import
|
|
64
|
-
import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
|
|
63
|
+
import FSTagGroup from "@dative-gpi/foundation-shared-components/components/FSTagGroup.vue";
|
|
65
64
|
import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
|
|
66
65
|
import FSText from "@dative-gpi/foundation-shared-components/components/FSText.vue";
|
|
67
|
-
import
|
|
66
|
+
import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
|
|
67
|
+
|
|
68
|
+
import FSDataTable from "../FSDataTable.vue";
|
|
68
69
|
|
|
69
70
|
export default defineComponent({
|
|
70
71
|
name: "FSBaseRoleOrganisationsList",
|
|
71
72
|
components: {
|
|
72
73
|
FSDataTable,
|
|
73
|
-
|
|
74
|
+
FSTagGroup,
|
|
74
75
|
FSIcon,
|
|
75
76
|
FSText,
|
|
76
|
-
|
|
77
|
+
FSRow
|
|
77
78
|
},
|
|
78
79
|
props: {
|
|
79
|
-
|
|
80
|
-
type:
|
|
80
|
+
tableCode: {
|
|
81
|
+
type: String as PropType<string | null>,
|
|
81
82
|
required: false,
|
|
82
83
|
default: null
|
|
83
84
|
},
|
|
84
|
-
|
|
85
|
-
type:
|
|
85
|
+
roleOrganisationsFilters: {
|
|
86
|
+
type: Object as PropType<RoleOrganisationFilters | null>,
|
|
86
87
|
required: false,
|
|
87
|
-
default:
|
|
88
|
-
},
|
|
89
|
-
tableCode: {
|
|
90
|
-
type: String,
|
|
91
|
-
required: true
|
|
88
|
+
default: null
|
|
92
89
|
},
|
|
93
90
|
itemTo: {
|
|
94
91
|
type: Function as PropType<(item: RoleOrganisationInfos) => Partial<RouteLocation>>,
|
|
95
92
|
required: false
|
|
96
93
|
},
|
|
94
|
+
selectable: {
|
|
95
|
+
type: Boolean,
|
|
96
|
+
required: false,
|
|
97
|
+
default: true
|
|
98
|
+
},
|
|
99
|
+
modelValue: {
|
|
100
|
+
type: Array as PropType<string[]>,
|
|
101
|
+
required: false,
|
|
102
|
+
default: () => []
|
|
103
|
+
}
|
|
97
104
|
},
|
|
98
105
|
emits: ["update:modelValue"],
|
|
99
106
|
setup(props) {
|