1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-22 22:59:43 +02:00

Complete PDF section type

This commit is contained in:
Harvey Kandola 2019-04-19 11:30:40 +01:00
parent 7fde947a52
commit b5cd378302
8 changed files with 98 additions and 4 deletions

View file

@ -43,5 +43,19 @@ export default Controller.extend({
{ queryParams: { currentPageId: page.get('id')}});
});
},
onAttachmentUpload() {
this.get('documentService').getAttachments(this.get('model.document.id')).then((files) => {
this.set('model.attachments', files);
});
},
onAttachmentDelete(attachmentId) {
this.get('documentService').deleteAttachment(this.get('model.document.id'), attachmentId).then(() => {
this.get('documentService').getAttachments(this.get('model.document.id')).then((files) => {
this.set('attachments', files);
});
});
},
}
});