@nkhang1902/strapi-plugin-export-import-clsx 1.4.4 → 1.4.5
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.
|
|
3
|
+
"version": "1.4.5",
|
|
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": {
|
|
@@ -398,18 +398,16 @@ module.exports = ({ strapi }) => ({
|
|
|
398
398
|
convertExperienceParticipantsToExcel(experienceData) {
|
|
399
399
|
const workbook = XLSX.utils.book_new();
|
|
400
400
|
|
|
401
|
-
const
|
|
402
|
-
|
|
403
|
-
const vipGuests = experienceData?.vipGuests ?? [];
|
|
404
|
-
|
|
401
|
+
const tag = (list, type) =>
|
|
402
|
+
(list ?? []).map(item => ({ ...item, type }));
|
|
405
403
|
const participants = [
|
|
406
|
-
...corporates,
|
|
407
|
-
...investors,
|
|
408
|
-
...vipGuests,
|
|
404
|
+
...tag(experienceData?.corporates, 'corporate'),
|
|
405
|
+
...tag(experienceData?.investors, 'investor'),
|
|
406
|
+
...tag(experienceData?.vipGuests, 'vip'),
|
|
409
407
|
];
|
|
410
|
-
console.log(participants)
|
|
411
408
|
|
|
412
409
|
const data = participants.map((p) => ({
|
|
410
|
+
type: p.type,
|
|
413
411
|
corporateName: p.corporateName ?? '',
|
|
414
412
|
tickerCode: p.tickerCode ?? '',
|
|
415
413
|
fullName:
|
|
@@ -422,6 +420,7 @@ module.exports = ({ strapi }) => ({
|
|
|
422
420
|
mobile: p.mobile ?? '',
|
|
423
421
|
}));
|
|
424
422
|
|
|
423
|
+
console.log(data)
|
|
425
424
|
const worksheet = XLSX.utils.json_to_sheet(data);
|
|
426
425
|
XLSX.utils.book_append_sheet(
|
|
427
426
|
workbook,
|