Add placeholder to customer lookup for new order

also hide phone field unless customer is identified
This commit is contained in:
Lance Edgar 2021-09-24 17:28:14 -04:00
parent fbd12c7dfc
commit 57cb787b30
3 changed files with 11 additions and 8 deletions

View file

@ -10,6 +10,7 @@ const TailboneAutocomplete = {
initialLabel: String,
assignedValue: String,
assignedLabel: String,
placeholder: String,
},
data() {

View file

@ -66,6 +66,7 @@
:name="name"
v-show="!assignedValue && !selected"
v-model="value"
:placeholder="placeholder"
:data="data"
@typing="getAsyncData"
@select="selectionMade"

View file

@ -108,16 +108,17 @@
</div>
<div v-show="customerIsKnown">
<b-field label="Customer Name" horizontal>
<tailbone-autocomplete
ref="customerAutocomplete"
v-model="customerUUID"
:initial-label="customerDisplay"
serviceUrl="${url('customers.autocomplete')}"
@input="customerChanged">
<b-field label="Customer" horizontal>
<tailbone-autocomplete ref="customerAutocomplete"
v-model="customerUUID"
placeholder="Enter name or phone number"
:initial-label="customerDisplay"
serviceUrl="${url('customers.autocomplete')}"
@input="customerChanged">
</tailbone-autocomplete>
</b-field>
<b-field label="Phone Number" horizontal>
<b-field label="Phone Number" horizontal
v-show="customerUUID">
<b-input v-model="phoneNumberEntry"
@input="phoneNumberChanged"
@keydown.native="phoneNumberKeyDown">