@dative-gpi/foundation-core-components 1.0.67 → 1.0.69
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.
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSDataTable
|
|
3
|
-
:items="roleOrganisations"
|
|
4
|
-
:itemTo="$props.itemTo"
|
|
5
3
|
:loading="fetchingRoleOrganisations"
|
|
6
4
|
:showSelect="$props.editable"
|
|
7
5
|
:tableCode="$props.tableCode"
|
|
6
|
+
:items="roleOrganisations"
|
|
7
|
+
:itemTo="$props.itemTo"
|
|
8
8
|
:modelValue="$props.modelValue"
|
|
9
9
|
@update:modelValue="$emit('update:modelValue', $event)"
|
|
10
10
|
v-bind="$attrs"
|
|
@@ -52,29 +52,29 @@
|
|
|
52
52
|
</template>
|
|
53
53
|
|
|
54
54
|
<script lang="ts">
|
|
55
|
-
import type
|
|
56
|
-
import {
|
|
57
|
-
import type { RouteLocation } from "vue-router";
|
|
55
|
+
import { defineComponent, type PropType, watch } from "vue";
|
|
56
|
+
import { type RouteLocation } from "vue-router";
|
|
58
57
|
import _ from "lodash";
|
|
59
58
|
|
|
60
|
-
import type
|
|
59
|
+
import { type RoleOrganisationFilters, type RoleOrganisationInfos } from "@dative-gpi/foundation-core-domain/models";
|
|
61
60
|
import { userTypeIcon, userTypeLabel } from "@dative-gpi/foundation-core-components/utils";
|
|
62
61
|
import { useRoleOrganisations } from "@dative-gpi/foundation-core-services/composables";
|
|
63
62
|
|
|
64
|
-
import
|
|
65
|
-
import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
|
|
63
|
+
import FSTagGroup from "@dative-gpi/foundation-shared-components/components/FSTagGroup.vue";
|
|
66
64
|
import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
|
|
67
65
|
import FSText from "@dative-gpi/foundation-shared-components/components/FSText.vue";
|
|
68
|
-
import
|
|
66
|
+
import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
|
|
67
|
+
|
|
68
|
+
import FSDataTable from "../FSDataTable.vue";
|
|
69
69
|
|
|
70
70
|
export default defineComponent({
|
|
71
71
|
name: "FSBaseRoleOrganisationsList",
|
|
72
72
|
components: {
|
|
73
73
|
FSDataTable,
|
|
74
|
-
|
|
74
|
+
FSTagGroup,
|
|
75
75
|
FSIcon,
|
|
76
76
|
FSText,
|
|
77
|
-
|
|
77
|
+
FSRow
|
|
78
78
|
},
|
|
79
79
|
props: {
|
|
80
80
|
tableCode: {
|
package/components/lists/serviceAccountRoleOrganisations/FSBaseServiceAccountRoleOrganisations.vue
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSDataTable
|
|
3
|
+
:loading="fetchingServiceAccountRoleOrganisations"
|
|
4
|
+
:items="serviceAccountRoleOrganisations"
|
|
5
|
+
:showSelect="$props.editable"
|
|
6
|
+
:tableCode="$props.tableCode"
|
|
7
|
+
:itemTo="$props.itemTo"
|
|
8
|
+
:modelValue="$props.modelValue"
|
|
9
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
10
|
+
v-bind="$attrs"
|
|
11
|
+
>
|
|
12
|
+
<template
|
|
13
|
+
v-for="(_, name) in $slots"
|
|
14
|
+
v-slot:[name]="slotData"
|
|
15
|
+
>
|
|
16
|
+
<slot
|
|
17
|
+
:name="name"
|
|
18
|
+
v-bind="slotData"
|
|
19
|
+
/>
|
|
20
|
+
</template>
|
|
21
|
+
<template
|
|
22
|
+
#item.icon="{ item }"
|
|
23
|
+
>
|
|
24
|
+
<FSIcon>
|
|
25
|
+
{{ item.icon }}
|
|
26
|
+
</FSIcon>
|
|
27
|
+
</template>
|
|
28
|
+
<template
|
|
29
|
+
#item.userType="{ item }"
|
|
30
|
+
>
|
|
31
|
+
<FSRow
|
|
32
|
+
align="center-left"
|
|
33
|
+
>
|
|
34
|
+
<FSIcon>
|
|
35
|
+
{{ userTypeIcon(item.userType) }}
|
|
36
|
+
</FSIcon>
|
|
37
|
+
<FSText>
|
|
38
|
+
{{ userTypeLabel(item.userType) }}
|
|
39
|
+
</FSText>
|
|
40
|
+
</FSRow>
|
|
41
|
+
</template>
|
|
42
|
+
<template
|
|
43
|
+
#item.tags="{ item }"
|
|
44
|
+
>
|
|
45
|
+
<FSTagGroup
|
|
46
|
+
variant="slide"
|
|
47
|
+
:editable="false"
|
|
48
|
+
:tags="item.tags"
|
|
49
|
+
/>
|
|
50
|
+
</template>
|
|
51
|
+
</FSDataTable>
|
|
52
|
+
</template>
|
|
53
|
+
|
|
54
|
+
<script lang="ts">
|
|
55
|
+
import { defineComponent, type PropType, watch } from "vue";
|
|
56
|
+
import { type RouteLocation } from "vue-router";
|
|
57
|
+
import _ from "lodash";
|
|
58
|
+
|
|
59
|
+
import { type ServiceAccountRoleOrganisationFilters, type ServiceAccountRoleOrganisationInfos } from "@dative-gpi/foundation-core-domain/models";
|
|
60
|
+
import { useServiceAccountRoleOrganisations } from "@dative-gpi/foundation-core-services/composables";
|
|
61
|
+
import { userTypeIcon, userTypeLabel } from "@dative-gpi/foundation-core-components/utils";
|
|
62
|
+
|
|
63
|
+
import FSTagGroup from "@dative-gpi/foundation-shared-components/components/FSTagGroup.vue";
|
|
64
|
+
import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
|
|
65
|
+
import FSText from "@dative-gpi/foundation-shared-components/components/FSText.vue";
|
|
66
|
+
import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
|
|
67
|
+
|
|
68
|
+
import FSDataTable from "../FSDataTable.vue";
|
|
69
|
+
|
|
70
|
+
export default defineComponent({
|
|
71
|
+
name: "FSBaseServiceAccountRoleOrganisationsList",
|
|
72
|
+
components: {
|
|
73
|
+
FSDataTable,
|
|
74
|
+
FSTagGroup,
|
|
75
|
+
FSIcon,
|
|
76
|
+
FSText,
|
|
77
|
+
FSRow
|
|
78
|
+
},
|
|
79
|
+
props: {
|
|
80
|
+
tableCode: {
|
|
81
|
+
type: String,
|
|
82
|
+
required: true
|
|
83
|
+
},
|
|
84
|
+
serviceAccountRoleOrganisationsFilters: {
|
|
85
|
+
type: Object as PropType<ServiceAccountRoleOrganisationFilters | null>,
|
|
86
|
+
required: false,
|
|
87
|
+
default: null
|
|
88
|
+
},
|
|
89
|
+
itemTo: {
|
|
90
|
+
type: Function as PropType<(item: ServiceAccountRoleOrganisationInfos) => Partial<RouteLocation>>,
|
|
91
|
+
required: false
|
|
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
|
+
}
|
|
103
|
+
},
|
|
104
|
+
emits: ["update:modelValue"],
|
|
105
|
+
setup(props) {
|
|
106
|
+
const { getMany: getManyServiceAccountRoleOrganisations, fetching: fetchingServiceAccountRoleOrganisations, entities: serviceAccountRoleOrganisations } = useServiceAccountRoleOrganisations();
|
|
107
|
+
|
|
108
|
+
const isSelected = (id: string): boolean => {
|
|
109
|
+
return props.modelValue.includes(id);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
watch(() => props.serviceAccountRoleOrganisationsFilters, (next, previous) => {
|
|
113
|
+
if ((!next && !previous) || !_.isEqual(next, previous)) {
|
|
114
|
+
getManyServiceAccountRoleOrganisations(props.serviceAccountRoleOrganisationsFilters ?? undefined);
|
|
115
|
+
}
|
|
116
|
+
}, { immediate: true });
|
|
117
|
+
|
|
118
|
+
return {
|
|
119
|
+
fetchingServiceAccountRoleOrganisations,
|
|
120
|
+
serviceAccountRoleOrganisations,
|
|
121
|
+
userTypeLabel,
|
|
122
|
+
userTypeIcon,
|
|
123
|
+
isSelected
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
</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.69",
|
|
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.69",
|
|
14
|
+
"@dative-gpi/foundation-core-services": "1.0.69",
|
|
15
|
+
"@dative-gpi/foundation-shared-components": "1.0.69",
|
|
16
|
+
"@dative-gpi/foundation-shared-domain": "1.0.69",
|
|
17
|
+
"@dative-gpi/foundation-shared-services": "1.0.69"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@dative-gpi/bones-ui": "^0.0.75",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"sass": "1.71.1",
|
|
27
27
|
"sass-loader": "13.3.2"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "6ecedd781dfabf0bf696992e85f35d9ce69037b9"
|
|
30
30
|
}
|