This commit is contained in:
@@ -140,7 +140,7 @@ export default {
|
||||
isDirty: true,
|
||||
workOrderItemId: this.value.items[this.pvm.selectedItemIndex].id
|
||||
});
|
||||
|
||||
this.pvm.setDirty();
|
||||
this.pvm.selectedScheduledUserItemIndex = newIndex;
|
||||
},
|
||||
async deleteItem() {
|
||||
|
||||
@@ -161,6 +161,7 @@ export default {
|
||||
units: [],
|
||||
outsideServices: []
|
||||
});
|
||||
this.pvm.setDirty();
|
||||
this.pvm.selectItem(newIndex);
|
||||
},
|
||||
async deleteItem() {
|
||||
|
||||
@@ -386,11 +386,14 @@ export default {
|
||||
let o = this.obj.items[itemIndex];
|
||||
if (o.id != 0) {
|
||||
this.deletedItems.push(o.id);
|
||||
this.formState.dirty = true;
|
||||
this.setDirty();
|
||||
}
|
||||
this.obj.items.splice(itemIndex, 1);
|
||||
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() {
|
||||
return this.formState.valid && this.formState.dirty;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user