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

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.9",
3
+ "version": "1.5.0",
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": {
@@ -91,10 +91,29 @@ module.exports = ({ strapi }) => ({
91
91
  strapi.log.info(`Parsed query filters: ${JSON.stringify(filters)}`);
92
92
 
93
93
  try {
94
- entries = await strapi.documents(ct).findMany({
95
- filters: { ...filters },
96
- populate: "*",
97
- });
94
+ if (mode === 'participant') {
95
+ entries = await strapi.documents(ct).findMany({
96
+ filters: { ...filters },
97
+ populate: {
98
+ corporates: true,
99
+ investors: {
100
+ populate: {
101
+ companyInformation: true,
102
+ },
103
+ },
104
+ vipGuests: {
105
+ populate: {
106
+ companyInformation: true,
107
+ },
108
+ },
109
+ },
110
+ });
111
+ } else {
112
+ entries = await strapi.documents(ct).findMany({
113
+ filters: { ...filters },
114
+ populate: "*",
115
+ });
116
+ }
98
117
  strapi.log.info(
99
118
  `EntityService found ${entries?.length || 0} entries`
100
119
  );
@@ -407,14 +426,12 @@ module.exports = ({ strapi }) => ({
407
426
 
408
427
  const data = participants.map((p) => ({
409
428
  type: p.type,
410
- corporateName: p.corporateName ?? '',
429
+ corporateName: p.corporateName ?? p.companyInformation?.companyName ?? '',
411
430
  tickerCode: p.tickerCode ?? '',
412
431
  fullName:
413
432
  p.fullName ??
414
433
  [p.firstName, p.lastName].filter(Boolean).join(' ') ??
415
434
  '',
416
- firstName: p.firstName ?? '',
417
- lastName: p.lastName ?? '',
418
435
  businessEmail: p.businessEmail ?? '',
419
436
  mobile: p.mobile ?? '',
420
437
  }));