This commit is contained in:
@@ -132,6 +132,7 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
newItem() {
|
newItem() {
|
||||||
|
//bugbug? add woitem, then this and save not showing but then turns up later confirm!!
|
||||||
this.pvm.selectedScheduledUserItemIndex =
|
this.pvm.selectedScheduledUserItemIndex =
|
||||||
this.value.items[this.pvm.selectedItemIndex].scheduledUsers.push({
|
this.value.items[this.pvm.selectedItemIndex].scheduledUsers.push({
|
||||||
id: 0,
|
id: 0,
|
||||||
|
|||||||
@@ -686,12 +686,12 @@ async function saveItems(vm) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//upsert
|
//upsert
|
||||||
console.log("saveItems processing this many items: ", totalItems);
|
// console.log("saveItems processing this many items: ", totalItems);
|
||||||
for (let i = 0; i < totalItems; i++) {
|
for (let i = 0; i < totalItems; i++) {
|
||||||
let o = vm.obj.items[i];
|
let o = vm.obj.items[i];
|
||||||
console.log("checking for save item: ", { item: o, index: i });
|
// console.log("checking for save item: ", { item: o, index: i });
|
||||||
if (o.isDirty) {
|
if (o.isDirty) {
|
||||||
console.log("Is dirty, saving now for ", i);
|
// console.log("Is dirty, saving now for ", i);
|
||||||
let res = await window.$gz.api.upsert(`${API_BASE_URL}items`, o);
|
let res = await window.$gz.api.upsert(`${API_BASE_URL}items`, o);
|
||||||
if (res.error) {
|
if (res.error) {
|
||||||
displayResError(vm, res);
|
displayResError(vm, res);
|
||||||
@@ -704,7 +704,7 @@ async function saveItems(vm) {
|
|||||||
o.isDirty = false;
|
o.isDirty = false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
console.log("Item not dirty skipping save of ", i);
|
// console.log("Item not dirty skipping save of ", i);
|
||||||
}
|
}
|
||||||
//------
|
//------
|
||||||
//save grandchildren
|
//save grandchildren
|
||||||
@@ -712,7 +712,7 @@ async function saveItems(vm) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//------
|
//------
|
||||||
console.log("Bottom of items loop", { totalItems: totalItems, i: i });
|
// console.log("Bottom of items loop", { totalItems: totalItems, i: i });
|
||||||
}
|
}
|
||||||
return true; //made it through
|
return true; //made it through
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user