From 2ee2e88a4dd6957a2d44f2a70d03b0c814a2a45b Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 22 Apr 2020 19:05:18 +0000 Subject: [PATCH] --- ayanova/src/api/gzutil.js | 2 +- ayanova/src/components/attachment-control.vue | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ayanova/src/api/gzutil.js b/ayanova/src/api/gzutil.js index 57b49fbd..52aba462 100644 --- a/ayanova/src/api/gzutil.js +++ b/ayanova/src/api/gzutil.js @@ -237,7 +237,7 @@ export default { "application/vnd.openxmlformats-officedocument.presentationml": "fa-file-powerpoint", "application/vnd.oasis.opendocument.presentation": "fa-file-powerpoint", - "text/plain": "fa-file-text", + "text/plain": "fa-file-alt", "text/html": "fa-file-code", "application/json": "fa-file-code", // Archives diff --git a/ayanova/src/components/attachment-control.vue b/ayanova/src/components/attachment-control.vue index b5a78ead..2844f0a2 100644 --- a/ayanova/src/components/attachment-control.vue +++ b/ayanova/src/components/attachment-control.vue @@ -3,7 +3,7 @@ {{ $ay.t("Attachments") }} - {{ attachedFileListDisplay() }} + {{ displayList }} fa-folder @@ -13,7 +13,7 @@
@@ -73,6 +73,7 @@ export default { return { height: 300, attachedFiles: [], + displayList: [], notes: null, tab: null, uploadFiles: [] @@ -106,6 +107,7 @@ export default { // window.$gz.form.setErrorBoxErrors(vm); } else { this.attachedFiles = res.data; + this.updateDisplayList(); } }); //todo: popup message box on error seems best way to handle this for now // .catch(function handleSubmitError(error) { @@ -121,14 +123,14 @@ export default { download(item) { console.log("CLICK", item); }, - attachedFileListDisplay() { + updateDisplayList() { //{"data":[{"id":1,"concurrencyToken":7733332,"contentType":"image/png","displayFileName":"Screen Shot 2020-01-09 at 10.50.24.png","lastModified":"0001-01-01T00:00:00Z","notes":"Here are notes"},{"id":4,"concurrencyToken":7733354,"contentType":"text/plain","displayFileName":"TNT log file ayanova.txt","lastModified":"0001-01-01T00:00:00Z","notes":"Here are notes"},{"id":2,"concurrencyToken":7733342,"contentType":"text/plain","displayFileName":"stack.txt","lastModified":"0001-01-01T00:00:00Z","notes":"Here are notes"},{"id":3,"concurrencyToken":7733348,"contentType":"image/jpeg","displayFileName":"t2cx6sloffk41.jpg","lastModified":"0001-01-01T00:00:00Z","notes":"Here are notes"}]} let timeZoneName = window.$gz.locale.getBrowserTimeZoneName(); let languageName = window.$gz.locale.getBrowserLanguages(); let hour12 = window.$gz.store.state.locale.hour12; let ret = []; - for (let i = 0; i < this.attachedFiles; i++) { + for (let i = 0; i < this.attachedFiles.length; i++) { let o = this.attachedFiles[i]; ret.push({ id: o.id, @@ -143,7 +145,7 @@ export default { icon: window.$gz.util.iconForMIMEType(o.contentType) }); } - return ret; + this.displayList = ret; } } };