mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-28 21:02:31 +02:00
New Docs (#195)
New docs for TPOS and Events, and a fix in Events extension! Co-authored-by: Tiago Vasconcelos <tvasconcelos@gmail.com>
This commit is contained in:
committed by
GitHub
parent
b06e1c8fa9
commit
ebf3dfd076
@@ -1,3 +1,33 @@
|
||||
<h1>Events</h1>
|
||||
<h2>Events: Sell and register event tickets</h2>
|
||||
Events alows you to make a wave of tickets for an event, each ticket is in the form of a unqiue QRcode, which the user presents at registration. Events comes with a shareable ticket scanner, which can be used to register attendees.
|
||||
# Events
|
||||
|
||||
## Sell tickets for events and use the built-in scanner for registering attendants
|
||||
|
||||
Events alows you to make tickets for an event. Each ticket is in the form of a uniqque QR code. After registering, and paying for ticket, the user gets a QR code to present at registration/entrance.
|
||||
|
||||
Events includes a shareable ticket scanner, which can be used to register attendees.
|
||||
|
||||
## Usage
|
||||
|
||||
1. Create an event\
|
||||

|
||||
2. Fill out the event information:
|
||||
|
||||
- event name
|
||||
- wallet (normally there's only one)
|
||||
- event information
|
||||
- closing date for event registration
|
||||
- begin and end date of the event
|
||||
|
||||

|
||||
|
||||
3. Share the event registration link\
|
||||

|
||||
|
||||
- ticket example\
|
||||

|
||||
|
||||
- QR code ticket, presented after invoice paid, to present at registration\
|
||||

|
||||
|
||||
4. Use the built-in ticket scanner to validate registered, and paid, attendees\
|
||||

|
||||
|
@@ -82,7 +82,7 @@
|
||||
<script>
|
||||
Vue.component(VueQrcode.name, VueQrcode)
|
||||
Vue.use(VueQrcodeReader)
|
||||
var mapEvents = function (obj) {
|
||||
var mapEvents = function(obj) {
|
||||
obj.date = Quasar.utils.date.formatDate(
|
||||
new Date(obj.time * 1000),
|
||||
'YYYY-MM-DD HH:mm'
|
||||
@@ -94,7 +94,7 @@
|
||||
new Vue({
|
||||
el: '#vue',
|
||||
mixins: [windowMixin],
|
||||
data: function () {
|
||||
data: function() {
|
||||
return {
|
||||
tickets: [],
|
||||
ticketsTable: {
|
||||
@@ -119,35 +119,35 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
hoverEmail: function (tmp) {
|
||||
hoverEmail: function(tmp) {
|
||||
this.tickets.data.emailtemp = tmp
|
||||
},
|
||||
closeCamera: function () {
|
||||
closeCamera: function() {
|
||||
this.sendCamera.show = false
|
||||
},
|
||||
showCamera: function () {
|
||||
showCamera: function() {
|
||||
this.sendCamera.show = true
|
||||
},
|
||||
decodeQR: function (res) {
|
||||
decodeQR: function(res) {
|
||||
this.sendCamera.show = false
|
||||
var self = this
|
||||
|
||||
LNbits.api
|
||||
.request('GET', '/events/api/v1/register/ticket/' + res)
|
||||
.then(function (response) {
|
||||
.then(function(response) {
|
||||
self.$q.notify({
|
||||
type: 'positive',
|
||||
message: 'Registered!'
|
||||
})
|
||||
setTimeout(function () {
|
||||
setTimeout(function() {
|
||||
window.location.reload()
|
||||
}, 2000)
|
||||
})
|
||||
.catch(function (error) {
|
||||
.catch(function(error) {
|
||||
LNbits.utils.notifyApiError(error)
|
||||
})
|
||||
},
|
||||
getEventTickets: function () {
|
||||
getEventTickets: function() {
|
||||
var self = this
|
||||
console.log('obj')
|
||||
LNbits.api
|
||||
@@ -155,17 +155,17 @@
|
||||
'GET',
|
||||
'/events/api/v1/eventtickets/{{ wallet_id }}/{{ event_id }}'
|
||||
)
|
||||
.then(function (response) {
|
||||
self.tickets = response.data.map(function (obj) {
|
||||
.then(function(response) {
|
||||
self.tickets = response.data.map(function(obj) {
|
||||
return mapEvents(obj)
|
||||
})
|
||||
})
|
||||
.catch(function (error) {
|
||||
.catch(function(error) {
|
||||
LNbits.utils.notifyApiError(error)
|
||||
})
|
||||
}
|
||||
},
|
||||
created: function () {
|
||||
created: function() {
|
||||
this.getEventTickets()
|
||||
}
|
||||
})
|
||||
|
@@ -195,6 +195,9 @@ async def api_event_register_ticket(ticket_id):
|
||||
if not ticket:
|
||||
return jsonify({"message": "Ticket does not exist."}), HTTPStatus.FORBIDDEN
|
||||
|
||||
if not ticket.paid:
|
||||
return jsonify({"message": "Ticket not paid for."}), HTTPStatus.FORBIDDEN
|
||||
|
||||
if ticket.registered == True:
|
||||
return jsonify({"message": "Ticket already registered"}), HTTPStatus.FORBIDDEN
|
||||
|
||||
|
@@ -1,7 +1,15 @@
|
||||
<h1> TPOS</h1>
|
||||
<h2>A Shareable PoS that doesnt need to be installed and can run in phones browser!</h2>
|
||||
<p>If someone drops your Quickening in a beer at your bar, staff can scan a QR and open/use a browser based PoS, linked to the same self-hosted lnbits instance!</p>
|
||||
# TPoS
|
||||
|
||||
<img src="https://i.imgur.com/8wgTWDn.jpg">
|
||||
## A Shareable PoS (Point of Sale) that doesn't need to be installed and can run in the browser!
|
||||
|
||||
An easy, fast and secure way to accept Bitcoin, over Lightning Network, at your business. The PoS is isolated from the wallet, so it's safe for any employee to use. You can create as many TPOS's as you need, for example one for each employee, or one for each branch of your business.
|
||||
|
||||
### Usage
|
||||
|
||||
1. Enable extension
|
||||
2. Create a TPOS\
|
||||

|
||||
3. Open TPOS on the browser\
|
||||

|
||||
4. Present invoice QR to costumer\
|
||||

|
||||
|
Reference in New Issue
Block a user