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?
|
todo: input type email url phone number etc supported on device to activate?
|
||||||
if not, it must be supported somehow so figure it out
|
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
|
CURRENTLY WORKING ON: Customer notes migration
|
||||||
|
|
||||||
OUTSTANDING
|
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);
|
let res = await window.$gz.api.get("enum-list/list/" + enumKey);
|
||||||
//We never expect there to be no data here
|
//We never expect there to be no data here
|
||||||
if (!res.hasOwnProperty("data")) {
|
if (!res.hasOwnProperty("data")) {
|
||||||
throw new Error(res);
|
// throw new Error(res);
|
||||||
|
return Promise.reject(res);
|
||||||
}
|
}
|
||||||
return res.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ function dealWithError(msg, vm) {
|
|||||||
let errMsg = "DEV MODE errorHandler.js:: Unexpected error: \r\n" + msg;
|
let errMsg = "DEV MODE errorHandler.js:: 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();
|
|
||||||
//debugger;
|
//debugger;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,8 +68,16 @@ function dealWithError(msg, vm) {
|
|||||||
// and return human readable text
|
// and return human readable text
|
||||||
//
|
//
|
||||||
function decodeError(e, vm) {
|
function decodeError(e, vm) {
|
||||||
|
// console.log("decodeError The e object is an object:");
|
||||||
|
// //console.log(JSON.stringify(e));
|
||||||
|
// console.log(typeof e === "object");
|
||||||
|
|
||||||
//empty?
|
//empty?
|
||||||
if (e == null || e == "") {
|
if (
|
||||||
|
e == null ||
|
||||||
|
e == "" ||
|
||||||
|
(typeof e === "object" && Object.keys(e).length === 0)
|
||||||
|
) {
|
||||||
return "errorHandler::decodeError - Error is unknown / empty";
|
return "errorHandler::decodeError - Error is unknown / empty";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -271,7 +271,8 @@ export default {
|
|||||||
vm.fetching = false;
|
vm.fetching = false;
|
||||||
//We never expect there to be no data here
|
//We never expect there to be no data here
|
||||||
if (!res.hasOwnProperty("data")) {
|
if (!res.hasOwnProperty("data")) {
|
||||||
throw new Error(res);
|
//throw new Error(res);
|
||||||
|
return Promise.reject(res);
|
||||||
}
|
}
|
||||||
vm.searchResults = res.data;
|
vm.searchResults = res.data;
|
||||||
window.$gz.form.addNoSelectionItem(vm.searchResults, true);
|
window.$gz.form.addNoSelectionItem(vm.searchResults, true);
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ export default new Router({
|
|||||||
import(/* webpackChunkName: "cust" */ "./views/cust-customer-notes.vue")
|
import(/* webpackChunkName: "cust" */ "./views/cust-customer-notes.vue")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/cust-customer-notes/:customerid/:recordid",
|
path: "/cust-customer-note/:recordid",
|
||||||
name: "customer-note-edit",
|
name: "customer-note-edit",
|
||||||
component: () =>
|
component: () =>
|
||||||
import(/* webpackChunkName: "cust" */ "./views/cust-customer-note.vue")
|
import(/* webpackChunkName: "cust" */ "./views/cust-customer-note.vue")
|
||||||
|
|||||||
@@ -589,14 +589,16 @@ async function initForm(vm) {
|
|||||||
let res = await window.$gz.api.get("license");
|
let res = await window.$gz.api.get("license");
|
||||||
//We never expect there to be no data here
|
//We never expect there to be no data here
|
||||||
if (!res.hasOwnProperty("data")) {
|
if (!res.hasOwnProperty("data")) {
|
||||||
throw new Error(res);
|
return Promise.reject(res);
|
||||||
|
//throw new Error(res);
|
||||||
}
|
}
|
||||||
vm.currentLicenseInfo = res.data.license;
|
vm.currentLicenseInfo = res.data.license;
|
||||||
|
|
||||||
res = await window.$gz.api.get("license/database-empty");
|
res = await window.$gz.api.get("license/database-empty");
|
||||||
//We never expect there to be no data here
|
//We never expect there to be no data here
|
||||||
if (!res.hasOwnProperty("data")) {
|
if (!res.hasOwnProperty("data")) {
|
||||||
throw new Error(res);
|
return Promise.reject(res);
|
||||||
|
//throw new Error(res);
|
||||||
}
|
}
|
||||||
vm.dbIsEmpty = res.data;
|
vm.dbIsEmpty = res.data;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -305,7 +305,8 @@ async function getServerInfo(vm) {
|
|||||||
let res = await window.$gz.api.get("server-info");
|
let res = await window.$gz.api.get("server-info");
|
||||||
//We never expect there to be no data here
|
//We never expect there to be no data here
|
||||||
if (!res.hasOwnProperty("data")) {
|
if (!res.hasOwnProperty("data")) {
|
||||||
throw new Error(res);
|
//throw new Error(res);
|
||||||
|
return Promise.reject(res);
|
||||||
} else {
|
} else {
|
||||||
vm.serverInfo = res.data;
|
vm.serverInfo = res.data;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -205,7 +205,8 @@ export default {
|
|||||||
let res = await window.$gz.api.get("license/database-empty");
|
let res = await window.$gz.api.get("license/database-empty");
|
||||||
//We never expect there to be no data here
|
//We never expect there to be no data here
|
||||||
if (!res.hasOwnProperty("data")) {
|
if (!res.hasOwnProperty("data")) {
|
||||||
throw new Error(res);
|
return Promise.reject(res);
|
||||||
|
//throw new Error(res);
|
||||||
}
|
}
|
||||||
if (res.data != true) {
|
if (res.data != true) {
|
||||||
let dialogResult = await window.$gz.dialog.confirmGeneric(
|
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);
|
let res = await window.$gz.api.upsert("report/data", reportDataOptions);
|
||||||
//We never expect there to be no data here
|
//We never expect there to be no data here
|
||||||
if (!res.hasOwnProperty("data")) {
|
if (!res.hasOwnProperty("data")) {
|
||||||
throw new Error(res);
|
return Promise.reject(res);
|
||||||
|
//throw new Error(res);
|
||||||
} else {
|
} else {
|
||||||
vm.reportData = res.data;
|
vm.reportData = res.data;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<v-row>
|
<v-row>
|
||||||
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
|
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
|
||||||
<v-col cols="12" v-if="customername">
|
<v-col cols="12" v-if="customername">
|
||||||
{{ customername }}
|
<v-btn @click="goToCustomer"> {{ customername }}</v-btn>
|
||||||
</v-col>
|
</v-col>
|
||||||
<v-col cols="12">
|
<v-col cols="12">
|
||||||
<v-textarea
|
<v-textarea
|
||||||
@@ -93,6 +93,11 @@ export default {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
await vm.getDataFromApi(vm.$route.params.recordid); //let getdata handle loading
|
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 {
|
} else {
|
||||||
vm.obj.customerId = this.$route.params.customerid;
|
vm.obj.customerId = this.$route.params.customerid;
|
||||||
@@ -188,6 +193,15 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
goToCustomer() {
|
||||||
|
this.$router.push({
|
||||||
|
name: "customer-edit",
|
||||||
|
params: {
|
||||||
|
recordid: this.obj.customerId
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
canSave: function() {
|
canSave: function() {
|
||||||
return this.formState.valid && this.formState.dirty;
|
return this.formState.valid && this.formState.dirty;
|
||||||
},
|
},
|
||||||
@@ -233,6 +247,7 @@ export default {
|
|||||||
window.$gz.form.setErrorBoxErrors(vm);
|
window.$gz.form.setErrorBoxErrors(vm);
|
||||||
} else {
|
} else {
|
||||||
vm.obj = res.data;
|
vm.obj = res.data;
|
||||||
|
|
||||||
//modify the menu as necessary
|
//modify the menu as necessary
|
||||||
generateMenu(vm);
|
generateMenu(vm);
|
||||||
//Update the form status
|
//Update the form status
|
||||||
@@ -502,8 +517,29 @@ async function initForm(vm) {
|
|||||||
// Ensures UI translated text is available
|
// Ensures UI translated text is available
|
||||||
//
|
//
|
||||||
async function fetchTranslatedText(vm) {
|
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>
|
</script>
|
||||||
|
|
||||||
<style></style>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user