@dative-gpi/foundation-core-components 1.0.136-fat-status-card → 1.0.136-maps2
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.
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<script lang="ts">
|
|
10
10
|
import { defineComponent, type PropType, watch, computed } from "vue";
|
|
11
11
|
|
|
12
|
-
import type { DashboardOrganisationFilters
|
|
12
|
+
import type { DashboardOrganisationFilters } from "@dative-gpi/foundation-core-domain/models";
|
|
13
13
|
import { useDashboardOrganisations } from "@dative-gpi/foundation-core-services/composables";
|
|
14
14
|
import { useDashboardOrganisationTypes } from "@dative-gpi/foundation-core-services/composables";
|
|
15
15
|
|
|
@@ -27,7 +27,7 @@ export default defineComponent({
|
|
|
27
27
|
default: () => ({})
|
|
28
28
|
},
|
|
29
29
|
dashboardOrganisationTypeFilters: {
|
|
30
|
-
type: Object as PropType<
|
|
30
|
+
type: Object as PropType<DashboardOrganisationFilters>,
|
|
31
31
|
required: false,
|
|
32
32
|
default: () => ({})
|
|
33
33
|
}
|
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.136-
|
|
4
|
+
"version": "1.0.136-maps2",
|
|
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.136-
|
|
14
|
-
"@dative-gpi/foundation-core-services": "1.0.136-
|
|
15
|
-
"@dative-gpi/foundation-shared-components": "1.0.136-
|
|
16
|
-
"@dative-gpi/foundation-shared-domain": "1.0.136-
|
|
17
|
-
"@dative-gpi/foundation-shared-services": "1.0.136-
|
|
13
|
+
"@dative-gpi/foundation-core-domain": "1.0.136-maps2",
|
|
14
|
+
"@dative-gpi/foundation-core-services": "1.0.136-maps2",
|
|
15
|
+
"@dative-gpi/foundation-shared-components": "1.0.136-maps2",
|
|
16
|
+
"@dative-gpi/foundation-shared-domain": "1.0.136-maps2",
|
|
17
|
+
"@dative-gpi/foundation-shared-services": "1.0.136-maps2"
|
|
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": "a0739b48282166f721cf6c2376a430e4690d92ef"
|
|
30
30
|
}
|
|
@@ -1,77 +0,0 @@
|
|
|
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
|
-
<FSRow
|
|
13
|
-
v-else-if="userOrganisations.length > 0"
|
|
14
|
-
:wrap="wrapped"
|
|
15
|
-
>
|
|
16
|
-
<FSChip
|
|
17
|
-
v-for="userOrganisation in userOrganisations"
|
|
18
|
-
:key="userOrganisation.id"
|
|
19
|
-
:color="ColorEnum.Light"
|
|
20
|
-
:label="userOrganisation.name"
|
|
21
|
-
/>
|
|
22
|
-
</FSRow>
|
|
23
|
-
<FSRow
|
|
24
|
-
v-else
|
|
25
|
-
:wrap="wrapped"
|
|
26
|
-
>
|
|
27
|
-
<FSChip
|
|
28
|
-
v-for="(label, i) in $props.userOrganisationLabels"
|
|
29
|
-
:key="i"
|
|
30
|
-
:color="ColorEnum.Light"
|
|
31
|
-
:label="label"
|
|
32
|
-
/>
|
|
33
|
-
</FSRow>
|
|
34
|
-
</template>
|
|
35
|
-
|
|
36
|
-
<script lang="ts">
|
|
37
|
-
import { defineComponent, watch, type PropType } from "vue";
|
|
38
|
-
|
|
39
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
40
|
-
import { useUserOrganisations } from "@dative-gpi/foundation-core-services/composables";
|
|
41
|
-
|
|
42
|
-
export default defineComponent({
|
|
43
|
-
name: "ChipGroupUserOrganisation",
|
|
44
|
-
props: {
|
|
45
|
-
userOrganisationIds: {
|
|
46
|
-
type: Array as PropType<string[]>,
|
|
47
|
-
required: false
|
|
48
|
-
},
|
|
49
|
-
userOrganisationLabels: {
|
|
50
|
-
type: Array as PropType<string[]>,
|
|
51
|
-
required: false
|
|
52
|
-
},
|
|
53
|
-
wrapped: {
|
|
54
|
-
type: Boolean,
|
|
55
|
-
required: false,
|
|
56
|
-
default: true
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
setup(props) {
|
|
60
|
-
const {getMany: fetchUserOrganisations, fetching, entities: userOrganisations} = useUserOrganisations();
|
|
61
|
-
|
|
62
|
-
watch(() => props.userOrganisationIds, async () => {
|
|
63
|
-
if(props.userOrganisationIds && props.userOrganisationIds.length > 0){
|
|
64
|
-
fetchUserOrganisations({
|
|
65
|
-
userOrganisationsIds: props.userOrganisationIds
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
}, {immediate: true});
|
|
69
|
-
|
|
70
|
-
return {
|
|
71
|
-
userOrganisations,
|
|
72
|
-
ColorEnum,
|
|
73
|
-
fetching
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
</script>
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<FSDataTable
|
|
3
|
-
defaultMode="table"
|
|
4
|
-
:loading="fetchingReports"
|
|
5
|
-
:items="reports"
|
|
6
|
-
:showSelect="$props.editable"
|
|
7
|
-
:tableCode="tableCode"
|
|
8
|
-
:itemTo="routerLink"
|
|
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.users="{ item }"
|
|
58
|
-
>
|
|
59
|
-
<ChipGroupUserOrganisation
|
|
60
|
-
:userOrganisationIds="item.users"
|
|
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 { useRouteOrganisation, useReports } from "@dative-gpi/foundation-core-services/composables";
|
|
75
|
-
import type { ReportFilters, ReportInfos } from "@dative-gpi/foundation-core-domain/models";
|
|
76
|
-
|
|
77
|
-
import ChipGroupUserOrganisation from "./ChipGroupUserOrganisation.vue";
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
export default defineComponent({
|
|
81
|
-
name: "FSBaseReportsList",
|
|
82
|
-
components: {
|
|
83
|
-
ChipGroupUserOrganisation
|
|
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 { $r } = useRouteOrganisation();
|
|
119
|
-
const { epochToLongTimeFormat } = useDateFormat();
|
|
120
|
-
const { getMany: fetchReports, fetching: fetchingReports, entities: reports } = useReports();
|
|
121
|
-
|
|
122
|
-
const routerLink = (item: ReportInfos ) => {
|
|
123
|
-
return $r({ name: "report", params: { entityId: item.id } });
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
watch(() => props.reportsFilters, (next, previous) => {
|
|
127
|
-
if ((!next && !previous) || !_.isEqual(next, previous)) {
|
|
128
|
-
fetchReports(props.reportsFilters);
|
|
129
|
-
}
|
|
130
|
-
}, { immediate: true });
|
|
131
|
-
|
|
132
|
-
return {
|
|
133
|
-
fetchingReports,
|
|
134
|
-
reports,
|
|
135
|
-
routerLink,
|
|
136
|
-
epochToLongTimeFormat
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
</script>
|