summaryrefslogtreecommitdiffstats
path: root/webapp/src/components/RegistrationModuleDelete.vue
diff options
context:
space:
mode:
authorUdo Walter2018-11-12 05:59:16 +0100
committerUdo Walter2018-11-12 05:59:16 +0100
commit5a15373dcd76ed7371dbbee88104dd0c4384a889 (patch)
tree1d2c798f7602e17c007d67d279a7cb1ee754b053 /webapp/src/components/RegistrationModuleDelete.vue
parent[iDoIT] Rework the import method to use batch requests (diff)
downloadbas-5a15373dcd76ed7371dbbee88104dd0c4384a889.tar.gz
bas-5a15373dcd76ed7371dbbee88104dd0c4384a889.tar.xz
bas-5a15373dcd76ed7371dbbee88104dd0c4384a889.zip
[registration] add configurator for registration hooks
Diffstat (limited to 'webapp/src/components/RegistrationModuleDelete.vue')
-rw-r--r--webapp/src/components/RegistrationModuleDelete.vue63
1 files changed, 63 insertions, 0 deletions
diff --git a/webapp/src/components/RegistrationModuleDelete.vue b/webapp/src/components/RegistrationModuleDelete.vue
new file mode 100644
index 0000000..002e629
--- /dev/null
+++ b/webapp/src/components/RegistrationModuleDelete.vue
@@ -0,0 +1,63 @@
+<i18n>
+{
+ "en": {
+ "title": "Delete this hook?"
+ },
+ "de": {
+ "title": "Diesen Hook löschen?"
+ }
+}
+</i18n>
+
+<template>
+ <v-card>
+ <v-card-title primary-title class="dialog-title elevation-3">
+ <div class="headline">{{ $t('title') }}</div>
+ </v-card-title>
+ <v-card-text>
+ {{ dialog.info.type }} {{ dialog.info.name }}
+ </v-card-text>
+ <v-divider></v-divider>
+ <v-card-actions>
+ <v-spacer></v-spacer>
+ <v-btn flat="flat" @click="setDialog({ show: false })">{{ $t('cancel') }}</v-btn>
+ <v-btn color="error" @click="deleteItems">{{ $t('delete') }}</v-btn>
+ </v-card-actions>
+ </v-card>
+</template>
+
+<script>
+import axios from 'axios'
+import { mapState } from 'vuex'
+
+export default {
+ name: 'RegistrationModuleDelete',
+ data () {
+ return {
+ }
+ },
+ computed: {
+ ...mapState('registration', ['dialog'])
+ },
+ methods: {
+ setDialog (data) {
+ this.$store.commit('registration/setDialog', data)
+ },
+ async deleteItems () {
+ await axios.delete('/api/registrations/hooks/' + this.dialog.info.id)
+ this.$store.dispatch('registration/loadHooks')
+ this.setDialog({ show: false })
+ }
+ }
+}
+</script>
+
+<!-- Add "scoped" attribute to limit CSS to this component only -->
+<style scoped>
+.dialog-title {
+ z-index: 1;
+}
+.selected-list {
+ padding: 30px;
+}
+</style>