This commit is contained in:
@@ -69,6 +69,7 @@ CURRENT TODOs
|
|||||||
todo: Attachments / wiki: wiki html processor needs to append dl token to local files in the wikiview automatically in real time
|
todo: Attachments / wiki: wiki html processor needs to append dl token to local files in the wikiview automatically in real time
|
||||||
todo: attachments - form key for hiding / showing customization
|
todo: attachments - form key for hiding / showing customization
|
||||||
todo: attachment - rename a file or add notes after already uploaded
|
todo: attachment - rename a file or add notes after already uploaded
|
||||||
|
todo: attachment EVENTLOG user download file, maybe it's event on object attached to but textra says file name
|
||||||
|
|
||||||
https://medium.com/js-dojo/upload-files-to-cloudinary-using-vue-vuetify-dd45472c4fd6
|
https://medium.com/js-dojo/upload-files-to-cloudinary-using-vue-vuetify-dd45472c4fd6
|
||||||
1578595824571
|
1578595824571
|
||||||
@@ -112,7 +113,7 @@ todo: EventLog Processor at server has TWO! separate skip and take portions in t
|
|||||||
|
|
||||||
todo: before moving on to the next thing, triage these suggestions as there are many impactful ones
|
todo: before moving on to the next thing, triage these suggestions as there are many impactful ones
|
||||||
- https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/3745
|
- https://rockfish.ayanova.com/default.htm#!/rfcaseEdit/3745
|
||||||
|
|
||||||
TODO: PRIORITIZE THE FOLLOWING BLOCK AND move INTO appropriate STAGES
|
TODO: PRIORITIZE THE FOLLOWING BLOCK AND move INTO appropriate STAGES
|
||||||
******************************************************************
|
******************************************************************
|
||||||
(these items came up looking through the raven priority 1 cases for general UI stuff)
|
(these items came up looking through the raven priority 1 cases for general UI stuff)
|
||||||
@@ -223,6 +224,7 @@ todo: INVESTIGATE / REDO THE TOP LEVEL SHELL - TIME TO MARKET / Is my shell layo
|
|||||||
to have a lot of columns display at times, yes it's a ui made up of a bunch of lists but that's really what people understand, it's appropriate to the application,
|
to have a lot of columns display at times, yes it's a ui made up of a bunch of lists but that's really what people understand, it's appropriate to the application,
|
||||||
no business software can simply hide everything and it doesn't have to suck or be ugly
|
no business software can simply hide everything and it doesn't have to suck or be ugly
|
||||||
|
|
||||||
|
todo: test error conditions with dev mode off
|
||||||
|
|
||||||
todo: Clean up TODO list, have only actionable, not completed items.
|
todo: Clean up TODO list, have only actionable, not completed items.
|
||||||
- Make a to_test.txt doc so can move todo's to to test doc for testing
|
- Make a to_test.txt doc so can move todo's to to test doc for testing
|
||||||
|
|||||||
@@ -25,14 +25,13 @@ function dealWithError(msg, vm) {
|
|||||||
}
|
}
|
||||||
window.$gz.store.commit("logItem", msg);
|
window.$gz.store.commit("logItem", msg);
|
||||||
if (window.$gz.dev) {
|
if (window.$gz.dev) {
|
||||||
let errMsg =
|
let errMsg = "Unexpected error: \r\n" + msg;
|
||||||
"DEV ERROR errorHandler::devShowUnknownError - unexpected error: \r\n" +
|
|
||||||
msg;
|
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.error(errMsg);
|
console.error(errMsg);
|
||||||
console.trace();
|
console.trace();
|
||||||
debugger;
|
debugger;
|
||||||
window.$gz.eventBus.$emit("notify-error", "Dev error see log / console");
|
// window.$gz.eventBus.$emit("notify-error", "Dev error see log / console");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//If a form instance was provided (vue instance)
|
//If a form instance was provided (vue instance)
|
||||||
@@ -50,6 +49,9 @@ function dealWithError(msg, vm) {
|
|||||||
//it's related to server errors but I'm setting appError above
|
//it's related to server errors but I'm setting appError above
|
||||||
//why two error properties?
|
//why two error properties?
|
||||||
window.$gz.form.setErrorBoxErrors(vm);
|
window.$gz.form.setErrorBoxErrors(vm);
|
||||||
|
} else {
|
||||||
|
//popup if no place to display it elsewise
|
||||||
|
window.$gz.eventBus.$emit("notify-error", msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -18,23 +18,23 @@ function stringifyPrimitive(v) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////
|
// /////////////////////////////////////////////////
|
||||||
// Show unexpected errors during development
|
// // Show unexpected errors during development
|
||||||
//
|
// //
|
||||||
function devShowUnknownError(error) {
|
// function devShowUnknownError(error) {
|
||||||
if (window.$gz.dev) {
|
// if (window.$gz.dev) {
|
||||||
// eslint-disable-next-line
|
// // eslint-disable-next-line
|
||||||
console.error("gzapi::devShowUnknownError, error is:", error);
|
// console.error("gzapi::devShowUnknownError, error is:", error);
|
||||||
|
|
||||||
console.trace();
|
// console.trace();
|
||||||
debugger;
|
// debugger;
|
||||||
|
|
||||||
window.$gz.eventBus.$emit(
|
// window.$gz.eventBus.$emit(
|
||||||
"notify-warning",
|
// "notify-warning",
|
||||||
"DEV ERROR gzapi::devShowUnknownError - unexpected error during api operation see console "
|
// "DEV ERROR gzapi::devShowUnknownError - unexpected error during api operation see console "
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
////////////////////////////////////////////
|
////////////////////////////////////////////
|
||||||
// Try to handle an api error
|
// Try to handle an api error
|
||||||
@@ -102,7 +102,8 @@ function handleError(action, error, route, reject) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Ideally this should never get called because any issue should be addressed above
|
//Ideally this should never get called because any issue should be addressed above
|
||||||
devShowUnknownError(error);
|
window.$gz.errorHandler.handleFormError(error);
|
||||||
|
// devShowUnknownError(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -126,6 +127,7 @@ export default {
|
|||||||
|
|
||||||
if (response.status == 405) {
|
if (response.status == 405) {
|
||||||
//Probably a development error
|
//Probably a development error
|
||||||
|
|
||||||
return Promise.reject(
|
return Promise.reject(
|
||||||
new Error("Method Not Allowed (route issue?) " + response.url)
|
new Error("Method Not Allowed (route issue?) " + response.url)
|
||||||
);
|
);
|
||||||
@@ -259,6 +261,18 @@ export default {
|
|||||||
return window.$gz.store.state.apiUrl + apiPath;
|
return window.$gz.store.state.apiUrl + apiPath;
|
||||||
},
|
},
|
||||||
/////////////////////////////
|
/////////////////////////////
|
||||||
|
// Attachment download URL
|
||||||
|
//
|
||||||
|
downloadUrl(fileId) {
|
||||||
|
//http://localhost:7575/api/v8/Attachment/download/100?t=sssss
|
||||||
|
return this.APIUrl(
|
||||||
|
"Attachment/download/" +
|
||||||
|
fileId +
|
||||||
|
"?t=" +
|
||||||
|
window.$gz.store.state.downloadToken
|
||||||
|
);
|
||||||
|
},
|
||||||
|
/////////////////////////////
|
||||||
// REPLACE END OF URL
|
// REPLACE END OF URL
|
||||||
// (used to change ID in url)
|
// (used to change ID in url)
|
||||||
replaceAfterLastSlash(theUrl, theReplacement) {
|
replaceAfterLastSlash(theUrl, theReplacement) {
|
||||||
|
|||||||
@@ -11,17 +11,14 @@
|
|||||||
<v-tab-item key="list">
|
<v-tab-item key="list">
|
||||||
<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 displayList" :key="item.id">
|
||||||
v-for="item in displayList"
|
<!-- @click="download(item.id)" -->
|
||||||
:key="item.id"
|
|
||||||
@click="download(item.id)"
|
|
||||||
>
|
|
||||||
<v-list-item-avatar>
|
<v-list-item-avatar>
|
||||||
<v-icon v-text="item.icon"></v-icon>
|
<v-icon v-text="item.icon"></v-icon>
|
||||||
</v-list-item-avatar>
|
</v-list-item-avatar>
|
||||||
|
|
||||||
<v-list-item-content>
|
<v-list-item-content>
|
||||||
<v-list-item-title v-text="item.name"></v-list-item-title>
|
<v-list-item-title v-html="item.title"></v-list-item-title>
|
||||||
|
|
||||||
<v-list-item-subtitle
|
<v-list-item-subtitle
|
||||||
v-text="item.date"
|
v-text="item.date"
|
||||||
@@ -95,33 +92,28 @@ export default {
|
|||||||
return "height: " + this.height + "px;overflow-y:auto;";
|
return "height: " + this.height + "px;overflow-y:auto;";
|
||||||
},
|
},
|
||||||
upload() {
|
upload() {
|
||||||
|
let vm = this;
|
||||||
let at = {
|
let at = {
|
||||||
ayaId: this.ayaId,
|
ayaId: vm.ayaId,
|
||||||
ayaType: this.ayaType,
|
ayaType: vm.ayaType,
|
||||||
files: this.uploadFiles,
|
files: vm.uploadFiles,
|
||||||
notes: this.notes ? this.notes : ""
|
notes: vm.notes ? vm.notes : ""
|
||||||
};
|
};
|
||||||
|
|
||||||
window.$gz.api.uploadAttachment(at).then(res => {
|
window.$gz.api
|
||||||
//vm.formState.loading = false;
|
.uploadAttachment(at)
|
||||||
if (res.error) {
|
.then(res => {
|
||||||
console.log(res.error);
|
if (res.error) {
|
||||||
// vm.formState.serverError = res.error;
|
window.$gz.errorHandler.handleFormError(res.error);
|
||||||
// window.$gz.form.setErrorBoxErrors(vm);
|
} else {
|
||||||
} else {
|
vm.uploadFiles = [];
|
||||||
this.attachedFiles = res.data;
|
vm.attachedFiles = res.data;
|
||||||
this.updateDisplayList();
|
vm.updateDisplayList();
|
||||||
}
|
}
|
||||||
}); //todo: popup message box on error seems best way to handle this for now
|
})
|
||||||
// .catch(function handleSubmitError(error) {
|
.catch(function handleUploadError(error) {
|
||||||
// vm.formState.loading = false;
|
window.$gz.errorHandler.handleFormError(error);
|
||||||
// window.$gz.errorHandler.handleFormError(error, vm);
|
});
|
||||||
// });
|
|
||||||
// if (this.uploadFiles.length > 0) {
|
|
||||||
// this.uploadFiles.forEach(file => {
|
|
||||||
// window.console.log(file);
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
let vm = this;
|
let vm = this;
|
||||||
@@ -129,26 +121,24 @@ export default {
|
|||||||
.get("Attachment/list?ayatype=" + vm.ayaType + "&ayaid=" + vm.ayaId)
|
.get("Attachment/list?ayatype=" + vm.ayaType + "&ayaid=" + vm.ayaId)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.error) {
|
if (res.error) {
|
||||||
console.log(res.error);
|
window.$gz.errorHandler.handleFormError(res.error);
|
||||||
} else {
|
} else {
|
||||||
vm.attachedFiles = res.data;
|
vm.attachedFiles = res.data;
|
||||||
vm.updateDisplayList();
|
vm.updateDisplayList();
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.catch(function handleGetListError(error) {
|
||||||
|
window.$gz.errorHandler.handleFormError(error);
|
||||||
});
|
});
|
||||||
// .catch(function handleGetDataFromAPIError(error) {
|
|
||||||
// //Update the form status
|
|
||||||
// window.$gz.form.setFormState({
|
|
||||||
// vm: vm,
|
|
||||||
// loading: false
|
|
||||||
// });
|
|
||||||
// window.$gz.errorHandler.handleFormError(error, vm);
|
|
||||||
// });
|
|
||||||
},
|
},
|
||||||
download(item) {
|
download(item) {
|
||||||
console.log("CLICK", item);
|
console.log("CLICK", item);
|
||||||
},
|
},
|
||||||
updateDisplayList() {
|
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"}]}
|
||||||
|
if (!this.attachedFiles) {
|
||||||
|
this.attachedFiles = [];
|
||||||
|
}
|
||||||
|
|
||||||
let timeZoneName = window.$gz.locale.getBrowserTimeZoneName();
|
let timeZoneName = window.$gz.locale.getBrowserTimeZoneName();
|
||||||
let languageName = window.$gz.locale.getBrowserLanguages();
|
let languageName = window.$gz.locale.getBrowserLanguages();
|
||||||
@@ -156,8 +146,15 @@ export default {
|
|||||||
let ret = [];
|
let ret = [];
|
||||||
for (let i = 0; i < this.attachedFiles.length; i++) {
|
for (let i = 0; i < this.attachedFiles.length; i++) {
|
||||||
let o = this.attachedFiles[i];
|
let o = this.attachedFiles[i];
|
||||||
|
//http://localhost:7575/api/v8/Attachment/download/100?t=sssss
|
||||||
ret.push({
|
ret.push({
|
||||||
id: o.id,
|
id: o.id,
|
||||||
|
title:
|
||||||
|
"<a href='" +
|
||||||
|
window.$gz.api.downloadUrl(o.id) +
|
||||||
|
"' target='_blank'>" +
|
||||||
|
o.displayFileName +
|
||||||
|
"</a>",
|
||||||
name: o.displayFileName,
|
name: o.displayFileName,
|
||||||
date: window.$gz.locale.utcDateToShortDateAndTimeLocalized(
|
date: window.$gz.locale.utcDateToShortDateAndTimeLocalized(
|
||||||
o.lastModified,
|
o.lastModified,
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ import attachmentControl from "./components/attachment-control.vue";
|
|||||||
//DEVELOPMENT MODE
|
//DEVELOPMENT MODE
|
||||||
//THIS SHOULD BE FALSE IN RELEASE
|
//THIS SHOULD BE FALSE IN RELEASE
|
||||||
//************************************************************
|
//************************************************************
|
||||||
const DEV_MODE = true;
|
const DEV_MODE = false;
|
||||||
//************************************************************
|
//************************************************************
|
||||||
//**************************************************************
|
//**************************************************************
|
||||||
//**************************************************************
|
//**************************************************************
|
||||||
|
|||||||
Reference in New Issue
Block a user