This commit is contained in:
@@ -345,17 +345,22 @@ CURRENTLY DOING: labors
|
|||||||
|
|
||||||
todo: address setting - rather than setting it *at* the client automatically shouldn't it set at the server automatically?
|
todo: address setting - rather than setting it *at* the client automatically shouldn't it set at the server automatically?
|
||||||
this would remove some weight from the client and with a forcefullrefresh system in place that will help with this as well.
|
this would remove some weight from the client and with a forcefullrefresh system in place that will help with this as well.
|
||||||
|
todo: customer change is fetching both address and alert notes at the same time
|
||||||
|
since server detects change anyway couldn't that be part of the refresh?? or is that too much?
|
||||||
|
|
||||||
|
todo: since a contract change is resulting in refresh no need to retun the full object, just a flag that says refresh maybe??
|
||||||
|
|
||||||
|
|
||||||
todo: check contract expiry for applying!!
|
todo: check contract expiry for applying!!
|
||||||
|
|
||||||
todo: Test back end correctly sets contract on new wo and correctly sets response time (complete by date) on NEW workorder
|
todo: Test back end correctly sets contract on new wo and correctly sets response time (complete by date) on NEW workorder
|
||||||
|
todo: remove contract control entirely from code
|
||||||
|
todo:
|
||||||
|
|
||||||
todo: Server new wo auto contract resolution code,
|
todo: Server new wo auto contract resolution code,
|
||||||
if NEW record and contractid already set then use that otherwise find effective one and set (only way it's set automatically)
|
if NEW record and contractid already set then use that otherwise find effective one and set (only way it's set automatically)
|
||||||
|
|
||||||
todo: alert notes should show the object name and type above the notes for quick clarity
|
|
||||||
|
|
||||||
|
|
||||||
todo: replicate labor save code at front and back to the other contracted objects
|
todo: replicate labor save code at front and back to the other contracted objects
|
||||||
|
|||||||
@@ -348,58 +348,58 @@ export default {
|
|||||||
this.value.isDirty = true;
|
this.value.isDirty = true;
|
||||||
window.$gz.form.fieldValueChanged(this.pvm, ref);
|
window.$gz.form.fieldValueChanged(this.pvm, ref);
|
||||||
|
|
||||||
if (ref == "customerId") {
|
// if (ref == "customerId") {
|
||||||
this.value.alertViz = null;
|
// this.value.alertViz = null;
|
||||||
const custId = this.value.customerId;
|
// const custId = this.value.customerId;
|
||||||
if (custId != null) {
|
// if (custId != null) {
|
||||||
//------ Alert notes
|
// //------ Alert notes
|
||||||
let res = await window.$gz.api.get(`customer/alert/${custId}`);
|
// let res = await window.$gz.api.get(`customer/alert/${custId}`);
|
||||||
if (res.data) {
|
// if (res.data) {
|
||||||
this.value.alertViz = res.data;
|
// this.value.alertViz = res.data;
|
||||||
}
|
// }
|
||||||
//------ Addresses
|
// //------ Addresses
|
||||||
res = await window.$gz.api.get(`customer/address/${custId}`);
|
// res = await window.$gz.api.get(`customer/address/${custId}`);
|
||||||
if (res.data) {
|
// if (res.data) {
|
||||||
//Addresses are considered non-empty if the PostAddress or Address field is not empty
|
// //Addresses are considered non-empty if the PostAddress or Address field is not empty
|
||||||
|
|
||||||
//Set Billing address
|
// //Set Billing address
|
||||||
if (
|
// if (
|
||||||
!window.$gz.util.stringIsNullOrEmpty(
|
// !window.$gz.util.stringIsNullOrEmpty(
|
||||||
res.data.headofficepost.postAddress
|
// res.data.headofficepost.postAddress
|
||||||
)
|
// )
|
||||||
) {
|
// ) {
|
||||||
//Use head office bill to address
|
// //Use head office bill to address
|
||||||
this.value.postAddress = res.data.headofficepost.postAddress;
|
// this.value.postAddress = res.data.headofficepost.postAddress;
|
||||||
this.value.postCity = res.data.headofficepost.postCity;
|
// this.value.postCity = res.data.headofficepost.postCity;
|
||||||
this.value.postRegion = res.data.headofficepost.postRegion;
|
// this.value.postRegion = res.data.headofficepost.postRegion;
|
||||||
this.value.postCountry = res.data.headofficepost.postCountry;
|
// this.value.postCountry = res.data.headofficepost.postCountry;
|
||||||
this.value.postCode = res.data.headofficepost.postCode;
|
// this.value.postCode = res.data.headofficepost.postCode;
|
||||||
} else {
|
// } else {
|
||||||
//Use customer postal address, if it's empty then it's empty
|
// //Use customer postal address, if it's empty then it's empty
|
||||||
this.value.postAddress = res.data.customerpost.postAddress;
|
// this.value.postAddress = res.data.customerpost.postAddress;
|
||||||
this.value.postCity = res.data.customerpost.postCity;
|
// this.value.postCity = res.data.customerpost.postCity;
|
||||||
this.value.postRegion = res.data.customerpost.postRegion;
|
// this.value.postRegion = res.data.customerpost.postRegion;
|
||||||
this.value.postCountry = res.data.customerpost.postCountry;
|
// this.value.postCountry = res.data.customerpost.postCountry;
|
||||||
this.value.postCode = res.data.customerpost.postCode;
|
// this.value.postCode = res.data.customerpost.postCode;
|
||||||
}
|
// }
|
||||||
|
|
||||||
//Set service address
|
// //Set service address
|
||||||
if (
|
// if (
|
||||||
!window.$gz.util.stringIsNullOrEmpty(
|
// !window.$gz.util.stringIsNullOrEmpty(
|
||||||
res.data.customerphys.address
|
// res.data.customerphys.address
|
||||||
)
|
// )
|
||||||
) {
|
// ) {
|
||||||
//Use head office bill to address
|
// //Use head office bill to address
|
||||||
this.value.address = res.data.customerphys.address;
|
// this.value.address = res.data.customerphys.address;
|
||||||
this.value.city = res.data.customerphys.city;
|
// this.value.city = res.data.customerphys.city;
|
||||||
this.value.region = res.data.customerphys.region;
|
// this.value.region = res.data.customerphys.region;
|
||||||
this.value.country = res.data.customerphys.country;
|
// this.value.country = res.data.customerphys.country;
|
||||||
this.value.latitude = res.data.customerphys.latitude;
|
// this.value.latitude = res.data.customerphys.latitude;
|
||||||
this.value.longitude = res.data.customerphys.longitude;
|
// this.value.longitude = res.data.customerphys.longitude;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -663,6 +663,7 @@ async function saveHeader(vm) {
|
|||||||
//update any server changed fields
|
//update any server changed fields
|
||||||
vm.obj.concurrency = res.data.concurrency;
|
vm.obj.concurrency = res.data.concurrency;
|
||||||
vm.obj.isDirty = false;
|
vm.obj.isDirty = false;
|
||||||
|
vm.obj.alertViz = res.data.alertViz;
|
||||||
vm.obj.contractId = res.data.contractId; //may or may not have changed at server, this will ensure entire ui gets updated if it has as all prices may have changed and other stuff
|
vm.obj.contractId = res.data.contractId; //may or may not have changed at server, this will ensure entire ui gets updated if it has as all prices may have changed and other stuff
|
||||||
|
|
||||||
// //this sets 'o' to all values in assigned *except* the ones itemized with removedKey which is a fake key and just used for this trick to work
|
// //this sets 'o' to all values in assigned *except* the ones itemized with removedKey which is a fake key and just used for this trick to work
|
||||||
|
|||||||
Reference in New Issue
Block a user