diff client/src/components/importconfiguration/ImportDetails.vue @ 5367:1695e17c5a83 extented-report

Adds schedualbility for reports as an import. In order to enable the sysadmin to schedule the automatic reports on dataquality there is now a new import type established. This import allows to edit the schedule for issuing the report. Besides: The layout for the usermanagement is now x-scrollable when overflown.
author Thomas Junk <thomas.junk@intevation.de>
date Wed, 23 Jun 2021 14:46:14 +0200
parents 69cc3d3047ab
children 60bba8e6322b
line wrap: on
line diff
--- a/client/src/components/importconfiguration/ImportDetails.vue	Wed Jun 23 12:10:25 2021 +0200
+++ b/client/src/components/importconfiguration/ImportDetails.vue	Wed Jun 23 14:46:14 2021 +0200
@@ -53,6 +53,11 @@
               <translate>Fairwaymarks</translate>
             </option>
           </optgroup>
+          <optgroup :label="reportslabel" v-if="isSysAdmin">
+            <option :value="$options.IMPORTTYPES.REPORT">
+              <translate>Data Quality Report</translate>
+            </option>
+          </optgroup>
         </select>
       </div>
       <ApprovedGaugeMeasurement
@@ -98,7 +103,7 @@
  * Tom Gottfried <tom.gottfried@intevation.de>
  */
 import { IMPORTTYPES } from "@/store/importschedule";
-import { mapState } from "vuex";
+import { mapState, mapGetters } from "vuex";
 export default {
   components: {
     ApprovedGaugeMeasurement: () => import("./types/ApprovedGaugeMeasurement"),
@@ -111,6 +116,7 @@
   },
   computed: {
     ...mapState("importschedule", ["currentSchedule"]),
+    ...mapGetters("user", ["isSysAdmin"]),
     isOnetime() {
       for (let kind of [
         this.$options.IMPORTTYPES.SOUNDINGRESULTS,
@@ -129,6 +135,9 @@
         this.$store.commit("importschedule/setImportType", value);
       }
     },
+    reportslabel() {
+      return this.$gettext("Reports");
+    },
     onetimeLabel() {
       return this.$gettext("Onetime Imports");
     },