diff --git a/src/components/ApplyTag.vue b/src/components/ApplyTag.vue index 5f0769a..aab630f 100644 --- a/src/components/ApplyTag.vue +++ b/src/components/ApplyTag.vue @@ -5,9 +5,22 @@ - + + @@ -19,6 +32,7 @@ name: 'app', props: [ "transaction", + "tagsExpenditure", "isModalVisible" ], components: { @@ -26,14 +40,24 @@ }, data () { return { + selectedTag: "" }; }, methods: { + closeModal() { + this.$emit('close'); + }, showModal() { this.$emit('show'); }, - closeModal() { + saveTransaction() { + const newTransaction = this.transaction; + var newTags = []; + newTags.push(this.selectedTag); + newTransaction.tags = newTags; + this.$emit('close'); + this.$emit('add', newTransaction); } }, }; diff --git a/src/views/Home.vue b/src/views/Home.vue index 9814715..a37b108 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -1,6 +1,6 @@