This commit is contained in:
2021-04-08 19:00:24 +00:00
parent 5a2b19022d
commit 3e8beef3e9
2 changed files with 22 additions and 4 deletions

View File

@@ -64,11 +64,11 @@
</v-col>
</template>
<template v-if="pvm.hasSelectedWoItem">
<v-col v-if="form().showMe(this, 'TechNotes')" cols="12">
<v-col v-if="form().showMe(this, 'WorkOrderItemSummary')" cols="12">
<v-textarea
v-model="value.items[pvm.selectedItemIndex].techNotes"
v-model="value.items[pvm.selectedItemIndex].notes"
:readonly="formState.readOnly"
:label="$ay.t('WorkOrderItemTechNotes')"
:label="$ay.t('WorkOrderItemSummary')"
:error-messages="form().serverErrors(this, 'notes')"
ref="notes"
data-cy="notes"
@@ -77,6 +77,19 @@
></v-textarea>
</v-col>
<v-col v-if="form().showMe(this, 'WorkOrderItemTechNotes')" cols="12">
<v-textarea
v-model="value.items[pvm.selectedItemIndex].techNotes"
:readonly="formState.readOnly"
:label="$ay.t('WorkOrderItemTechNotes')"
:error-messages="form().serverErrors(this, 'techNotes')"
ref="techNotes"
data-cy="techNotes"
@input="fieldValueChanged('techNotes')"
auto-grow
></v-textarea>
</v-col>
<GzWoItemScheduledUsers
v-if="pvm.subRights.scheduledUsers.visible"
v-model="value"
@@ -155,7 +168,10 @@ export default {
return;
}
this.value.items.splice(this.pvm.selectedItemIndex, 1);
this.pvm.selectIndex(null); //select nothing in essence resetting a child selects and this one too clearing form
this.pvm.selectItem(null); //select nothing in essence resetting a child selects and this one too clearing form
//todo: put this id in a collection at parent to be deleted when it's saved and marked dirty (a function "DeleteItem(index)")
//if no concurrency then just remove and ignore, no need to save, if concurrency then it needs to be deleted at the server
// if (this.value.items.length > 0) {
// this.pvm.selectedItemIndex = this.value.items.length - 1;