mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-26 07:31:22 +01:00
ui and checkout
This commit is contained in:
parent
af906740ca
commit
25d0309ff3
1 changed files with 14 additions and 22 deletions
|
@ -112,9 +112,9 @@
|
||||||
|
|
||||||
<q-card-section class="q-py-sm">
|
<q-card-section class="q-py-sm">
|
||||||
<div>
|
<div>
|
||||||
<div class="text-caption text-green-8 text-weight-bolder">
|
<!-- <div class="text-caption text-green-8 text-weight-bolder">
|
||||||
{{ item.stall }}
|
{{ stall.name }}
|
||||||
</div>
|
</div> -->
|
||||||
<span class="text-h6">{{ item.price }} sats</span
|
<span class="text-h6">{{ item.price }} sats</span
|
||||||
><span class="q-ml-sm text-grey-6"
|
><span class="q-ml-sm text-grey-6"
|
||||||
>BTC {{ (item.price / 1e8).toFixed(8) }}</span
|
>BTC {{ (item.price / 1e8).toFixed(8) }}</span
|
||||||
|
@ -155,7 +155,7 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- CHECKOUT DIALOG -->
|
<!-- CHECKOUT DIALOG -->
|
||||||
<q-dialog v-model="checkoutDialog.show" position="top">
|
<q-dialog v-model="checkoutDialog.show" position="top">
|
||||||
<q-card class="q-pa-lg q-pt-xl" style="width: 500px">
|
<q-card class="q-pa-lg q-pt-xl lnbits__dialog-card">
|
||||||
<q-form @submit="placeOrder" class="q-gutter-md">
|
<q-form @submit="placeOrder" class="q-gutter-md">
|
||||||
<q-input
|
<q-input
|
||||||
filled
|
filled
|
||||||
|
@ -181,26 +181,15 @@
|
||||||
dense
|
dense
|
||||||
type="email"
|
type="email"
|
||||||
label="Email"
|
label="Email"
|
||||||
/>
|
></q-input>
|
||||||
<div class="row q-mt-lg">
|
<div class="row q-mt-lg">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="checkoutDialog.data.id"
|
|
||||||
unelevated
|
unelevated
|
||||||
color="primary"
|
color="primary"
|
||||||
|
:disable="checkoutDialog.data.address_1 == null
|
||||||
|
|| checkoutDialog.data.email == null"
|
||||||
type="submit"
|
type="submit"
|
||||||
>Update Product</q-btn
|
>Checkout</q-btn
|
||||||
>
|
|
||||||
|
|
||||||
<q-btn
|
|
||||||
v-else
|
|
||||||
unelevated
|
|
||||||
color="primary"
|
|
||||||
:disable="checkoutDialog.data.price == null
|
|
||||||
|| checkoutDialog.data.product == null
|
|
||||||
|| checkoutDialog.data.description == null
|
|
||||||
|| checkoutDialog.data.quantity == null"
|
|
||||||
type="submit"
|
|
||||||
>Create Product</q-btn
|
|
||||||
>
|
>
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
|
@ -224,6 +213,7 @@
|
||||||
mixins: [windowMixin],
|
mixins: [windowMixin],
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
|
stall: null,
|
||||||
products: [],
|
products: [],
|
||||||
searchText: null,
|
searchText: null,
|
||||||
cart: {
|
cart: {
|
||||||
|
@ -291,11 +281,13 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
this.stall = JSON.parse('{{ stall | tojson }}')
|
||||||
this.products = JSON.parse('{{ products | tojson }}')
|
this.products = JSON.parse('{{ products | tojson }}')
|
||||||
let stall_ids = new Set()
|
|
||||||
this.products.map(p => stall_ids.add(p.stall))
|
|
||||||
|
|
||||||
console.log(stall_ids)
|
//let stall_ids = new Set()
|
||||||
|
//this.products.map(p => stall_ids.add(p.stall))
|
||||||
|
|
||||||
|
console.log(this.stall)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Add table
Reference in a new issue