This commit is contained in:
@@ -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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<span class="v-label v-label--active theme--light">
|
||||
{{ $ay.t("Attachments") }}
|
||||
</span>
|
||||
{{ attachedFileListDisplay() }}
|
||||
{{ displayList }}
|
||||
<v-tabs v-model="tab" color="primary">
|
||||
<v-tabs-slider></v-tabs-slider>
|
||||
<v-tab key="list"><v-icon>fa-folder</v-icon></v-tab>
|
||||
@@ -13,7 +13,7 @@
|
||||
<div class="mt-4" :style="cardTextStyle()">
|
||||
<v-list color="grey lighten-5" three-line>
|
||||
<v-list-item
|
||||
v-for="item in attachedFileListDisplay()"
|
||||
v-for="item in displayList"
|
||||
:key="item.id"
|
||||
@click="download(item.id)"
|
||||
>
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user