feat: basic buys table
This commit is contained in:
parent
c60b3808c0
commit
864b157cdc
1 changed files with 25 additions and 21 deletions
|
|
@ -64,7 +64,7 @@ page_container %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row items-center no-wrap q-mb-sm">
|
<!-- <div class="row items-center no-wrap q-mb-sm">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<h5 class="text-subtitle1 q-my-none">Transactions</h5>
|
<h5 class="text-subtitle1 q-my-none">Transactions</h5>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -99,16 +99,15 @@ page_container %}
|
||||||
placeholder="Search by tag, memo, amount"
|
placeholder="Search by tag, memo, amount"
|
||||||
class="q-mb-md"
|
class="q-mb-md"
|
||||||
>
|
>
|
||||||
</q-input>
|
</q-input> -->
|
||||||
<q-table
|
<q-table
|
||||||
dense
|
dense
|
||||||
flat
|
flat
|
||||||
:data="filteredPayments"
|
:data="tokenBuys"
|
||||||
:row-key="paymentTableRowKey"
|
:columns="buysTable.columns"
|
||||||
:columns="paymentsTable.columns"
|
:pagination.sync="buysTable.pagination"
|
||||||
:pagination.sync="paymentsTable.pagination"
|
no-data-label="No buys made yet"
|
||||||
no-data-label="No transactions made yet"
|
:filter="buysTable.filter"
|
||||||
:filter="paymentsTable.filter"
|
|
||||||
>
|
>
|
||||||
{% raw %}
|
{% raw %}
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
|
|
@ -663,13 +662,20 @@ page_container %}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
payments: [],
|
payments: [],
|
||||||
paymentsTable: {
|
buysTable: {
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
name: 'note',
|
name: 'amount',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
label: 'Note',
|
label: 'Amount',
|
||||||
field: 'note'
|
field: 'amount'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'memo',
|
||||||
|
align: 'left',
|
||||||
|
label: 'Memo',
|
||||||
|
field: 'memo',
|
||||||
|
sortable: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'date',
|
name: 'date',
|
||||||
|
|
@ -679,10 +685,10 @@ page_container %}
|
||||||
sortable: true
|
sortable: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'amount',
|
name: 'hash',
|
||||||
align: 'right',
|
align: 'right',
|
||||||
label: 'Amount',
|
label: 'Hash',
|
||||||
field: 'amount',
|
field: 'hash',
|
||||||
sortable: true
|
sortable: true
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
@ -707,12 +713,10 @@ page_container %}
|
||||||
formattedBalance: function () {
|
formattedBalance: function () {
|
||||||
return this.balance / 100
|
return this.balance / 100
|
||||||
},
|
},
|
||||||
filteredPayments: function () {
|
tokenBuys: function() {
|
||||||
var q = this.paymentsTable.filter
|
return []
|
||||||
if (!q || q === '') return this.payments
|
|
||||||
|
|
||||||
return LNbits.utils.search(this.payments, q)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
canPay: function () {
|
canPay: function () {
|
||||||
if (!this.parse.invoice) return false
|
if (!this.parse.invoice) return false
|
||||||
return this.parse.invoice.sat <= this.balance
|
return this.parse.invoice.sat <= this.balance
|
||||||
|
|
@ -1000,7 +1004,7 @@ page_container %}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.$q.localStorage.getItem('cashu.amount')) {
|
if (!this.$q.localStorage.getItem('cashu.amount')) {
|
||||||
this.balanceAmount = 112340
|
this.balanceAmount = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// get mint
|
// get mint
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue