fix: shipping cost; update UI on new order

This commit is contained in:
Vlad Stan 2023-04-03 11:57:55 +03:00
parent f80a75e90c
commit 547c477ce6
11 changed files with 57 additions and 23 deletions

View file

@ -141,8 +141,11 @@
</div>
<div class="col-1"></div>
</div>
<div v-if="props.row.extra.currency !== 'sat'" class="row items-center no-wrap q-mb-md q-mt-md">
<div class="col-3 q-pr-lg">Exchange Rate:</div>
<div
v-if="props.row.extra.currency !== 'sat'"
class="row items-center no-wrap q-mb-md q-mt-md"
>
<div class="col-3 q-pr-lg">Exchange Rate (1 BTC):</div>
<div class="col-6 col-sm-8 q-pr-lg">
<q-input
filled

View file

@ -64,13 +64,13 @@ async function orderList(path) {
{
name: 'total',
align: 'left',
label: 'Total',
label: 'Total Sats',
field: 'total'
},
{
name: 'fiat',
align: 'left',
label: 'Fiat',
label: 'Total Fiat',
field: 'fiat'
},
{
@ -136,7 +136,6 @@ async function orderList(path) {
},
orderTotal: function (order) {
return order.items.reduce((t, item) => {
console.log('### t, o', t, item)
product = order.extra.products.find(p => p.id === item.product_id)
return t + item.quantity * product.price
}, 0)