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, initialLabel: String,
assignedValue: String, assignedValue: String,
assignedLabel: String, assignedLabel: String,
placeholder: String,
}, },
data() { data() {

View file

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

View file

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