@dative-gpi/foundation-core-components 0.0.121 → 0.0.123
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.
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/>
|
|
5
5
|
<FSDataTableUI
|
|
6
6
|
v-else
|
|
7
|
-
:headers="
|
|
7
|
+
:headers="headers"
|
|
8
8
|
:mode="table.mode"
|
|
9
9
|
:sortBy="table.sortBy"
|
|
10
10
|
:rowsPerPage="table.rowsPerPage"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
</template>
|
|
32
32
|
|
|
33
33
|
<script lang="ts">
|
|
34
|
-
import { defineComponent, onUnmounted, ref, watch } from "vue";
|
|
34
|
+
import { PropType, computed, defineComponent, onUnmounted, ref, watch } from "vue";
|
|
35
35
|
|
|
36
36
|
import { useUserOrganisationTable, useUpdateUserOrganisationTable } from "@dative-gpi/foundation-core-services/composables";
|
|
37
37
|
import { FSDataTable, FSDataTableColumn, FSDataTableFilter, FSDataTableOrder } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -55,6 +55,11 @@ export default defineComponent({
|
|
|
55
55
|
type: Number,
|
|
56
56
|
required: false,
|
|
57
57
|
default: 1000
|
|
58
|
+
},
|
|
59
|
+
customSorts: {
|
|
60
|
+
type: Object as PropType<{ [key: string]: any }>,
|
|
61
|
+
required: false,
|
|
62
|
+
default: () => ({})
|
|
58
63
|
}
|
|
59
64
|
},
|
|
60
65
|
setup(props) {
|
|
@@ -72,6 +77,18 @@ export default defineComponent({
|
|
|
72
77
|
page: 1
|
|
73
78
|
});
|
|
74
79
|
|
|
80
|
+
const headers = computed((): FSDataTableColumn[] => {
|
|
81
|
+
if(!table.value) {
|
|
82
|
+
return [];
|
|
83
|
+
}
|
|
84
|
+
return table.value.headers.map(header => {
|
|
85
|
+
return {
|
|
86
|
+
...header,
|
|
87
|
+
sort: header.value && props.customSorts[header.value] || null
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
});
|
|
91
|
+
|
|
75
92
|
const reset = (): void => {
|
|
76
93
|
if (getTable(props.tableCode)) {
|
|
77
94
|
table.value = getTable(props.tableCode);
|
|
@@ -167,6 +184,7 @@ export default defineComponent({
|
|
|
167
184
|
|
|
168
185
|
return {
|
|
169
186
|
gettingUserOrganisationTable,
|
|
187
|
+
headers,
|
|
170
188
|
table,
|
|
171
189
|
updateRowsPerPage,
|
|
172
190
|
updateFilters,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-core-components",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.123",
|
|
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": "0.0.
|
|
14
|
-
"@dative-gpi/foundation-core-services": "0.0.
|
|
15
|
-
"@dative-gpi/foundation-shared-components": "0.0.
|
|
16
|
-
"@dative-gpi/foundation-shared-domain": "0.0.
|
|
17
|
-
"@dative-gpi/foundation-shared-services": "0.0.
|
|
13
|
+
"@dative-gpi/foundation-core-domain": "0.0.123",
|
|
14
|
+
"@dative-gpi/foundation-core-services": "0.0.123",
|
|
15
|
+
"@dative-gpi/foundation-shared-components": "0.0.123",
|
|
16
|
+
"@dative-gpi/foundation-shared-domain": "0.0.123",
|
|
17
|
+
"@dative-gpi/foundation-shared-services": "0.0.123",
|
|
18
18
|
"color": "^4.2.3",
|
|
19
19
|
"vue": "^3.4.23",
|
|
20
20
|
"vuedraggable": "^4.1.0"
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"sass": "^1.69.5",
|
|
25
25
|
"sass-loader": "^13.3.2"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "0d9536cb31dbffca7286a843898128087323db0f"
|
|
28
28
|
}
|