From eb25f187cd1099e3177379a85161455f0ab8ca3b Mon Sep 17 00:00:00 2001 From: eduardohumberto Date: Thu, 3 May 2018 21:37:26 -0300 Subject: [PATCH] list attachments of item, see #11 --- src/admin/pages/singles/item-page.vue | 33 +++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/src/admin/pages/singles/item-page.vue b/src/admin/pages/singles/item-page.vue index ccdae75fd..5dc6f1f98 100644 --- a/src/admin/pages/singles/item-page.vue +++ b/src/admin/pages/singles/item-page.vue @@ -5,13 +5,13 @@ :can-cancel="false"/>
- + {{ $i18n.get('edit') + ' ' + $i18n.get('item') }} - +
@@ -56,7 +56,20 @@
-

--

+ + +

--

+

{{ $i18n.get('label_attachments') }} @@ -83,15 +96,20 @@ export default { }, methods: { ...mapActions('item', [ - 'fetchItem' + 'fetchItem', + 'fetchAttachments' ]), ...mapGetters('item', [ - 'getItem' + 'getItem', + 'getAttachments' ]), }, computed: { item(){ return this.getItem(); + }, + attachments(){ + return this.getAttachments(); } }, created(){ @@ -107,6 +125,11 @@ export default { this.fetchItem(this.itemId).then(() => { loadingInstance.isLoading = false; }); + + // Get attachments + this.fetchAttachments(this.itemId).then((result) => { + this.$console.log( result, 'attachments' ); + }); } }