This commit is contained in:
@@ -85,6 +85,15 @@ todo: Uifielddatatype Phone and TimeSpan support at client, translation keys etc
|
||||
todo: input type email url phone number etc supported on device to activate?
|
||||
if not, it must be supported somehow so figure it out
|
||||
|
||||
todo: search form weirdness
|
||||
ICONS
|
||||
search for "abc" in imported data get a user result then the other results below do not have logos
|
||||
i.e. workorder headoffice, project
|
||||
needs all icons to show properly
|
||||
TYPE NAMES
|
||||
results for some type names show as "type 59" for example instead of "Customer note"
|
||||
|
||||
|
||||
............................................................
|
||||
|
||||
|
||||
@@ -92,26 +101,8 @@ todo: input type email url phone number etc supported on device to activate?
|
||||
CURRENTLY WORKING ON: Customer notes migration
|
||||
|
||||
OUTSTANDING
|
||||
|
||||
Customer note form when not coming from customer should have a link back to the customer form where the name is
|
||||
|
||||
todo: note list should default to order by date descending
|
||||
todo: customer list should default to name alpha a-z
|
||||
|
||||
todo: Search for customer note results in error due to unfinished code:
|
||||
2020-11-26 08:01:12.5541|ERROR|SERVER|Error=>Npgsql.PostgresException (0x80004005): 42703: column m.name does not exist
|
||||
at Npgsql.NpgsqlConnector.<>c__DisplayClass160_0.<<DoReadMessage>g__ReadMessageLong|0>d.MoveNext()
|
||||
--- End of stack trace from previous location ---
|
||||
at Npgsql.NpgsqlConnector.<>c__DisplayClass160_0.<<DoReadMessage>g__ReadMessageLong|0>d.MoveNext()
|
||||
--- End of stack trace from previous location ---
|
||||
at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming)
|
||||
at Npgsql.NpgsqlDataReader.NextResult()
|
||||
at Npgsql.NpgsqlCommand.ExecuteReaderAsync(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)
|
||||
at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior)
|
||||
at AyaNova.Biz.BizObjectNameFetcherDirect.Name(AyaType ayaType, Int64 id, DbCommand cmd) in C:\data\code\raven\server\AyaNova\biz\BizObjectNameFetcherDirect.cs:line 73
|
||||
at AyaNova.Biz.BizObjectNameFetcherDirect.Name(AyaTypeId tid, DbCommand cmd) in C:\data\code\raven\server\AyaNova\biz\BizObjectNameFetcherDirect.cs:line 12
|
||||
at AyaNova.Biz.Search.DoSearchAsync(AyContext ct, Int64 translationId, AuthorizationRoles currentUserRoles, SearchRequestParameters searchParameters) in C:\data\code\raven\server\AyaNova\biz\Search.cs:line 231
|
||||
at AyaNova.Api.Controllers.SearchController.PostSearch(SearchRequestParameters searchParams) in C:\data\code\raven\server\AyaNova\Controllers\SearchController.cs:line 67
|
||||
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -95,7 +95,8 @@ export default {
|
||||
let res = await window.$gz.api.get("enum-list/list/" + enumKey);
|
||||
//We never expect there to be no data here
|
||||
if (!res.hasOwnProperty("data")) {
|
||||
throw new Error(res);
|
||||
// throw new Error(res);
|
||||
return Promise.reject(res);
|
||||
}
|
||||
return res.data;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ function dealWithError(msg, vm) {
|
||||
let errMsg = "DEV MODE errorHandler.js:: Unexpected error: \r\n" + msg;
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(errMsg);
|
||||
//console.trace();
|
||||
|
||||
//debugger;
|
||||
}
|
||||
|
||||
@@ -68,8 +68,16 @@ function dealWithError(msg, vm) {
|
||||
// and return human readable text
|
||||
//
|
||||
function decodeError(e, vm) {
|
||||
// console.log("decodeError The e object is an object:");
|
||||
// //console.log(JSON.stringify(e));
|
||||
// console.log(typeof e === "object");
|
||||
|
||||
//empty?
|
||||
if (e == null || e == "") {
|
||||
if (
|
||||
e == null ||
|
||||
e == "" ||
|
||||
(typeof e === "object" && Object.keys(e).length === 0)
|
||||
) {
|
||||
return "errorHandler::decodeError - Error is unknown / empty";
|
||||
}
|
||||
|
||||
|
||||
@@ -271,7 +271,8 @@ export default {
|
||||
vm.fetching = false;
|
||||
//We never expect there to be no data here
|
||||
if (!res.hasOwnProperty("data")) {
|
||||
throw new Error(res);
|
||||
//throw new Error(res);
|
||||
return Promise.reject(res);
|
||||
}
|
||||
vm.searchResults = res.data;
|
||||
window.$gz.form.addNoSelectionItem(vm.searchResults, true);
|
||||
|
||||
@@ -174,7 +174,7 @@ export default new Router({
|
||||
import(/* webpackChunkName: "cust" */ "./views/cust-customer-notes.vue")
|
||||
},
|
||||
{
|
||||
path: "/cust-customer-notes/:customerid/:recordid",
|
||||
path: "/cust-customer-note/:recordid",
|
||||
name: "customer-note-edit",
|
||||
component: () =>
|
||||
import(/* webpackChunkName: "cust" */ "./views/cust-customer-note.vue")
|
||||
|
||||
@@ -589,14 +589,16 @@ async function initForm(vm) {
|
||||
let res = await window.$gz.api.get("license");
|
||||
//We never expect there to be no data here
|
||||
if (!res.hasOwnProperty("data")) {
|
||||
throw new Error(res);
|
||||
return Promise.reject(res);
|
||||
//throw new Error(res);
|
||||
}
|
||||
vm.currentLicenseInfo = res.data.license;
|
||||
|
||||
res = await window.$gz.api.get("license/database-empty");
|
||||
//We never expect there to be no data here
|
||||
if (!res.hasOwnProperty("data")) {
|
||||
throw new Error(res);
|
||||
return Promise.reject(res);
|
||||
//throw new Error(res);
|
||||
}
|
||||
vm.dbIsEmpty = res.data;
|
||||
}
|
||||
|
||||
@@ -305,7 +305,8 @@ async function getServerInfo(vm) {
|
||||
let res = await window.$gz.api.get("server-info");
|
||||
//We never expect there to be no data here
|
||||
if (!res.hasOwnProperty("data")) {
|
||||
throw new Error(res);
|
||||
//throw new Error(res);
|
||||
return Promise.reject(res);
|
||||
} else {
|
||||
vm.serverInfo = res.data;
|
||||
}
|
||||
|
||||
@@ -205,7 +205,8 @@ export default {
|
||||
let res = await window.$gz.api.get("license/database-empty");
|
||||
//We never expect there to be no data here
|
||||
if (!res.hasOwnProperty("data")) {
|
||||
throw new Error(res);
|
||||
return Promise.reject(res);
|
||||
//throw new Error(res);
|
||||
}
|
||||
if (res.data != true) {
|
||||
let dialogResult = await window.$gz.dialog.confirmGeneric(
|
||||
|
||||
@@ -1186,7 +1186,8 @@ async function fetchReportData(vm) {
|
||||
let res = await window.$gz.api.upsert("report/data", reportDataOptions);
|
||||
//We never expect there to be no data here
|
||||
if (!res.hasOwnProperty("data")) {
|
||||
throw new Error(res);
|
||||
return Promise.reject(res);
|
||||
//throw new Error(res);
|
||||
} else {
|
||||
vm.reportData = res.data;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<v-row>
|
||||
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
|
||||
<v-col cols="12" v-if="customername">
|
||||
{{ customername }}
|
||||
<v-btn @click="goToCustomer"> {{ customername }}</v-btn>
|
||||
</v-col>
|
||||
<v-col cols="12">
|
||||
<v-textarea
|
||||
@@ -93,6 +93,11 @@ export default {
|
||||
});
|
||||
} else {
|
||||
await vm.getDataFromApi(vm.$route.params.recordid); //let getdata handle loading
|
||||
if (!vm.customername) {
|
||||
await fetchCustomerName(vm).catch(err => {
|
||||
window.$gz.errorHandler.handleFormError(err, vm);
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
vm.obj.customerId = this.$route.params.customerid;
|
||||
@@ -188,6 +193,15 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goToCustomer() {
|
||||
this.$router.push({
|
||||
name: "customer-edit",
|
||||
params: {
|
||||
recordid: this.obj.customerId
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
canSave: function() {
|
||||
return this.formState.valid && this.formState.dirty;
|
||||
},
|
||||
@@ -233,6 +247,7 @@ export default {
|
||||
window.$gz.form.setErrorBoxErrors(vm);
|
||||
} else {
|
||||
vm.obj = res.data;
|
||||
|
||||
//modify the menu as necessary
|
||||
generateMenu(vm);
|
||||
//Update the form status
|
||||
@@ -502,8 +517,29 @@ async function initForm(vm) {
|
||||
// Ensures UI translated text is available
|
||||
//
|
||||
async function fetchTranslatedText(vm) {
|
||||
await window.$gz.translation.cacheTranslations(["CustomerNoteNotes"]);
|
||||
await window.$gz.translation.cacheTranslations([
|
||||
"CustomerNoteNotes",
|
||||
"CustomerNoteNoteDate"
|
||||
]);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
async function fetchCustomerName(vm) {
|
||||
//If customer name is missing then fetch it here to display
|
||||
//this will happen when this form is directly opened from a search
|
||||
//or record history etc
|
||||
|
||||
let res = await window.$gz.api.get(
|
||||
`name/${window.$gz.type.Customer}/${vm.obj.customerId}`
|
||||
);
|
||||
|
||||
//We never expect there to be no data here
|
||||
if (!res.hasOwnProperty("data")) {
|
||||
return Promise.reject(res);
|
||||
} else {
|
||||
vm.customername = res.data;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
|
||||
Reference in New Issue
Block a user