@nkhang1902/strapi-plugin-export-import-clsx 1.4.7 → 1.4.9

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@nkhang1902/strapi-plugin-export-import-clsx",
3
- "version": "1.4.7",
3
+ "version": "1.4.9",
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": {
@@ -10,7 +10,8 @@ module.exports = ({ strapi }) => ({
10
10
  const buffer = await exportService.exportData(
11
11
  "excel",
12
12
  contentType,
13
- filters
13
+ filters,
14
+ mode
14
15
  );
15
16
 
16
17
  const filename = `${
@@ -32,6 +32,7 @@ module.exports = ({ strapi }) => ({
32
32
  timestamp: new Date().toISOString(),
33
33
  data: {},
34
34
  };
35
+ let entries = [];
35
36
 
36
37
  for (const ct of contentTypes) {
37
38
  try {
@@ -46,8 +47,6 @@ module.exports = ({ strapi }) => ({
46
47
  `Exporting ${ct} with raw filters: ${JSON.stringify(rawFilters)}`
47
48
  );
48
49
  strapi.log.info(`Parsed filters: ${JSON.stringify(parsedFilters)}`);
49
-
50
- let entries = [];
51
50
  let filters = parsedFilters.filters;
52
51
 
53
52
  // Export all entries with filters
@@ -119,8 +118,7 @@ module.exports = ({ strapi }) => ({
119
118
 
120
119
  if (format === "excel" && mode === "participant") {
121
120
  return this.convertExperienceParticipantsToExcel(entries[0]);
122
- } else {
123
- console.log(mode)
121
+ } else if (format === "excel") {
124
122
  return this.convertToExcel(exportData.data);
125
123
  }
126
124