Make sure event is properly emitted

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2020-04-27 12:23:49 +02:00
parent 0659038d0b
commit 7c15a17aa4
5 changed files with 30 additions and 43 deletions

View File

@@ -44,7 +44,11 @@
</div>
</li>
<AttachmentList :card-id="card.id" :removable="true" />
<AttachmentList
:card-id="card.id"
:removable="true"
@deleteAttachment="deleteAttachment"
@restoreAttachment="restoreAttachment" />
</ul>
</div>
</AttachmentDragAndDrop>
@@ -124,7 +128,12 @@ export default {
clickAddNewAttachmment() {
this.$refs.localAttachments.click()
},
deleteAttachment(attachment) {
this.$store.dispatch('deleteAttachment', attachment)
},
restoreAttachment(attachment) {
this.$store.dispatch('restoreAttachment', attachment)
},
},
}
</script>