fix: long product name in order details
This commit is contained in:
parent
8ab688dc41
commit
751271eb65
2 changed files with 10 additions and 4 deletions
|
|
@ -89,7 +89,9 @@
|
|||
<div class="col-1">{{item.quantity}}</div>
|
||||
<div class="col-1">x</div>
|
||||
<div class="col-4">
|
||||
{{productName(props.row, item.product_id)}}
|
||||
<p :title="productName(props.row, item.product_id)">
|
||||
{{shortLabel(productName(props.row, item.product_id))}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
{{productPrice(props.row, item.product_id)}}
|
||||
|
|
@ -207,4 +209,4 @@
|
|||
</q-form>
|
||||
</q-card>
|
||||
</q-dialog>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -130,6 +130,10 @@ async function orderList(path) {
|
|||
formatFiat(value, currency) {
|
||||
return Math.trunc(value) + ' ' + currency
|
||||
},
|
||||
shortLabel(value = ''){
|
||||
if (value.length <= 44) return value
|
||||
return value.substring(0, 20) + '...'
|
||||
},
|
||||
productName: function (order, productId) {
|
||||
product = order.extra.products.find(p => p.id === productId)
|
||||
if (product) {
|
||||
|
|
@ -287,7 +291,7 @@ async function orderList(path) {
|
|||
const order = await this.getOrder(orderData.id)
|
||||
this.orders.unshift(order)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
orderSelected: async function (orderId, eventId) {
|
||||
|
|
@ -305,7 +309,7 @@ async function orderList(path) {
|
|||
restoredOrder.isNew = false
|
||||
this.orders = [restoredOrder]
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue