@nkhang1902/strapi-plugin-export-import-clsx 1.7.9 → 1.8.1
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.
|
|
3
|
+
"version": "1.8.1",
|
|
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": {
|
|
@@ -171,12 +171,8 @@ module.exports = ({ strapi }) => ({
|
|
|
171
171
|
} else {
|
|
172
172
|
entries = await strapi.documents(ct).findMany({
|
|
173
173
|
filters: { ...filters },
|
|
174
|
-
populate:
|
|
175
|
-
"*",
|
|
176
|
-
"event.*"
|
|
177
|
-
],
|
|
174
|
+
populate: "*",
|
|
178
175
|
});
|
|
179
|
-
console.log(JSON.stringify(entries, null, 2));
|
|
180
176
|
}
|
|
181
177
|
strapi.log.info(
|
|
182
178
|
`EntityService found ${entries?.length || 0} entries`
|
|
@@ -342,6 +338,7 @@ module.exports = ({ strapi }) => ({
|
|
|
342
338
|
.replace(/[^\w\s-]/gi, "_")
|
|
343
339
|
.substring(0, 31);
|
|
344
340
|
|
|
341
|
+
var event = null;
|
|
345
342
|
if (entries && entries.length > 0) {
|
|
346
343
|
hasData = true;
|
|
347
344
|
|
|
@@ -354,6 +351,18 @@ module.exports = ({ strapi }) => ({
|
|
|
354
351
|
.filter(([key, definition]) => definition.type === "relation")
|
|
355
352
|
.map(([key]) => key);
|
|
356
353
|
|
|
354
|
+
if (relationFields.includes("event")) {
|
|
355
|
+
console.log(entries[0].event)
|
|
356
|
+
event = await strapi.documents("event").findFirst({
|
|
357
|
+
filters: {
|
|
358
|
+
id: {
|
|
359
|
+
$eq: entries[0].event.id,
|
|
360
|
+
},
|
|
361
|
+
}
|
|
362
|
+
})
|
|
363
|
+
console.log(event)
|
|
364
|
+
}
|
|
365
|
+
|
|
357
366
|
const mediaFields = Object.entries(attr)
|
|
358
367
|
.filter(([key, definition]) => definition.type === "media")
|
|
359
368
|
.map(([key]) => key);
|
|
@@ -388,7 +397,7 @@ module.exports = ({ strapi }) => ({
|
|
|
388
397
|
const value = obj[key];
|
|
389
398
|
|
|
390
399
|
if (key === "documentId" && ["corporate", "investor", "vip-guest"].includes(contentType.split(".")[1])) {
|
|
391
|
-
result["liveLink"] = `${process.env.PREVIEW_URL}/download/${
|
|
400
|
+
result["liveLink"] = `${process.env.PREVIEW_URL}/download/${event.liveLink && event.liveLink.slug ? event.liveLink.slug : "live-link"}?participantId=${value}`;
|
|
392
401
|
continue
|
|
393
402
|
}
|
|
394
403
|
if (SYSTEM_KEYS.includes(key)) continue;
|