Fix updating event (#9)
* passing a copy of original data to dialog data
This commit is contained in:
parent
1d57e1ae1a
commit
4586164016
3 changed files with 11 additions and 17 deletions
|
|
@ -387,9 +387,7 @@
|
||||||
this.g.user.wallets[0].inkey
|
this.g.user.wallets[0].inkey
|
||||||
)
|
)
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
console.log(response)
|
|
||||||
self.tickets = response.data.map(function (obj) {
|
self.tickets = response.data.map(function (obj) {
|
||||||
console.log(obj)
|
|
||||||
return mapEvents(obj)
|
return mapEvents(obj)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
@ -464,21 +462,13 @@
|
||||||
},
|
},
|
||||||
updateformDialog: function (formId) {
|
updateformDialog: function (formId) {
|
||||||
var link = _.findWhere(this.events, {id: formId})
|
var link = _.findWhere(this.events, {id: formId})
|
||||||
console.log(link.id)
|
|
||||||
this.formDialog.data.id = link.id
|
this.formDialog.data = {...link}
|
||||||
this.formDialog.data.wallet = link.wallet
|
|
||||||
this.formDialog.data.name = link.name
|
|
||||||
this.formDialog.data.info = link.info
|
|
||||||
this.formDialog.data.closing_date = link.closing_date
|
|
||||||
this.formDialog.data.event_start_date = link.event_start_date
|
|
||||||
this.formDialog.data.event_end_date = link.event_end_date
|
|
||||||
this.formDialog.data.amount_tickets = link.amount_tickets
|
|
||||||
this.formDialog.data.price_per_ticket = link.price_per_ticket
|
|
||||||
this.formDialog.show = true
|
this.formDialog.show = true
|
||||||
},
|
},
|
||||||
updateEvent: function (wallet, data) {
|
updateEvent: function (wallet, data) {
|
||||||
var self = this
|
var self = this
|
||||||
console.log(data)
|
|
||||||
|
|
||||||
LNbits.api
|
LNbits.api
|
||||||
.request(
|
.request(
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,15 @@
|
||||||
</h5>
|
</h5>
|
||||||
<br />
|
<br />
|
||||||
<q-responsive :ratio="1" class="q-mb-md" style="max-width: 300px">
|
<q-responsive :ratio="1" class="q-mb-md" style="max-width: 300px">
|
||||||
<qrcode :value="'ticket://{{ ticket_id }}'" :options="{width: 500}"></qrcode>
|
<qrcode
|
||||||
|
:value="'ticket://{{ ticket_id }}'"
|
||||||
|
:options="{width: 500}"
|
||||||
|
></qrcode>
|
||||||
</q-responsive>
|
</q-responsive>
|
||||||
<br />
|
<br />
|
||||||
<q-btn @click="printWindow" color="grey" class="q-ml-auto">
|
<q-btn @click="printWindow" color="grey" class="q-ml-auto">
|
||||||
<q-icon left size="3em" name="print"></q-icon> Print</q-btn>
|
<q-icon left size="3em" name="print"></q-icon> Print</q-btn
|
||||||
|
>
|
||||||
</center>
|
</center>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ from http import HTTPStatus
|
||||||
from fastapi import Depends, Query
|
from fastapi import Depends, Query
|
||||||
from starlette.exceptions import HTTPException
|
from starlette.exceptions import HTTPException
|
||||||
|
|
||||||
from lnbits.core.crud import get_user, get_standalone_payment
|
from lnbits.core.crud import get_standalone_payment, get_user
|
||||||
from lnbits.core.services import create_invoice
|
from lnbits.core.services import create_invoice
|
||||||
from lnbits.decorators import WalletTypeInfo, get_key_type
|
from lnbits.decorators import WalletTypeInfo, get_key_type
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue