Skip to content

Commit 35c6dea

Browse files
committed
feat: add paid/registered badge to ticket page
some visual verification on the ticket page that it is paid / checked in.
1 parent 4afc78d commit 35c6dea

2 files changed

Lines changed: 18 additions & 6 deletions

File tree

static/js/ticket.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ window.PageEventsTicket = {
33
data() {
44
return {
55
ticketId: null,
6-
ticketName: null
6+
ticket: null
77
}
88
},
99
methods: {
@@ -18,7 +18,7 @@ window.PageEventsTicket = {
1818
'GET',
1919
`/events/api/v1/tickets/${this.ticketId}`
2020
)
21-
this.ticketName = data.ticket_name
21+
this.ticket = data
2222
} catch (error) {
2323
LNbits.utils.notifyApiError(error)
2424
}

static/js/ticket.vue

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,32 @@
55
<q-card-section class="q-pa-none">
66
<center>
77
<h3 class="q-my-none">Ticket</h3>
8+
<h5 v-if="ticket" v-text="ticket.name" class="q-my-none"></h5>
89
<br />
910
<h5 class="q-my-none">
1011
Bookmark, print or screenshot this page,<br />
1112
and present it for registration!
1213
</h5>
13-
<br />
14+
<div v-if="ticket" class="row justify-center q-gutter-sm q-mb-md">
15+
<q-btn
16+
unelevated
17+
:color="ticket.paid ? 'positive' : 'negative'"
18+
:label="ticket.paid ? 'Paid' : 'Not Paid'"
19+
></q-btn>
20+
<q-btn
21+
unelevated
22+
:color="ticket.registered ? 'positive' : 'warning'"
23+
:label="ticket.registered ? 'Checked In' : 'Not Checked In'"
24+
></q-btn>
25+
</div>
1426
<lnbits-qrcode
1527
:value="`ticket://${ticketId}`"
1628
:options="{width: 500}"
1729
></lnbits-qrcode>
1830
<br />
19-
<q-btn @click="printWindow" color="grey" class="q-ml-auto">
20-
<q-icon left size="3em" name="print"></q-icon> Print</q-btn
21-
>
31+
<q-btn @click="printWindow" color="grey">
32+
<q-icon left size="3em" name="print"></q-icon> Print
33+
</q-btn>
2234
</center>
2335
</q-card-section>
2436
</q-card>

0 commit comments

Comments
 (0)