@nkhang1902/strapi-plugin-export-import-clsx 1.5.7 → 1.5.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.
|
@@ -43,6 +43,7 @@ const ExportButtonsEditView = (props) => {
|
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
const currentContentType = getContentType();
|
|
46
|
+
const documentId = window.location.pathname.split('/').pop();
|
|
46
47
|
|
|
47
48
|
const handleExport = async () => {
|
|
48
49
|
const contentType = getContentType();
|
|
@@ -56,7 +57,6 @@ const ExportButtonsEditView = (props) => {
|
|
|
56
57
|
|
|
57
58
|
setIsExporting(true);
|
|
58
59
|
try {
|
|
59
|
-
const documentId = window.location.pathname.split('/').pop();
|
|
60
60
|
const queryParams = new URLSearchParams({
|
|
61
61
|
format: "excel",
|
|
62
62
|
contentType: contentType,
|
|
@@ -118,7 +118,7 @@ const ExportButtonsEditView = (props) => {
|
|
|
118
118
|
}
|
|
119
119
|
};
|
|
120
120
|
|
|
121
|
-
if (!allowedContentTypes.includes(currentContentType)) {
|
|
121
|
+
if (!allowedContentTypes.includes(currentContentType) || !documentId) {
|
|
122
122
|
return null
|
|
123
123
|
}
|
|
124
124
|
return (
|
|
@@ -130,7 +130,7 @@ const ExportButtonsEditView = (props) => {
|
|
|
130
130
|
variant="secondary"
|
|
131
131
|
fullWidth
|
|
132
132
|
>
|
|
133
|
-
Export
|
|
133
|
+
Export Participant List
|
|
134
134
|
</Button>
|
|
135
135
|
</>
|
|
136
136
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nkhang1902/strapi-plugin-export-import-clsx",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.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": {
|