@nkhang1902/strapi-plugin-export-import-clsx 1.4.6 → 1.4.8
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.
|
@@ -79,9 +79,7 @@ const ExportButtonsEditView = (props) => {
|
|
|
79
79
|
const a = document.createElement("a");
|
|
80
80
|
a.href = url;
|
|
81
81
|
|
|
82
|
-
const filename = `${contentType.replace("api::", "")}-export
|
|
83
|
-
new Date().toISOString().split("T")[0]
|
|
84
|
-
}.xlsx`;
|
|
82
|
+
const filename = `${contentType.replace("api::", "")}-participants-export.xlsx`;
|
|
85
83
|
|
|
86
84
|
a.download = filename;
|
|
87
85
|
document.body.appendChild(a);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nkhang1902/strapi-plugin-export-import-clsx",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.8",
|
|
4
4
|
"description": "A powerful Strapi plugin for exporting and importing data with Excel support and advanced filtering",
|
|
5
5
|
"main": "./strapi-server.js",
|
|
6
6
|
"scripts": {
|
|
@@ -2,7 +2,6 @@ module.exports = ({ strapi }) => ({
|
|
|
2
2
|
async export(ctx) {
|
|
3
3
|
try {
|
|
4
4
|
const { format = "excel", contentType, mode, ...filters } = ctx.query;
|
|
5
|
-
console.log(ctx.query)
|
|
6
5
|
const exportService = strapi
|
|
7
6
|
.plugin("export-import-clsx")
|
|
8
7
|
.service("export-service");
|
|
@@ -11,7 +10,8 @@ module.exports = ({ strapi }) => ({
|
|
|
11
10
|
const buffer = await exportService.exportData(
|
|
12
11
|
"excel",
|
|
13
12
|
contentType,
|
|
14
|
-
filters
|
|
13
|
+
filters,
|
|
14
|
+
mode
|
|
15
15
|
);
|
|
16
16
|
|
|
17
17
|
const filename = `${
|
|
@@ -119,7 +119,7 @@ module.exports = ({ strapi }) => ({
|
|
|
119
119
|
|
|
120
120
|
if (format === "excel" && mode === "participant") {
|
|
121
121
|
return this.convertExperienceParticipantsToExcel(entries[0]);
|
|
122
|
-
} else {
|
|
122
|
+
} else if (format === "excel") {
|
|
123
123
|
return this.convertToExcel(exportData.data);
|
|
124
124
|
}
|
|
125
125
|
|