Show current/sale pricing for products in new custorder page

This commit is contained in:
Lance Edgar 2021-11-27 19:08:15 -06:00
parent ce354d5bc3
commit c1f9190613

View file

@ -552,6 +552,10 @@
<span>{{ productSize }}</span> <span>{{ productSize }}</span>
</b-field> </b-field>
<b-field label="Case Size">
<span>{{ productCaseQuantity }}</span>
</b-field>
<b-field label="Unit Price"> <b-field label="Unit Price">
<span <span
% if product_price_may_be_questionable: % if product_price_may_be_questionable:
@ -565,8 +569,18 @@
<!-- <span>2021-01-01</span> --> <!-- <span>2021-01-01</span> -->
<!-- </b-field> --> <!-- </b-field> -->
<b-field label="Case Size"> <b-field label="Sale Price"
<span>{{ productCaseQuantity }}</span> v-if="productSalePriceDisplay">
<span class="has-background-warning">
{{ productSalePriceDisplay }}
</span>
</b-field>
<b-field label="Sale Ends"
v-if="productSaleEndsDisplay">
<span class="has-background-warning">
{{ productSaleEndsDisplay }}
</span>
</b-field> </b-field>
</b-field> </b-field>
@ -622,6 +636,20 @@
</span> </span>
</b-field> </b-field>
<b-field label="Sale Price"
v-if="productSalePriceDisplay">
<span class="has-background-warning">
{{ productSalePriceDisplay }}
</span>
</b-field>
<b-field label="Sale Ends"
v-if="productSaleEndsDisplay">
<span class="has-background-warning">
{{ productSaleEndsDisplay }}
</span>
</b-field>
<b-field label="Case Size"> <b-field label="Case Size">
<span>{{ productCaseQuantity }}</span> <span>{{ productCaseQuantity }}</span>
</b-field> </b-field>
@ -629,7 +657,9 @@
<b-field label="Case Price"> <b-field label="Case Price">
<span <span
% if product_price_may_be_questionable: % if product_price_may_be_questionable:
:class="productPriceNeedsConfirmation ? 'has-background-warning' : ''" :class="(productPriceNeedsConfirmation || productSalePriceDisplay) ? 'has-background-warning' : ''"
% else:
:class="productSalePriceDisplay ? 'has-background-warning' : ''"
% endif % endif
> >
{{ productCasePriceDisplay }} {{ productCasePriceDisplay }}
@ -702,11 +732,6 @@
field="description" field="description"
sortable> sortable>
{{ props.row.description }} {{ props.row.description }}
</b-table-column>
<b-table-column label="Size"
field="size"
sortable>
{{ props.row.size }} {{ props.row.size }}
</b-table-column> </b-table-column>
@ -716,6 +741,22 @@
{{ props.row.unit_price_display }} {{ props.row.unit_price_display }}
</b-table-column> </b-table-column>
<b-table-column label="Sale Price"
field="sale_price"
sortable>
<span class="has-background-warning">
{{ props.row.sale_price_display }}
</span>
</b-table-column>
<b-table-column label="Sale Ends"
field="sale_ends"
sortable>
<span class="has-background-warning">
{{ props.row.sale_ends_display }}
</span>
</b-table-column>
<b-table-column label="Department" <b-table-column label="Department"
field="department_name" field="department_name"
sortable> sortable>
@ -933,6 +974,8 @@
productCaseQuantity: null, productCaseQuantity: null,
productUnitPriceDisplay: null, productUnitPriceDisplay: null,
productCasePriceDisplay: null, productCasePriceDisplay: null,
productSalePriceDisplay: null,
productSaleEndsDisplay: null,
productURL: null, productURL: null,
productImageURL: null, productImageURL: null,
productQuantity: null, productQuantity: null,
@ -1486,6 +1529,8 @@
this.productCaseQuantity = null this.productCaseQuantity = null
this.productUnitPriceDisplay = null this.productUnitPriceDisplay = null
this.productCasePriceDisplay = null this.productCasePriceDisplay = null
this.productSalePriceDisplay = null
this.productSaleEndsDisplay = null
this.productImageURL = '${request.static_url('tailbone:static/img/product.png')}' this.productImageURL = '${request.static_url('tailbone:static/img/product.png')}'
this.productQuantity = 1 this.productQuantity = 1
this.productUnitChoices = this.defaultUnitChoices this.productUnitChoices = this.defaultUnitChoices
@ -1533,6 +1578,8 @@
this.productCaseQuantity = selected.case_quantity this.productCaseQuantity = selected.case_quantity
this.productUnitPriceDisplay = selected.unit_price_display this.productUnitPriceDisplay = selected.unit_price_display
this.productCasePriceDisplay = selected.case_price_display this.productCasePriceDisplay = selected.case_price_display
this.productSalePriceDisplay = selected.sale_price_display
this.productSaleEndsDisplay = selected.sale_ends_display
this.productImageURL = selected.image_url this.productImageURL = selected.image_url
this.productURL = selected.url this.productURL = selected.url
this.productQuantity = 1 this.productQuantity = 1
@ -1561,6 +1608,8 @@
this.productURL = row.product_url this.productURL = row.product_url
this.productUnitPriceDisplay = row.unit_price_display this.productUnitPriceDisplay = row.unit_price_display
this.productCasePriceDisplay = row.case_price_display this.productCasePriceDisplay = row.case_price_display
this.productSalePriceDisplay = row.sale_price_display
this.productSaleEndsDisplay = row.sale_ends_display
this.productImageURL = row.product_image_url this.productImageURL = row.product_image_url
this.productQuantity = row.order_quantity this.productQuantity = row.order_quantity
this.productUnitChoices = row.order_uom_choices this.productUnitChoices = row.order_uom_choices
@ -1606,6 +1655,8 @@
this.productCaseQuantity = null this.productCaseQuantity = null
this.productUnitPriceDisplay = null this.productUnitPriceDisplay = null
this.productCasePriceDisplay = null this.productCasePriceDisplay = null
this.productSalePriceDisplay = null
this.productSaleEndsDisplay = null
this.productURL = null this.productURL = null
this.productImageURL = null this.productImageURL = null
this.productUnitChoices = this.defaultUnitChoices this.productUnitChoices = this.defaultUnitChoices
@ -1651,6 +1702,8 @@
this.productCaseQuantity = response.data.case_quantity this.productCaseQuantity = response.data.case_quantity
this.productUnitPriceDisplay = response.data.unit_price_display this.productUnitPriceDisplay = response.data.unit_price_display
this.productCasePriceDisplay = response.data.case_price_display this.productCasePriceDisplay = response.data.case_price_display
this.productSalePriceDisplay = response.data.sale_price_display
this.productSaleEndsDisplay = response.data.sale_ends_display
this.productURL = response.data.url this.productURL = response.data.url
this.productImageURL = response.data.image_url this.productImageURL = response.data.image_url
this.setProductUnitChoices(response.data.uom_choices) this.setProductUnitChoices(response.data.uom_choices)