changeset 4193:dc435fbb2d7a

Client: Use importer backend to add a delete job for sections.
author Raimund Renkert <raimund@renkert.org>
date Mon, 12 Aug 2019 15:02:19 +0200
parents 095731c880b4
children 01b846f4eb1e e564ea0ee095
files client/src/components/sections/Sections.vue
diffstat 1 files changed, 15 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/sections/Sections.vue	Mon Aug 12 14:39:55 2019 +0200
+++ b/client/src/components/sections/Sections.vue	Mon Aug 12 15:02:19 2019 +0200
@@ -205,10 +205,21 @@
           label: this.$gettext("Delete"),
           icon: "trash",
           callback: () => {
-            displayInfo({
-              title: this.$gettext("Not implemented"),
-              message: this.$gettext("Deleting ") + section.id
-            });
+            HTTP.post("/imports/dsec",
+              {
+                id: section.id.split(".")[1]*1
+              },
+              {
+                headers: { "X-Gemma-Auth": localStorage.getItem("token") }
+              }
+            )
+              .then(response => {
+
+                displayInfo({
+                  title: this.$gettext("Staging Area"),
+                  message: this.$gettext("Deleting ") + section.properties.objnam
+                });
+              })
           }
         },
         cancel: {