fix: decrease confusion for "add item" dialog when creating order
it was not clear to the user, what needs to happen when adding a new item not yet in the system. trick was, had to go to the Quantity tab and choose the UOM. hopefully this helps
This commit is contained in:
parent
572467d53e
commit
f647d1e359
1 changed files with 18 additions and 4 deletions
|
|
@ -801,6 +801,7 @@
|
||||||
</b-field>
|
</b-field>
|
||||||
|
|
||||||
<b-select v-model="productUOM"
|
<b-select v-model="productUOM"
|
||||||
|
ref="productUOM"
|
||||||
@input="refreshTotalPrice += 1">
|
@input="refreshTotalPrice += 1">
|
||||||
<option v-for="choice in productUnitChoices"
|
<option v-for="choice in productUnitChoices"
|
||||||
:key="choice.key"
|
:key="choice.key"
|
||||||
|
|
@ -1232,10 +1233,6 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.productUOM) {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
return false
|
return false
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -1899,6 +1896,23 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
itemDialogSave() {
|
itemDialogSave() {
|
||||||
|
|
||||||
|
// nb. we check this here instead of disabling the
|
||||||
|
// save button when no UOM is set, to avoid confusion
|
||||||
|
// for the user
|
||||||
|
if (!this.productUOM) {
|
||||||
|
this.$buefy.toast.open({
|
||||||
|
message: "Please specify the Unit of Measure",
|
||||||
|
type: 'is-warning',
|
||||||
|
duration: 2000, // 2 seconds
|
||||||
|
})
|
||||||
|
this.itemDialogTabIndex = 1
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.productUOM.focus()
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
this.itemDialogAttemptSave()
|
this.itemDialogAttemptSave()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue