feat: add paid/registered badge to ticket page (#49)
some visual verification on the ticket page that it is paid / checked in.
This commit is contained in:
parent
32c230957e
commit
0824b1120b
2 changed files with 18 additions and 6 deletions
|
|
@ -3,7 +3,7 @@ window.PageEventsTicket = {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
ticketId: null,
|
ticketId: null,
|
||||||
ticketName: null
|
ticket: null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -18,7 +18,7 @@ window.PageEventsTicket = {
|
||||||
'GET',
|
'GET',
|
||||||
`/events/api/v1/tickets/${this.ticketId}`
|
`/events/api/v1/tickets/${this.ticketId}`
|
||||||
)
|
)
|
||||||
this.ticketName = data.ticket_name
|
this.ticket = data
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
LNbits.utils.notifyApiError(error)
|
LNbits.utils.notifyApiError(error)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,20 +5,32 @@
|
||||||
<q-card-section class="q-pa-none">
|
<q-card-section class="q-pa-none">
|
||||||
<center>
|
<center>
|
||||||
<h3 class="q-my-none">Ticket</h3>
|
<h3 class="q-my-none">Ticket</h3>
|
||||||
|
<h5 v-if="ticket" v-text="ticket.name" class="q-my-none"></h5>
|
||||||
<br />
|
<br />
|
||||||
<h5 class="q-my-none">
|
<h5 class="q-my-none">
|
||||||
Bookmark, print or screenshot this page,<br />
|
Bookmark, print or screenshot this page,<br />
|
||||||
and present it for registration!
|
and present it for registration!
|
||||||
</h5>
|
</h5>
|
||||||
<br />
|
<div v-if="ticket" class="row justify-center q-gutter-sm q-mb-md">
|
||||||
|
<q-btn
|
||||||
|
unelevated
|
||||||
|
:color="ticket.paid ? 'positive' : 'negative'"
|
||||||
|
:label="ticket.paid ? 'Paid' : 'Not Paid'"
|
||||||
|
></q-btn>
|
||||||
|
<q-btn
|
||||||
|
unelevated
|
||||||
|
:color="ticket.registered ? 'positive' : 'warning'"
|
||||||
|
:label="ticket.registered ? 'Checked In' : 'Not Checked In'"
|
||||||
|
></q-btn>
|
||||||
|
</div>
|
||||||
<lnbits-qrcode
|
<lnbits-qrcode
|
||||||
:value="`ticket://${ticketId}`"
|
:value="`ticket://${ticketId}`"
|
||||||
:options="{width: 500}"
|
:options="{width: 500}"
|
||||||
></lnbits-qrcode>
|
></lnbits-qrcode>
|
||||||
<br />
|
<br />
|
||||||
<q-btn @click="printWindow" color="grey" class="q-ml-auto">
|
<q-btn @click="printWindow" color="grey">
|
||||||
<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>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue