Commit 300f2581 authored by Grégor JOUET's avatar Grégor JOUET 🔧
Browse files

Manual reload on admin screen

parent 1b1e5dfd
Loading
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -118,7 +118,7 @@
          <v-btn
            color="indigo"
            v-on:click="infos"
            @click="admin_dialog = true"
            @click="toggle_admin()"
            v-show="show_admin()"
          >
            <v-icon color="red">mdi-hammer-screwdriver</v-icon>&nbsp;Admin
@@ -270,6 +270,13 @@ export default {
    },
    start_reload() {
      this.$emit("startReload");
    },
    toggle_admin() {
      this.admin_dialog = !this.admin_dialog
      if(this.admin_dialog)
        this.stop_reload()
      else
        this.start_reload()
    }
  },
  props: ["id", "admin"],
+12 −10
Original line number Diff line number Diff line
@@ -203,6 +203,7 @@ export default {
      this.$emit('startReload')
    },
    reload () {
      this.$store.dispatch("update_requests", {status: [], no_load: false}).then((resp) => {
        var o = this.$store.state.admin_requests_dict[this.id]
        this.title = o.title
        this.fullname = o.fullname,
@@ -213,6 +214,7 @@ export default {
        setTimeout(() => {
          this.queue = o.queue ? this.all_queues.filter((elem) => {return elem.id == o.queue})[0] : null;
        }, 300)
      })
    },
    approve_request() {
      this.$store.dispatch('update_request', {id: this.id, changes: {status: 1}}).then(() => {