feat: orders UI
This commit is contained in:
parent
6d921d7559
commit
edef69c92c
2 changed files with 68 additions and 18 deletions
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
<q-separator />
|
||||
|
||||
<q-card-section horizontal>
|
||||
<q-card-section>
|
||||
|
||||
<q-card-section class="col-12">
|
||||
<q-list class="q-mt-md">
|
||||
|
|
@ -39,9 +39,9 @@
|
|||
|
||||
<template v-slot:header>
|
||||
<q-item-section class="q-mt-sm">
|
||||
<q-item-label><strong> <span v-text="order.stallName"></span> </strong>
|
||||
<q-badge @click="showInvoice(order)"
|
||||
v-if="order.invoice?.human_readable_part?.amount" color="orange" class="q-ml-lg">
|
||||
<q-item-label><strong> <span v-text="order.stallName"></span> </strong>
|
||||
<q-badge @click="showInvoice(order)" v-if="order.invoice?.human_readable_part?.amount"
|
||||
color="orange" class="q-ml-lg">
|
||||
<span v-text="formatCurrency(order.invoice?.human_readable_part?.amount / 1000, 'sat')"></span>
|
||||
</q-badge></q-item-label>
|
||||
|
||||
|
|
@ -70,12 +70,52 @@
|
|||
</q-item-label>
|
||||
</q-item-section>
|
||||
</template>
|
||||
<q-card-section class="q-pa-none">
|
||||
<q-separator></q-separator>
|
||||
<span v-text="order.invoice?.human_readable_part?.amount"></span>
|
||||
<q-separator></q-separator>
|
||||
<q-card-section horizontal>
|
||||
|
||||
<q-card-section class="col-7">
|
||||
<q-item-section class="q-mt-sm">
|
||||
<q-item-label> <strong>Products</strong></q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
<q-item v-for="product in order.products" :key="product.id">
|
||||
<q-item-section avatar>
|
||||
<q-avatar>
|
||||
<img v-if="product.images[0] || product.image" :src="product.images[0] || product.image" />
|
||||
<img v-else src="/nostrmarket/static/images/placeholder.png" />
|
||||
</q-avatar>
|
||||
</q-item-section>
|
||||
<q-item-section class="q-mt-sm">
|
||||
<q-item-label></q-item-label>
|
||||
<q-item-label>
|
||||
<strong>{{ product.orderedQuantity}} x {{ product.name}} </strong></q-item-label>
|
||||
<q-item-label>
|
||||
<div class="text-caption text-grey ellipsis-2-lines">
|
||||
<p>{{ product.description }}</p>
|
||||
</div>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
</q-card-section>
|
||||
<q-separator vertical />
|
||||
<q-card-section>
|
||||
<q-item-section class="q-mt-sm q-ml-sm">
|
||||
<q-item-label> <strong>Shipping Zone: </strong>
|
||||
<span v-text="order.shippingZone?.name || ''"></span>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
<q-item-section class="q-mt-md q-ml-sm">
|
||||
<q-item-label> <strong>Invoice: </strong>
|
||||
<q-badge @click="showInvoice(order)" v-if="order.invoice?.human_readable_part?.amount"
|
||||
color="orange" class="cursor-pointer">
|
||||
<span
|
||||
v-text="formatCurrency(order.invoice?.human_readable_part?.amount / 1000, 'sat')"></span>
|
||||
</q-badge>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
</q-card-section>
|
||||
</q-card-section>
|
||||
|
||||
|
||||
</q-expansion-item>
|
||||
<q-separator></q-separator>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue