Improve UI, customization hooks for new custorder batch

still not done yet, but a savepoint
This commit is contained in:
Lance Edgar 2021-08-29 16:38:30 -05:00
parent 4d742bacb1
commit c2ea1be83f
3 changed files with 49 additions and 10 deletions

View file

@ -217,9 +217,13 @@
<b-field label="UPC" horizontal expanded>
<b-input v-if="!productUUID"
v-model="productUPC"
ref="productUPCInput">
ref="productUPCInput"
@keydown.native="productUPCKeyDown">
</b-input>
<b-button v-if="!productUUID"
type="is-primary"
icon-pack="fas"
icon-left="search"
@click="fetchProductByUPC()">
Fetch
</b-button>
@ -228,6 +232,14 @@
{{ productUPC }} (click to change)
</b-button>
</b-field>
<b-button v-if="productUUID"
type="is-primary"
tag="a" target="_blank"
:href="'${request.route_url('products')}/' + productUUID"
icon-pack="fas"
icon-left="external-link-alt">
View Product
</b-button>
</b-field>
</div>
@ -296,6 +308,10 @@
{{ props.row.product_size }}
</b-table-column>
<b-table-column field="department_display" label="Department">
{{ props.row.department_display }}
</b-table-column>
<b-table-column field="order_quantity_display" label="Quantity">
<span v-html="props.row.order_quantity_display"></span>
</b-table-column>
@ -304,6 +320,10 @@
{{ props.row.total_price_display }}
</b-table-column>
<b-table-column field="vendor_display" label="Vendor">
{{ props.row.vendor_display }}
</b-table-column>
<b-table-column field="actions" label="Actions">
<a href="#" class="grid-action"
@click.prevent="showEditItemDialog(props.index)">
@ -734,6 +754,12 @@
})
},
productUPCKeyDown(event) {
if (event.which == 13) { // Enter
this.fetchProductByUPC()
}
},
productChanged(uuid) {
if (uuid) {
this.productUUID = uuid