This commit is contained in:
2021-04-09 14:39:47 +00:00
parent 506b5ba5ce
commit efe1b2bf2b
3 changed files with 6 additions and 2 deletions

View File

@@ -140,7 +140,7 @@ export default {
isDirty: true, isDirty: true,
workOrderItemId: this.value.items[this.pvm.selectedItemIndex].id workOrderItemId: this.value.items[this.pvm.selectedItemIndex].id
}); });
this.pvm.setDirty();
this.pvm.selectedScheduledUserItemIndex = newIndex; this.pvm.selectedScheduledUserItemIndex = newIndex;
}, },
async deleteItem() { async deleteItem() {

View File

@@ -161,6 +161,7 @@ export default {
units: [], units: [],
outsideServices: [] outsideServices: []
}); });
this.pvm.setDirty();
this.pvm.selectItem(newIndex); this.pvm.selectItem(newIndex);
}, },
async deleteItem() { async deleteItem() {

View File

@@ -386,11 +386,14 @@ export default {
let o = this.obj.items[itemIndex]; let o = this.obj.items[itemIndex];
if (o.id != 0) { if (o.id != 0) {
this.deletedItems.push(o.id); this.deletedItems.push(o.id);
this.formState.dirty = true; this.setDirty();
} }
this.obj.items.splice(itemIndex, 1); this.obj.items.splice(itemIndex, 1);
this.selectItem(null); //select nothing in essence resetting a child selects and this one too clearing form this.selectItem(null); //select nothing in essence resetting a child selects and this one too clearing form
}, },
setDirty: function() {
this.formState.dirty = true;
},
canSave: function() { canSave: function() {
return this.formState.valid && this.formState.dirty; return this.formState.valid && this.formState.dirty;
}, },