diff --git a/static/components/chat-dialog/chat-dialog.js b/static/components/chat-dialog/chat-dialog.js index 72a4d17..6cc42d9 100644 --- a/static/components/chat-dialog/chat-dialog.js +++ b/static/components/chat-dialog/chat-dialog.js @@ -48,7 +48,7 @@ async function chatDialog(path) { label: 'Invoice', field: row => row.payment_options && - row.payment_options.find(p => p.type == 'ln').link + row.payment_options.find(p => p.type == 'ln')?.link } ], pagination: { diff --git a/static/components/customer-stall/customer-stall.html b/static/components/customer-stall/customer-stall.html index 60c5a11..9d11834 100644 --- a/static/components/customer-stall/customer-stall.html +++ b/static/components/customer-stall/customer-stall.html @@ -23,6 +23,8 @@ - - - {{p.quantity}} x + + + + {{p.quantity}} x + - + - + {{ p.name }} @@ -42,7 +44,7 @@ @click="$emit('open-checkout')" > p.id == id) + ) + }, + remove(id) { + this.$emit( + 'remove-from-cart', + this.products.find(p => p.id == id) + ) + }, + removeProduct(id) { + this.$emit( + 'remove-from-cart', + this.products.find(p => p.id == id), + true + ) + } + }, created() {} }) } diff --git a/templates/nostrmarket/market.html b/templates/nostrmarket/market.html index 28cb08a..82d874b 100644 --- a/templates/nostrmarket/market.html +++ b/templates/nostrmarket/market.html @@ -186,6 +186,7 @@ v-if="!isLoading && activeStall" :stall="stalls.find(stall => stall.id == activeStall)" :products="filterProducts" + :stallproducts="products.filter(p => p.stall_id == activeStall)" :product-detail="activeProduct" :relays="relays" :account="account"