changeset 4324:36d384326407

BottleneckDialogue: Prototype for delete of surveys implemented
author Thomas Junk <thomas.junk@intevation.de>
date Wed, 04 Sep 2019 14:39:51 +0200
parents ab7d80baebe6
children 124a5a7fe8d6
files client/src/components/fairway/BottleneckDialogue.vue
diffstat 1 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/fairway/BottleneckDialogue.vue	Wed Sep 04 14:16:57 2019 +0200
+++ b/client/src/components/fairway/BottleneckDialogue.vue	Wed Sep 04 14:39:51 2019 +0200
@@ -306,6 +306,7 @@
 import { displayError, displayInfo } from "@/lib/errors";
 import { HTTP } from "@/lib/http";
 import { COMPARESURVEYS } from "@/components/paneSetups";
+import lib from "@/lib/filters";
 
 export default {
   name: "profiles",
@@ -633,19 +634,22 @@
       });
     },
     deleteSelectedSurvey() {
+      const surveyText = `${this.selectedBottleneck}: ${lib.surveyDate(
+        this.selectedSurvey.date_info
+      )}`;
       this.$store.commit("application/popup", {
         icon: "trash",
         title: this.$gettext("Delete survey"),
         content:
+          `<small><b>` +
           this.$gettext("Do you really want to delete the survey:") +
-          `<br>
-        <b>${this.selectedBottleneck}: ${this.selectedSurvey.date_info}</b>`,
+          `</b><br>
+        ${surveyText}</small>`,
         confirm: {
           label: this.$gettext("Delete"),
           icon: "trash",
           callback: () => {
-            console.log("delete selected");
-            displayInfo({ title: this.$gettext("Profile deleted!") });
+            displayInfo({ title: this.$gettext("Not implemented") });
           }
         },
         cancel: {
@@ -659,9 +663,10 @@
         icon: "trash",
         title: this.$gettext("Delete cross profile"),
         content:
+          `<small><b>` +
           this.$gettext("Do you really want to delete the cross profile:") +
-          `<br>
-        <b>${cut.label}</b>`,
+          `</b><br>
+        ${cut.label}</small>`,
         confirm: {
           label: this.$gettext("Delete"),
           icon: "trash",