@dative-gpi/foundation-core-components 1.0.139-editablerefacto → 1.0.139-editablerefacto-3
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/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.139-editablerefacto",
|
|
4
|
+
"version": "1.0.139-editablerefacto-3",
|
|
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.139-editablerefacto",
|
|
14
|
-
"@dative-gpi/foundation-core-services": "1.0.139-editablerefacto",
|
|
15
|
-
"@dative-gpi/foundation-shared-components": "1.0.139-editablerefacto",
|
|
16
|
-
"@dative-gpi/foundation-shared-domain": "1.0.139-editablerefacto",
|
|
17
|
-
"@dative-gpi/foundation-shared-services": "1.0.139-editablerefacto"
|
|
13
|
+
"@dative-gpi/foundation-core-domain": "1.0.139-editablerefacto-3",
|
|
14
|
+
"@dative-gpi/foundation-core-services": "1.0.139-editablerefacto-3",
|
|
15
|
+
"@dative-gpi/foundation-shared-components": "1.0.139-editablerefacto-3",
|
|
16
|
+
"@dative-gpi/foundation-shared-domain": "1.0.139-editablerefacto-3",
|
|
17
|
+
"@dative-gpi/foundation-shared-services": "1.0.139-editablerefacto-3"
|
|
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": "cae71411b15b7e5a6abe56ac763693c88e1117e2"
|
|
30
30
|
}
|
|
@@ -1,137 +0,0 @@
|
|
|
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>
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<FSDataTable
|
|
3
|
-
defaultMode="table"
|
|
4
|
-
:loading="fetchingReports"
|
|
5
|
-
:items="reports"
|
|
6
|
-
:showSelect="$props.selectable"
|
|
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
|
-
selectable: {
|
|
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>
|