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>
|
||||
<div v-for="merchant in merchantOrders">
|
||||
|
||||
<q-card bordered class="q-mb-md">
|
||||
<q-item>
|
||||
<q-item-section 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">
|
||||
</q-avatar>
|
||||
</q-item-section>
|
||||
|
|
@ -18,7 +17,7 @@
|
|||
<q-item-section>
|
||||
<q-item-label>
|
||||
<strong>
|
||||
|
||||
<span v-text="merchant.profile?.name"></span>
|
||||
</strong>
|
||||
</q-item-label>
|
||||
<q-item-label caption>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,13 @@ async function customerOrders(path) {
|
|||
},
|
||||
computed: {
|
||||
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: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue