@dative-gpi/foundation-core-components 0.0.90 → 0.0.91
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/FSDataTable.vue +27 -31
- package/package.json +7 -7
|
@@ -63,33 +63,32 @@ export default defineComponent({
|
|
|
63
63
|
const innerSortBy: Ref<FSDataTableOrder | null> = ref(null);
|
|
64
64
|
const innerMode: Ref<"table" | "iterator"> = ref("table");
|
|
65
65
|
const innerRowsPerPage = ref(10);
|
|
66
|
+
|
|
66
67
|
const innerFilters = ref<{ [key: string]: FSDataTableFilter[] }>({});
|
|
67
68
|
const innerPage = ref(1);
|
|
68
69
|
|
|
69
70
|
const reset = (): void => {
|
|
70
|
-
if (router && router.currentRoute.value.
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
innerMode.value = query.mode;
|
|
80
|
-
innerPage.value = query.page;
|
|
71
|
+
if (router && router.currentRoute.value.meta[props.tableCode]) {
|
|
72
|
+
const meta = router.currentRoute.value.meta[props.tableCode] as any;
|
|
73
|
+
innerHeaders.value = meta.columns;
|
|
74
|
+
innerRowsPerPage.value = meta.rowsPerPage;
|
|
75
|
+
innerSortBy.value = meta.sortBy;
|
|
76
|
+
innerMode.value = meta.mode;
|
|
77
|
+
|
|
78
|
+
innerFilters.value = meta.filters;
|
|
79
|
+
innerPage.value = meta.page;
|
|
81
80
|
}
|
|
82
81
|
else if (userOrganisationTable.value) {
|
|
82
|
+
innerHeaders.value = userOrganisationTable.value.columns;
|
|
83
83
|
innerRowsPerPage.value = userOrganisationTable.value.rowsPerPage;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
84
|
+
if (userOrganisationTable.value.sortByKey && userOrganisationTable.value.sortByOrder) {
|
|
85
|
+
innerSortBy.value = {
|
|
86
|
+
key: userOrganisationTable.value.sortByKey,
|
|
87
|
+
order: userOrganisationTable.value.sortByOrder
|
|
88
|
+
};
|
|
89
|
+
}
|
|
88
90
|
innerMode.value = userOrganisationTable.value.mode;
|
|
89
91
|
}
|
|
90
|
-
if (userOrganisationTable.value) {
|
|
91
|
-
innerHeaders.value = userOrganisationTable.value.columns;
|
|
92
|
-
}
|
|
93
92
|
};
|
|
94
93
|
|
|
95
94
|
const updateHeaders = (value: FSDataTableColumn[]): void => {
|
|
@@ -139,20 +138,17 @@ export default defineComponent({
|
|
|
139
138
|
|
|
140
139
|
const updateRouter = (): void => {
|
|
141
140
|
if (router) {
|
|
142
|
-
router.
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
mode: innerMode.value,
|
|
152
|
-
page: innerPage.value
|
|
153
|
-
})
|
|
141
|
+
router.currentRoute.value.meta = {
|
|
142
|
+
...router.currentRoute.value.meta,
|
|
143
|
+
[props.tableCode]: {
|
|
144
|
+
columns: innerHeaders.value,
|
|
145
|
+
filters: innerFilters.value,
|
|
146
|
+
rowsPerPage: innerRowsPerPage.value,
|
|
147
|
+
sortBy: innerSortBy.value,
|
|
148
|
+
mode: innerMode.value,
|
|
149
|
+
page: innerPage.value
|
|
154
150
|
}
|
|
155
|
-
}
|
|
151
|
+
};
|
|
156
152
|
}
|
|
157
153
|
};
|
|
158
154
|
|
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.91",
|
|
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.91",
|
|
14
|
+
"@dative-gpi/foundation-core-services": "0.0.91",
|
|
15
|
+
"@dative-gpi/foundation-shared-components": "0.0.91",
|
|
16
|
+
"@dative-gpi/foundation-shared-domain": "0.0.91",
|
|
17
|
+
"@dative-gpi/foundation-shared-services": "0.0.91",
|
|
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": "5470b07f299ab5d02f4240807304335501bdaf07"
|
|
28
28
|
}
|