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;
}
}
};