This commit is contained in:
@@ -237,7 +237,7 @@ export default {
|
|||||||
"application/vnd.openxmlformats-officedocument.presentationml":
|
"application/vnd.openxmlformats-officedocument.presentationml":
|
||||||
"fa-file-powerpoint",
|
"fa-file-powerpoint",
|
||||||
"application/vnd.oasis.opendocument.presentation": "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",
|
"text/html": "fa-file-code",
|
||||||
"application/json": "fa-file-code",
|
"application/json": "fa-file-code",
|
||||||
// Archives
|
// Archives
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<span class="v-label v-label--active theme--light">
|
<span class="v-label v-label--active theme--light">
|
||||||
{{ $ay.t("Attachments") }}
|
{{ $ay.t("Attachments") }}
|
||||||
</span>
|
</span>
|
||||||
{{ attachedFileListDisplay() }}
|
{{ displayList }}
|
||||||
<v-tabs v-model="tab" color="primary">
|
<v-tabs v-model="tab" color="primary">
|
||||||
<v-tabs-slider></v-tabs-slider>
|
<v-tabs-slider></v-tabs-slider>
|
||||||
<v-tab key="list"><v-icon>fa-folder</v-icon></v-tab>
|
<v-tab key="list"><v-icon>fa-folder</v-icon></v-tab>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
<div class="mt-4" :style="cardTextStyle()">
|
<div class="mt-4" :style="cardTextStyle()">
|
||||||
<v-list color="grey lighten-5" three-line>
|
<v-list color="grey lighten-5" three-line>
|
||||||
<v-list-item
|
<v-list-item
|
||||||
v-for="item in attachedFileListDisplay()"
|
v-for="item in displayList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@click="download(item.id)"
|
@click="download(item.id)"
|
||||||
>
|
>
|
||||||
@@ -73,6 +73,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
height: 300,
|
height: 300,
|
||||||
attachedFiles: [],
|
attachedFiles: [],
|
||||||
|
displayList: [],
|
||||||
notes: null,
|
notes: null,
|
||||||
tab: null,
|
tab: null,
|
||||||
uploadFiles: []
|
uploadFiles: []
|
||||||
@@ -106,6 +107,7 @@ export default {
|
|||||||
// window.$gz.form.setErrorBoxErrors(vm);
|
// window.$gz.form.setErrorBoxErrors(vm);
|
||||||
} else {
|
} else {
|
||||||
this.attachedFiles = res.data;
|
this.attachedFiles = res.data;
|
||||||
|
this.updateDisplayList();
|
||||||
}
|
}
|
||||||
}); //todo: popup message box on error seems best way to handle this for now
|
}); //todo: popup message box on error seems best way to handle this for now
|
||||||
// .catch(function handleSubmitError(error) {
|
// .catch(function handleSubmitError(error) {
|
||||||
@@ -121,14 +123,14 @@ export default {
|
|||||||
download(item) {
|
download(item) {
|
||||||
console.log("CLICK", 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"}]}
|
//{"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 timeZoneName = window.$gz.locale.getBrowserTimeZoneName();
|
||||||
let languageName = window.$gz.locale.getBrowserLanguages();
|
let languageName = window.$gz.locale.getBrowserLanguages();
|
||||||
let hour12 = window.$gz.store.state.locale.hour12;
|
let hour12 = window.$gz.store.state.locale.hour12;
|
||||||
let ret = [];
|
let ret = [];
|
||||||
for (let i = 0; i < this.attachedFiles; i++) {
|
for (let i = 0; i < this.attachedFiles.length; i++) {
|
||||||
let o = this.attachedFiles[i];
|
let o = this.attachedFiles[i];
|
||||||
ret.push({
|
ret.push({
|
||||||
id: o.id,
|
id: o.id,
|
||||||
@@ -143,7 +145,7 @@ export default {
|
|||||||
icon: window.$gz.util.iconForMIMEType(o.contentType)
|
icon: window.$gz.util.iconForMIMEType(o.contentType)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return ret;
|
this.displayList = ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user