summaryrefslogtreecommitdiffstats
path: root/webapp/src/components/GroupModuleEditDialog.vue
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/src/components/GroupModuleEditDialog.vue')
-rw-r--r--webapp/src/components/GroupModuleEditDialog.vue83
1 files changed, 0 insertions, 83 deletions
diff --git a/webapp/src/components/GroupModuleEditDialog.vue b/webapp/src/components/GroupModuleEditDialog.vue
deleted file mode 100644
index 8eab1e1..0000000
--- a/webapp/src/components/GroupModuleEditDialog.vue
+++ /dev/null
@@ -1,83 +0,0 @@
-<i18n>
-{
- "en": {
- },
- "de": {
- }
-}
-</i18n>
-
-<template>
- <v-dialog :value="editDialog" @input="setEditDialog" max-width="600px">
- <v-card>
- <div class="input-fields">
- <v-text-field v-model="name" label="Name" box color="primary"></v-text-field>
- </div>
- <div class="action-buttons text-xs-right">
- <v-btn flat @click="$emit('close')">Cancel</v-btn>
- <v-btn color="primary" @click="saveData">Save</v-btn>
- </div>
- </v-card>
- </v-dialog>
-</template>
-
-<script>
-import { mapState, mapMutations } from 'vuex'
-
-export default {
- name: 'GroupModuleEditDialog',
- props: ['id', 'client'],
- data () {
- return {
- name: ''
- }
- },
- computed: {
- ...mapState('groups', ['editDialog'])
- },
- methods: {
- ...mapMutations('groups', ['setEditDialog']),
- loadData () {
- if (!this.id) return
- if (this.client) {
- // TODO
- } else {
- this.$http('/api/groups?action=getInfo&id=' + this.id).then(response => {
- this.name = response.data.name
- })
- }
- },
- saveData () {
- if (this.client) {
- // TODO
- } else {
- this.$http.post('/api/groups', {
- action: 'setInfo',
- id: this.id,
- name: this.name
- }).then(response => {
- console.log(response)
- })
- }
- this.$emit('close')
- this.$emit('reload')
- }
- },
- created () {
- this.loadData()
- }
-}
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style scoped>
-.input-fields {
- padding: 40px;
- padding-bottom: 0;
-}
-
-.action-buttons {
- padding: 10px;
-}
-
-</style>