From 036e355c9bd37eedd1c83547baae671473bd9ba2 Mon Sep 17 00:00:00 2001 From: gitstart Date: Thu, 18 May 2023 14:05:05 +0000 Subject: [PATCH 1/3] disable duplicate for webhook triggers automation Co-authored-by: Moshood Abidemi --- .../AutomationPanel/EditAutomationPopover.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/automation/AutomationPanel/EditAutomationPopover.svelte b/packages/builder/src/components/automation/AutomationPanel/EditAutomationPopover.svelte index 0ce9c781ac..09b9cf07db 100644 --- a/packages/builder/src/components/automation/AutomationPanel/EditAutomationPopover.svelte +++ b/packages/builder/src/components/automation/AutomationPanel/EditAutomationPopover.svelte @@ -32,7 +32,12 @@
- Duplicate + Duplicate Edit Delete From 05851f6b19ad819a9c88b6a43ae8884ba0d18b61 Mon Sep 17 00:00:00 2001 From: gitstart Date: Tue, 6 Jun 2023 15:18:15 +0000 Subject: [PATCH 2/3] Fix CSV encoding issue Co-authored-by: Benjamin Mayanja --- .../components/backend/DataTable/modals/ExportModal.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/backend/DataTable/modals/ExportModal.svelte b/packages/builder/src/components/backend/DataTable/modals/ExportModal.svelte index 6cefe244bf..95586a384b 100644 --- a/packages/builder/src/components/backend/DataTable/modals/ExportModal.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/ExportModal.svelte @@ -130,7 +130,10 @@ notifications.error("Export Failed") } if (response) { - download(response, `export.${exportFormat}`) + download( + new Blob([response], { type: "text/plain" }), + `export.${exportFormat}` + ) notifications.success("Export Successful") } } else { From 0ae378dbec18bec6a3c541bda1d4eada6dcbfc77 Mon Sep 17 00:00:00 2001 From: gitstart Date: Wed, 7 Jun 2023 06:43:30 +0000 Subject: [PATCH 3/3] Update other places where download is used Co-authored-by: v1b3m --- .../backend/DataTable/modals/ExportModal.svelte | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/builder/src/components/backend/DataTable/modals/ExportModal.svelte b/packages/builder/src/components/backend/DataTable/modals/ExportModal.svelte index 95586a384b..ac168698fc 100644 --- a/packages/builder/src/components/backend/DataTable/modals/ExportModal.svelte +++ b/packages/builder/src/components/backend/DataTable/modals/ExportModal.svelte @@ -92,13 +92,20 @@ }, } + function downloadWithBlob(data, filename) { + download(new Blob([data], { type: "text/plain" }), filename) + } + async function exportView() { try { const data = await API.exportView({ viewName: view, format: exportFormat, }) - download(data, `export.${exportFormat === "csv" ? "csv" : "json"}`) + downloadWithBlob( + data, + `export.${exportFormat === "csv" ? "csv" : "json"}` + ) } catch (error) { notifications.error(`Unable to export ${exportFormat.toUpperCase()} data`) } @@ -111,7 +118,7 @@ rows: selectedRows.map(row => row._id), format: exportFormat, }) - download(data, `export.${exportFormat}`) + downloadWithBlob(data, `export.${exportFormat}`) } else if (filters || sorting) { let response try { @@ -130,10 +137,7 @@ notifications.error("Export Failed") } if (response) { - download( - new Blob([response], { type: "text/plain" }), - `export.${exportFormat}` - ) + downloadWithBlob(response, `export.${exportFormat}`) notifications.success("Export Successful") } } else {