diff --git a/lnbits/extensions/tpos/templates/tpos/tpos.html b/lnbits/extensions/tpos/templates/tpos/tpos.html
index ad04b3bea..36d76cf78 100644
--- a/lnbits/extensions/tpos/templates/tpos/tpos.html
+++ b/lnbits/extensions/tpos/templates/tpos/tpos.html
@@ -148,6 +148,9 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {%raw%}
+
+ {{payment.amount / 1000}} sats
+ {{payment.checking_id}}
+
+
+ {{payment.dateFrom}}
+
+
+ {%endraw%}
+
+
+
+
{% endblock %} {% block styles %}
@@ -296,6 +322,10 @@
tipAmount: 0.0,
hasNFC: false,
nfcTagReading: false,
+ lastPaymentsDialog: {
+ show: false,
+ data: []
+ },
invoiceDialog: {
show: false,
data: null,
@@ -520,6 +550,25 @@
self.exchangeRate =
response.data.data['BTC' + self.currency][self.currency]
})
+ },
+ getLastPayments(){
+ return axios
+ .get(`/tpos/api/v1/tposs/${this.tposId}/invoices`)
+ .then(res => {
+ if(res.data && res.data.length){
+ let last = [...res.data]
+ //last.length = Math.min(last.length, 5)
+ this.lastPaymentsDialog.data = last.map(obj => {
+ obj.dateFrom = moment(obj.time * 1000).fromNow()
+ return obj
+ })
+ }
+ })
+ .catch(e => console.error(e))
+ },
+ showLastPayments(){
+ this.getLastPayments()
+ this.lastPaymentsDialog.show = true
}
},
created: function () {