@dative-gpi/foundation-core-components 1.0.137 → 1.0.139-chartlists
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/lists/chartOrganisationTypes/FSBaseChartOrganisationTypesList.vue +17 -3
- package/components/lists/chartOrganisations/FSBaseChartOrganisationsList.vue +29 -15
- package/components/lists/charts/FSBaseChartsList.vue +24 -6
- package/components/lists/dashboards/FSSimpleDashboardsList.vue +3 -4
- package/components/lists/reports/FSBaseReportExecutionsList.vue +137 -0
- package/components/lists/reports/FSBaseReportsList.vue +135 -0
- package/components/lists/userOrganisations/FSChipUserOrganisationsList.vue +61 -0
- package/package.json +7 -7
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
:headersOptions="headersOptions"
|
|
8
8
|
:tableCode="$props.tableCode"
|
|
9
9
|
:modelValue="$props.modelValue"
|
|
10
|
+
:showSelect="$props.editable"
|
|
11
|
+
:singleSelect="$props.singleSelect"
|
|
10
12
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
11
13
|
v-bind="$attrs"
|
|
12
14
|
>
|
|
@@ -76,16 +78,18 @@
|
|
|
76
78
|
/>
|
|
77
79
|
</template>
|
|
78
80
|
<template
|
|
79
|
-
#item.tile="{item}"
|
|
81
|
+
#item.tile="{ item, toggleSelect}"
|
|
80
82
|
>
|
|
81
83
|
<FSChartTileUI
|
|
82
|
-
variant="standard"
|
|
83
84
|
:label="item.label"
|
|
84
85
|
:category-label="item.chartCategoryLabel"
|
|
86
|
+
:singleSelect="$props.singleSelect"
|
|
87
|
+
:editable="$props.editable"
|
|
85
88
|
:icon="item.icon"
|
|
86
89
|
:imageId="item.imageId"
|
|
87
90
|
:type="item.chartType"
|
|
88
|
-
:
|
|
91
|
+
:modelValue="isSelected(item.id)"
|
|
92
|
+
@update:modelValue="toggleSelect(item)"
|
|
89
93
|
:to="$props.itemTo && $props.itemTo(item)"
|
|
90
94
|
/>
|
|
91
95
|
</template>
|
|
@@ -144,6 +148,16 @@ export default defineComponent({
|
|
|
144
148
|
type: Array as PropType<string[]>,
|
|
145
149
|
default: () => [],
|
|
146
150
|
required: false
|
|
151
|
+
},
|
|
152
|
+
editable: {
|
|
153
|
+
type: Boolean,
|
|
154
|
+
required: false,
|
|
155
|
+
default: true
|
|
156
|
+
},
|
|
157
|
+
singleSelect: {
|
|
158
|
+
type: Boolean,
|
|
159
|
+
required: false,
|
|
160
|
+
default: false
|
|
147
161
|
}
|
|
148
162
|
},
|
|
149
163
|
emits: ["update:modelValue"],
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
:headersOptions="headersOptions"
|
|
8
8
|
:tableCode="$props.tableCode"
|
|
9
9
|
:modelValue="$props.modelValue"
|
|
10
|
+
:singleSelect="$props.singleSelect"
|
|
11
|
+
:showSelect="$props.editable"
|
|
10
12
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
11
13
|
v-bind="$attrs"
|
|
12
14
|
>
|
|
@@ -61,20 +63,6 @@
|
|
|
61
63
|
:tags="item.modelsLabels.map((d: any) => d.label)"
|
|
62
64
|
/>
|
|
63
65
|
</template>
|
|
64
|
-
<template
|
|
65
|
-
#item.tile="{ item }"
|
|
66
|
-
>
|
|
67
|
-
<FSChartTileUI
|
|
68
|
-
variant="standard"
|
|
69
|
-
:label="item.label"
|
|
70
|
-
:categoryLabel="item.chartCategoryLabel"
|
|
71
|
-
:icon="item.icon"
|
|
72
|
-
:imageId="item.imageId"
|
|
73
|
-
:type="item.chartType"
|
|
74
|
-
:color="ColorEnum.Light"
|
|
75
|
-
:to="$props.itemTo && $props.itemTo(item)"
|
|
76
|
-
/>
|
|
77
|
-
</template>
|
|
78
66
|
<template
|
|
79
67
|
#item.chartType="{ item }"
|
|
80
68
|
>
|
|
@@ -89,6 +77,22 @@
|
|
|
89
77
|
</FSText>
|
|
90
78
|
</FSRow>
|
|
91
79
|
</template>
|
|
80
|
+
<template
|
|
81
|
+
#item.tile="{ item, toggleSelect }"
|
|
82
|
+
>
|
|
83
|
+
<FSChartTileUI
|
|
84
|
+
:label="item.label"
|
|
85
|
+
:singleSelect="$props.singleSelect"
|
|
86
|
+
:editable="$props.editable"
|
|
87
|
+
:categoryLabel="item.chartCategoryLabel"
|
|
88
|
+
:icon="item.icon"
|
|
89
|
+
:imageId="item.imageId"
|
|
90
|
+
:type="item.chartType"
|
|
91
|
+
:modelValue="isSelected(item.id)"
|
|
92
|
+
@update:modelValue="toggleSelect(item)"
|
|
93
|
+
:to="$props.itemTo && $props.itemTo(item)"
|
|
94
|
+
/>
|
|
95
|
+
</template>
|
|
92
96
|
</FSDataTable>
|
|
93
97
|
</template>
|
|
94
98
|
|
|
@@ -144,7 +148,17 @@ export default defineComponent({
|
|
|
144
148
|
type: Array as PropType<string[]>,
|
|
145
149
|
default: () => [],
|
|
146
150
|
required: false
|
|
147
|
-
}
|
|
151
|
+
},
|
|
152
|
+
editable: {
|
|
153
|
+
type: Boolean,
|
|
154
|
+
required: false,
|
|
155
|
+
default: true
|
|
156
|
+
},
|
|
157
|
+
singleSelect: {
|
|
158
|
+
type: Boolean,
|
|
159
|
+
required: false,
|
|
160
|
+
default: false
|
|
161
|
+
},
|
|
148
162
|
},
|
|
149
163
|
emits: ["update:modelValue"],
|
|
150
164
|
setup(props) {
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
:loading="fetchingChartOrganisationTypes || fetchingChartOrganisations"
|
|
5
5
|
:headersOptions="headersOptions"
|
|
6
6
|
:items="charts"
|
|
7
|
+
:showSelect="$props.editable"
|
|
8
|
+
:singleSelect="$props.singleSelect"
|
|
7
9
|
:tableCode="$props.tableCode"
|
|
8
10
|
:modelValue="$props.modelValue"
|
|
9
11
|
@update:modelValue="onSelect"
|
|
@@ -75,16 +77,19 @@
|
|
|
75
77
|
/>
|
|
76
78
|
</template>
|
|
77
79
|
<template
|
|
78
|
-
#item.tile="{ item }"
|
|
80
|
+
#item.tile="{ item, toggleSelect }"
|
|
79
81
|
>
|
|
80
82
|
<FSChartTileUI
|
|
81
|
-
variant="standard"
|
|
82
83
|
:label="item.label"
|
|
83
84
|
:categoryLabel="item.chartCategoryLabel"
|
|
84
85
|
:icon="item.icon"
|
|
85
86
|
:imageId="item.imageId"
|
|
86
87
|
:type="item.chartType"
|
|
87
|
-
:
|
|
88
|
+
:singleSelect="$props.singleSelect"
|
|
89
|
+
:editable="$props.editable"
|
|
90
|
+
:activeColor="ColorEnum.Primary"
|
|
91
|
+
:modelValue="isSelected(item.id)"
|
|
92
|
+
@update:modelValue="toggleSelect(item)"
|
|
88
93
|
@click="update(item.id)"
|
|
89
94
|
/>
|
|
90
95
|
</template>
|
|
@@ -141,6 +146,16 @@ export default defineComponent({
|
|
|
141
146
|
type: Array as PropType<string[]>,
|
|
142
147
|
default: () => [],
|
|
143
148
|
required: false
|
|
149
|
+
},
|
|
150
|
+
editable: {
|
|
151
|
+
type: Boolean,
|
|
152
|
+
required: false,
|
|
153
|
+
default: true
|
|
154
|
+
},
|
|
155
|
+
singleSelect: {
|
|
156
|
+
type: Boolean,
|
|
157
|
+
required: false,
|
|
158
|
+
default: false
|
|
144
159
|
}
|
|
145
160
|
},
|
|
146
161
|
emits: ["update", "update:modelValue", "update:scope"],
|
|
@@ -219,11 +234,14 @@ export default defineComponent({
|
|
|
219
234
|
}));
|
|
220
235
|
|
|
221
236
|
const update = (value : string) => {
|
|
222
|
-
const
|
|
223
|
-
if (
|
|
237
|
+
const valueUnselected = isSelected(value);
|
|
238
|
+
if (valueUnselected) {
|
|
224
239
|
onSelect(props.modelValue.filter(m => m != value));
|
|
225
240
|
}
|
|
226
|
-
else {
|
|
241
|
+
else if(props.singleSelect){
|
|
242
|
+
onSelect([value]);
|
|
243
|
+
}
|
|
244
|
+
else{
|
|
227
245
|
onSelect([...props.modelValue, value]);
|
|
228
246
|
}
|
|
229
247
|
}
|
|
@@ -9,9 +9,8 @@
|
|
|
9
9
|
<script lang="ts">
|
|
10
10
|
import { defineComponent, type PropType, watch, computed } from "vue";
|
|
11
11
|
|
|
12
|
-
import type { DashboardOrganisationFilters } from "@dative-gpi/foundation-core-domain/models";
|
|
13
|
-
import { useDashboardOrganisations } from "@dative-gpi/foundation-core-services/composables";
|
|
14
|
-
import { useDashboardOrganisationTypes } from "@dative-gpi/foundation-core-services/composables";
|
|
12
|
+
import type { DashboardOrganisationFilters, DashboardOrganisationTypeFilters } from "@dative-gpi/foundation-core-domain/models";
|
|
13
|
+
import { useDashboardOrganisations, useDashboardOrganisationTypes } from "@dative-gpi/foundation-core-services/composables";
|
|
15
14
|
|
|
16
15
|
import FSSimpleList from "@dative-gpi/foundation-shared-components/components/lists/FSSimpleList.vue";
|
|
17
16
|
|
|
@@ -27,7 +26,7 @@ export default defineComponent({
|
|
|
27
26
|
default: () => ({})
|
|
28
27
|
},
|
|
29
28
|
dashboardOrganisationTypeFilters: {
|
|
30
|
-
type: Object as PropType<
|
|
29
|
+
type: Object as PropType<DashboardOrganisationTypeFilters>,
|
|
31
30
|
required: false,
|
|
32
31
|
default: () => ({})
|
|
33
32
|
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSDataTable
|
|
3
|
+
defaultMode="table"
|
|
4
|
+
:loading="fetchingReportExecutions"
|
|
5
|
+
:headersOptions="headersOptions"
|
|
6
|
+
:items="reportExecutions"
|
|
7
|
+
:tableCode="tableCode"
|
|
8
|
+
:groupBy="groupByExecutionDate"
|
|
9
|
+
:modelValue="$props.modelValue"
|
|
10
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
11
|
+
v-bind="$attrs"
|
|
12
|
+
>
|
|
13
|
+
<template
|
|
14
|
+
v-for="(_, name) in $slots"
|
|
15
|
+
v-slot:[name]="slotData"
|
|
16
|
+
>
|
|
17
|
+
<slot
|
|
18
|
+
:name="name"
|
|
19
|
+
v-bind="slotData"
|
|
20
|
+
/>
|
|
21
|
+
</template>
|
|
22
|
+
<template
|
|
23
|
+
#item.state="{ item }"
|
|
24
|
+
>
|
|
25
|
+
<FSRow
|
|
26
|
+
align="center-left"
|
|
27
|
+
:wrap="false"
|
|
28
|
+
>
|
|
29
|
+
<FSIcon
|
|
30
|
+
:color="getColorByState(item.state)"
|
|
31
|
+
>
|
|
32
|
+
{{ getIconByState(item.state) }}
|
|
33
|
+
</FSIcon>
|
|
34
|
+
<FSText
|
|
35
|
+
font="text-overline"
|
|
36
|
+
:color="getColorByState(item.state)"
|
|
37
|
+
>
|
|
38
|
+
{{ getLabelByState(item.state) }}
|
|
39
|
+
</FSText>
|
|
40
|
+
</FSRow>
|
|
41
|
+
</template>
|
|
42
|
+
<template
|
|
43
|
+
#item.executedAt="{ item }"
|
|
44
|
+
>
|
|
45
|
+
<FSSpan
|
|
46
|
+
font="text-overline"
|
|
47
|
+
>
|
|
48
|
+
{{ epochToShortTimeOnlyFormat(item.executedAt) }}
|
|
49
|
+
</FSSpan>
|
|
50
|
+
</template>
|
|
51
|
+
<template
|
|
52
|
+
#item.users="{ item }"
|
|
53
|
+
>
|
|
54
|
+
<FSChipGroup
|
|
55
|
+
variant="slide"
|
|
56
|
+
:labels="item.users"
|
|
57
|
+
/>
|
|
58
|
+
</template>
|
|
59
|
+
</FSDataTable>
|
|
60
|
+
</template>
|
|
61
|
+
|
|
62
|
+
<script lang="ts">
|
|
63
|
+
import { defineComponent, type PropType, computed, watch } from "vue";
|
|
64
|
+
import _ from "lodash";
|
|
65
|
+
|
|
66
|
+
import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
|
|
67
|
+
import { JobState } from "@dative-gpi/foundation-shared-domain/enums";
|
|
68
|
+
import { getLabelByState, getColorByState, getIconByState } from "@dative-gpi/foundation-shared-components/tools";
|
|
69
|
+
import { useDateFormat } from "@dative-gpi/foundation-shared-services/composables";
|
|
70
|
+
|
|
71
|
+
import type { ReportExecutionFilters } from "@dative-gpi/foundation-core-domain/models";
|
|
72
|
+
import { useReportExecutions } from "@dative-gpi/foundation-core-services/composables";
|
|
73
|
+
|
|
74
|
+
import FSChipGroup from "@dative-gpi/foundation-shared-components/components/FSChipGroup.vue";
|
|
75
|
+
|
|
76
|
+
export default defineComponent({
|
|
77
|
+
name: "FSBaseReportExecutionsList",
|
|
78
|
+
components: {
|
|
79
|
+
FSChipGroup
|
|
80
|
+
},
|
|
81
|
+
props: {
|
|
82
|
+
tableCode: {
|
|
83
|
+
type: String as PropType<string | null>,
|
|
84
|
+
required: false,
|
|
85
|
+
default: null
|
|
86
|
+
},
|
|
87
|
+
reportExecutionsFilters: {
|
|
88
|
+
type: Object as PropType<ReportExecutionFilters>,
|
|
89
|
+
required: false,
|
|
90
|
+
default: null
|
|
91
|
+
},
|
|
92
|
+
modelValue: {
|
|
93
|
+
type: Array as PropType<string[]>,
|
|
94
|
+
required: false
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
emits: ["update:modelValue"],
|
|
98
|
+
setup(props) {
|
|
99
|
+
const { epochToLongTimeFormat, epochToLongDateFormat, epochToShortTimeOnlyFormat } = useDateFormat();
|
|
100
|
+
const { getMany: fetchReportExecutions, fetching: fetchingReportExecutions, entities: reportExecutions } = useReportExecutions();
|
|
101
|
+
|
|
102
|
+
const groupByExecutionDate = {
|
|
103
|
+
key: "executedAtGroup",
|
|
104
|
+
order: "desc"
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
const headersOptions = computed(() => ({
|
|
108
|
+
state: {
|
|
109
|
+
fixedFilters: getEnumEntries(JobState).map(e => ({
|
|
110
|
+
value: e.value,
|
|
111
|
+
text: getLabelByState(e.value)
|
|
112
|
+
})),
|
|
113
|
+
methodFilter: (value: JobState, item: JobState) => value == item
|
|
114
|
+
}
|
|
115
|
+
}));
|
|
116
|
+
|
|
117
|
+
watch(() => props.reportExecutionsFilters, (next, previous) => {
|
|
118
|
+
if ((!next && !previous) || !_.isEqual(next, previous)) {
|
|
119
|
+
fetchReportExecutions(props.reportExecutionsFilters);
|
|
120
|
+
}
|
|
121
|
+
}, { immediate: true });
|
|
122
|
+
|
|
123
|
+
return {
|
|
124
|
+
fetchingReportExecutions,
|
|
125
|
+
groupByExecutionDate,
|
|
126
|
+
reportExecutions,
|
|
127
|
+
headersOptions,
|
|
128
|
+
getColorByState,
|
|
129
|
+
getIconByState,
|
|
130
|
+
getLabelByState,
|
|
131
|
+
epochToLongTimeFormat,
|
|
132
|
+
epochToLongDateFormat,
|
|
133
|
+
epochToShortTimeOnlyFormat
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
</script>
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSDataTable
|
|
3
|
+
defaultMode="table"
|
|
4
|
+
:loading="fetchingReports"
|
|
5
|
+
:items="reports"
|
|
6
|
+
:showSelect="$props.editable"
|
|
7
|
+
:tableCode="tableCode"
|
|
8
|
+
:itemTo="$props.itemTo"
|
|
9
|
+
:modelValue="$props.modelValue"
|
|
10
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
11
|
+
v-bind="$attrs"
|
|
12
|
+
>
|
|
13
|
+
<template
|
|
14
|
+
v-for="(_, name) in $slots"
|
|
15
|
+
v-slot:[name]="slotData"
|
|
16
|
+
>
|
|
17
|
+
<slot
|
|
18
|
+
:name="name"
|
|
19
|
+
v-bind="slotData"
|
|
20
|
+
/>
|
|
21
|
+
</template>
|
|
22
|
+
<template
|
|
23
|
+
#item.icon="{ item }"
|
|
24
|
+
>
|
|
25
|
+
<FSIcon >
|
|
26
|
+
{{ item.icon }}
|
|
27
|
+
</FSIcon>
|
|
28
|
+
</template>
|
|
29
|
+
<template
|
|
30
|
+
#item.lastExecution="{ item }"
|
|
31
|
+
>
|
|
32
|
+
<FSSpan
|
|
33
|
+
font="text-overline"
|
|
34
|
+
>
|
|
35
|
+
{{ epochToLongTimeFormat(item.lastExecution) }}
|
|
36
|
+
</FSSpan>
|
|
37
|
+
</template>
|
|
38
|
+
<template
|
|
39
|
+
#item.nextExecution="{ item }"
|
|
40
|
+
>
|
|
41
|
+
<FSSpan
|
|
42
|
+
font="text-overline"
|
|
43
|
+
>
|
|
44
|
+
{{ epochToLongTimeFormat(item.nextExecution) }}
|
|
45
|
+
</FSSpan>
|
|
46
|
+
</template>
|
|
47
|
+
<template
|
|
48
|
+
#item.createdAt="{ item }"
|
|
49
|
+
>
|
|
50
|
+
<FSSpan
|
|
51
|
+
font="text-overline"
|
|
52
|
+
>
|
|
53
|
+
{{ epochToLongTimeFormat(item.createdAt) }}
|
|
54
|
+
</FSSpan>
|
|
55
|
+
</template>
|
|
56
|
+
<template
|
|
57
|
+
#item.userIds="{ item }"
|
|
58
|
+
>
|
|
59
|
+
<FSChipUserOrganisationsList
|
|
60
|
+
:userOrganisationIds="item.userIds"
|
|
61
|
+
:wrapped="false"
|
|
62
|
+
/>
|
|
63
|
+
</template>
|
|
64
|
+
</FSDataTable>
|
|
65
|
+
</template>
|
|
66
|
+
|
|
67
|
+
<script lang="ts">
|
|
68
|
+
import _ from "lodash";
|
|
69
|
+
import type { RouteLocation } from "vue-router";
|
|
70
|
+
import { defineComponent, type PropType, watch } from "vue";
|
|
71
|
+
|
|
72
|
+
import { useDateFormat } from "@dative-gpi/foundation-shared-services/composables";
|
|
73
|
+
|
|
74
|
+
import { useReports } from "@dative-gpi/foundation-core-services/composables";
|
|
75
|
+
import type { ReportFilters, ReportInfos } from "@dative-gpi/foundation-core-domain/models";
|
|
76
|
+
|
|
77
|
+
import FSChipUserOrganisationsList from "../userOrganisations/FSChipUserOrganisationsList.vue";
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
export default defineComponent({
|
|
81
|
+
name: "FSBaseReportsList",
|
|
82
|
+
components: {
|
|
83
|
+
FSChipUserOrganisationsList
|
|
84
|
+
},
|
|
85
|
+
props: {
|
|
86
|
+
tableCode: {
|
|
87
|
+
type: String as PropType<string | null>,
|
|
88
|
+
required: false,
|
|
89
|
+
default: null
|
|
90
|
+
},
|
|
91
|
+
reportsFilters: {
|
|
92
|
+
type: Object as PropType<ReportFilters>,
|
|
93
|
+
required: false,
|
|
94
|
+
default: null
|
|
95
|
+
},
|
|
96
|
+
editable: {
|
|
97
|
+
type: Boolean,
|
|
98
|
+
required: false,
|
|
99
|
+
default: true
|
|
100
|
+
},
|
|
101
|
+
itemTo: {
|
|
102
|
+
type: Function as PropType<(item: ReportInfos) => Partial<RouteLocation>>,
|
|
103
|
+
required: false
|
|
104
|
+
},
|
|
105
|
+
singleSelect: {
|
|
106
|
+
type: Boolean,
|
|
107
|
+
required: false,
|
|
108
|
+
default: false
|
|
109
|
+
},
|
|
110
|
+
modelValue: {
|
|
111
|
+
type: Array as PropType<string[]>,
|
|
112
|
+
default: () => [],
|
|
113
|
+
required: false
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
emits: ["update:modelValue"],
|
|
117
|
+
setup(props) {
|
|
118
|
+
const { epochToLongTimeFormat } = useDateFormat();
|
|
119
|
+
const { getMany: fetchReports, fetching: fetchingReports, entities: reports } = useReports();
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
watch(() => props.reportsFilters, (next, previous) => {
|
|
123
|
+
if ((!next && !previous) || !_.isEqual(next, previous)) {
|
|
124
|
+
fetchReports(props.reportsFilters);
|
|
125
|
+
}
|
|
126
|
+
}, { immediate: true });
|
|
127
|
+
|
|
128
|
+
return {
|
|
129
|
+
fetchingReports,
|
|
130
|
+
reports,
|
|
131
|
+
epochToLongTimeFormat
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
</script>
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSRow
|
|
3
|
+
v-if="fetching"
|
|
4
|
+
>
|
|
5
|
+
<FSLoader
|
|
6
|
+
v-for="i in 4"
|
|
7
|
+
:key="i"
|
|
8
|
+
variant="chip"
|
|
9
|
+
height="12px"
|
|
10
|
+
/>
|
|
11
|
+
</FSRow>
|
|
12
|
+
<FSChipGroup
|
|
13
|
+
v-else
|
|
14
|
+
:color="ColorEnum.Light"
|
|
15
|
+
:labels="userOrganisations?.map(u => u.name)"
|
|
16
|
+
v-bind="$attrs"
|
|
17
|
+
/>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script lang="ts">
|
|
21
|
+
import { defineComponent, watch, type PropType } from "vue";
|
|
22
|
+
|
|
23
|
+
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
24
|
+
import { useUserOrganisations } from "@dative-gpi/foundation-core-services/composables";
|
|
25
|
+
|
|
26
|
+
import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
|
|
27
|
+
import FSLoader from "@dative-gpi/foundation-shared-components/components/FSLoader.vue";
|
|
28
|
+
import FSChipGroup from "@dative-gpi/foundation-shared-components/components/FSChipGroup.vue";
|
|
29
|
+
|
|
30
|
+
export default defineComponent({
|
|
31
|
+
name: "FSChipUserOrganisationsList",
|
|
32
|
+
components: {
|
|
33
|
+
FSChipGroup,
|
|
34
|
+
FSLoader,
|
|
35
|
+
FSRow
|
|
36
|
+
},
|
|
37
|
+
props: {
|
|
38
|
+
userOrganisationIds: {
|
|
39
|
+
type: Array as PropType<string[]>,
|
|
40
|
+
required: false
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
setup(props) {
|
|
44
|
+
const {getMany: fetchUserOrganisations, fetching, entities: userOrganisations} = useUserOrganisations();
|
|
45
|
+
|
|
46
|
+
watch(() => props.userOrganisationIds, async () => {
|
|
47
|
+
if(props.userOrganisationIds && props.userOrganisationIds.length > 0){
|
|
48
|
+
fetchUserOrganisations({
|
|
49
|
+
userOrganisationsIds: props.userOrganisationIds
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
}, {immediate: true});
|
|
53
|
+
|
|
54
|
+
return {
|
|
55
|
+
userOrganisations,
|
|
56
|
+
ColorEnum,
|
|
57
|
+
fetching
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
</script>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-core-components",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.139-chartlists",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@dative-gpi/foundation-core-domain": "1.0.
|
|
14
|
-
"@dative-gpi/foundation-core-services": "1.0.
|
|
15
|
-
"@dative-gpi/foundation-shared-components": "1.0.
|
|
16
|
-
"@dative-gpi/foundation-shared-domain": "1.0.
|
|
17
|
-
"@dative-gpi/foundation-shared-services": "1.0.
|
|
13
|
+
"@dative-gpi/foundation-core-domain": "1.0.139-chartlists",
|
|
14
|
+
"@dative-gpi/foundation-core-services": "1.0.139-chartlists",
|
|
15
|
+
"@dative-gpi/foundation-shared-components": "1.0.139-chartlists",
|
|
16
|
+
"@dative-gpi/foundation-shared-domain": "1.0.139-chartlists",
|
|
17
|
+
"@dative-gpi/foundation-shared-services": "1.0.139-chartlists"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@dative-gpi/bones-ui": "^1.0.0",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"sass": "1.71.1",
|
|
27
27
|
"sass-loader": "13.3.2"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "d6d4df26014365b637a93c3e05c616616159a6f7"
|
|
30
30
|
}
|