feat: add shopping-cart list

This commit is contained in:
Vlad Stan 2023-07-06 15:13:58 +03:00
parent 6152f6b0de
commit 676ab5cc1b
4 changed files with 29 additions and 1 deletions

View file

@ -0,0 +1,3 @@
<div>
xxxx
</div>

View file

@ -0,0 +1,18 @@
async function shoppingCartList(path) {
const template = await loadTemplateAsync(path)
Vue.component('shopping-cart-list', {
name: 'shopping-cart-list',
template,
props: ['carts', 'products'],
data: function () {
return {}
},
computed: {},
methods: {
},
created() { }
})
}

View file

@ -30,6 +30,7 @@ const market = async () => {
customerStall('static/components/customer-stall/customer-stall.html'),
productDetail('static/components/product-detail/product-detail.html'),
shoppingCart('static/components/shopping-cart/shopping-cart.html'),
shoppingCartList('static/components/shopping-cart-list/shopping-cart-list.html'),
chatDialog('static/components/chat-dialog/chat-dialog.html'),
marketConfig('static/components/market-config/market-config.html')
])
@ -50,8 +51,10 @@ const market = async () => {
},
merchants: [],
shoppingCarts: [],
showMarketConfig: false,
showShoppingCartList: false,
searchNostr: false,
drawer: true,
pubkeys: new Set(),
@ -457,6 +460,8 @@ const market = async () => {
} else {
this.activeStall = null
this.activeProduct = null
this.showMarketConfig = false
this.showShoppingCartList = false
url.searchParams.delete('merchant_pubkey')
url.searchParams.delete('stall_id')
url.searchParams.delete('product_id')