feat: orders improvements
This commit is contained in:
parent
edef69c92c
commit
31ef362d34
2 changed files with 9 additions and 4 deletions
|
|
@ -5,12 +5,11 @@
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
<div v-for="merchant in merchantOrders">
|
<div v-for="merchant in merchantOrders">
|
||||||
|
|
||||||
<q-card bordered class="q-mb-md">
|
<q-card bordered class="q-mb-md">
|
||||||
<q-item>
|
<q-item>
|
||||||
<q-item-section avatar>
|
<q-item-section avatar>
|
||||||
<q-avatar>
|
<q-avatar>
|
||||||
<img v-if="merchant?.profile?.picture" :src="merchant?.profile?.picture">
|
<img v-if="merchant.profile?.picture" :src="merchant.profile?.picture">
|
||||||
<img v-else src="/nostrmarket/static/images/blank-avatar.webp">
|
<img v-else src="/nostrmarket/static/images/blank-avatar.webp">
|
||||||
</q-avatar>
|
</q-avatar>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
|
|
@ -18,7 +17,7 @@
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<q-item-label>
|
<q-item-label>
|
||||||
<strong>
|
<strong>
|
||||||
|
<span v-text="merchant.profile?.name"></span>
|
||||||
</strong>
|
</strong>
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
<q-item-label caption>
|
<q-item-label caption>
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,13 @@ async function customerOrders(path) {
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
merchantOrders: function () {
|
merchantOrders: function () {
|
||||||
return Object.keys(this.orders).map(pubkey => ({ pubkey, orders: this.orders[pubkey].map(this.enrichOrder) }))
|
return Object.keys(this.orders)
|
||||||
|
.map(pubkey => ({
|
||||||
|
pubkey,
|
||||||
|
profile: this.merchantProfile(pubkey),
|
||||||
|
orders: this.orders[pubkey].map(this.enrichOrder)
|
||||||
|
}
|
||||||
|
))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue