feat: make events dynamic (#43)
--------- Co-authored-by: dni <office@dnilabs.com>
This commit is contained in:
parent
f06bd9a668
commit
9e477ac959
21 changed files with 1164 additions and 1143 deletions
26
static/js/ticket.js
Normal file
26
static/js/ticket.js
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
window.PageEventsTicket = {
|
||||
template: '#page-events-ticket',
|
||||
data() {
|
||||
return {
|
||||
ticketId: null,
|
||||
ticketName: null
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
printWindow() {
|
||||
window.print()
|
||||
}
|
||||
},
|
||||
async created() {
|
||||
this.ticketId = this.$route.params.id
|
||||
try {
|
||||
const {data} = await LNbits.api.request(
|
||||
'GET',
|
||||
`/events/api/v1/tickets/${this.ticketId}`
|
||||
)
|
||||
this.ticketName = data.ticket_name
|
||||
} catch (error) {
|
||||
LNbits.utils.notifyApiError(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue