This commit is contained in:
2021-02-24 17:32:54 +00:00
parent ea8ad27f31
commit 00202044bb
2 changed files with 3 additions and 5 deletions

View File

@@ -173,7 +173,7 @@ PO UI for items:
PO todo
todo: test new from scratch po
todo: test duplicate route
todo: test inventory affecting ops
reversals, updates, deletes etc

View File

@@ -1140,7 +1140,7 @@ export default {
let url = API_BASE_URL; // + vm.$route.params.recordid;
//clear any errors vm might be around from previous submit
window.$gz.form.deleteAllErrorBoxErrors(vm);
console.log("UPSERT");
let res = await window.$gz.api.upsert(url, vm.obj);
if (res.error) {
@@ -1150,16 +1150,14 @@ export default {
//POST or PUT - whole new object returned which is a little different than other objects
//so if it's new then need to navigate to it to update url with id
if (vm.$route.params.recordid != 0) {
console.log("STAY IN PLACE");
//update of existing record
vm.obj = res.data;
} else {
console.log("NAV TO NEW");
this.$router.push({
name: "inv-purchase-order",
params: {
recordid: res.data.id,
obj: res.data // Pass data object to new form
obj: res.data // Pass data object to new form will prevent fetch
}
});
}