You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/07/28 20:53:39 UTC

[GitHub] [superset] eschutho commented on a change in pull request #15934: feat: Delete Report Modal for charts and Dashboards

eschutho commented on a change in pull request #15934:
URL: https://github.com/apache/superset/pull/15934#discussion_r678644406



##########
File path: superset-frontend/src/reports/actions/reportState.js
##########
@@ -112,3 +112,39 @@ export function toggleActive(report, isActive) {
       });
   };
 }
+
+export function deleteActiveReport(report) {
+  return function deleteActiveReportThunk(dispatch, getState) {
+    return SupersetClient.delete({
+      endpoint: encodeURI(`/api/v1/report/${report.id}`),
+    })
+      .then(() => {
+        const state = getState();
+        const { user, dashboardInfo, charts, explore } = state;
+        if (dashboardInfo) {

Review comment:
       did you want to move these into finally so that they don't show the report could not be deleted error?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org