feat: basic orders
This commit is contained in:
parent
aed65dd65e
commit
bce0b342d0
4 changed files with 106 additions and 37 deletions
|
|
@ -1,10 +1,12 @@
|
|||
<div>
|
||||
<q-card v-if="!orders?.length" bordered class="q-mb-md">
|
||||
<q-card v-if="!merchantOrders?.length" bordered class="q-mb-md">
|
||||
<q-card-section>
|
||||
<strong>No products in cart!</strong>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
<div v-for="merchant in orders">
|
||||
<div v-for="merchant in merchantOrders">
|
||||
|
||||
|
||||
|
||||
<q-card bordered class="q-mb-md">
|
||||
<q-item>
|
||||
|
|
@ -19,11 +21,11 @@
|
|||
<q-item-label>
|
||||
<strong>
|
||||
<!-- <span v-text="cart.products[0]?.stallName"></span> -->
|
||||
Todo: stall name
|
||||
Todo: merchant name
|
||||
</strong>
|
||||
</q-item-label>
|
||||
<q-item-label caption>
|
||||
By
|
||||
By
|
||||
<!-- <span v-text="cart.merchant?.profile?.name || cart.merchant?.publicKey"></span> -->
|
||||
<span v-text="merchant.pubkey"></span>
|
||||
</q-item-label>
|
||||
|
|
@ -37,26 +39,37 @@
|
|||
|
||||
<q-card-section class="col-12">
|
||||
<q-list class="q-mt-md">
|
||||
<q-item v-for="order in merchant.orders" :key="order.id">
|
||||
<div v-for="order in merchant.orders" :key="order.id" class="q-mb-md">
|
||||
<q-expansion-item>
|
||||
|
||||
|
||||
<q-item-section class="q-mt-sm">
|
||||
<q-item-label>products</q-item-label>
|
||||
<q-item-label>
|
||||
<div class="text-caption text-grey ellipsis-2-lines">
|
||||
<p>xxxx</p>
|
||||
</div>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section side>
|
||||
<div>
|
||||
<q-btn flat dense round icon="delete" />
|
||||
</div>
|
||||
</q-item-section>
|
||||
<template v-slot:header>
|
||||
<q-item-section class="q-mt-sm">
|
||||
<q-item-label><strong> <span v-text="stallNameForOrder(order)"></span> </strong></q-item-label>
|
||||
<q-item-label>
|
||||
<div class="text-caption text-grey ellipsis-2-lines">
|
||||
<p>xxxx</p>
|
||||
</div>
|
||||
</q-item-label>
|
||||
</q-item-section>
|
||||
|
||||
</q-item>
|
||||
<q-item-section side>
|
||||
<div>
|
||||
<q-badge :color="order.paid ? 'green' : 'gray'"><span
|
||||
v-text="order.paid ? 'Paid' : 'Not Paid'"></span></q-badge>
|
||||
<q-badge :color="order.shipped ? 'green' : 'gray'"><span
|
||||
v-text="order.paid ? 'Shipped' : 'Not Shipped'"></span></q-badge>
|
||||
</div>
|
||||
</q-item-section>
|
||||
</template>
|
||||
<q-card-section class="q-pa-none">
|
||||
<q-separator></q-separator>
|
||||
xxxx
|
||||
</q-card-section>
|
||||
|
||||
|
||||
</q-expansion-item>
|
||||
<q-separator></q-separator>
|
||||
</div>
|
||||
</q-list>
|
||||
</q-card-section>
|
||||
</q-card-section>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue