feat: add failed payments toggle to wallet page (#2794)
* feat: add failed payments toggle to wallet page --------- Co-authored-by: Tiago Vasconcelos <talvasconcelos@gmail.com>
This commit is contained in:
co-authored by
Tiago Vasconcelos
parent
5104cbb285
commit
7ee78248b7
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -378,6 +378,7 @@ window.LNbits = {
|
||||
prepareFilterQuery(tableConfig, props) {
|
||||
if (props) {
|
||||
tableConfig.pagination = props.pagination
|
||||
tableConfig.filter = props.filter
|
||||
}
|
||||
let pagination = tableConfig.pagination
|
||||
tableConfig.loading = true
|
||||
|
||||
@@ -6,6 +6,7 @@ window.app.component('payment-list', {
|
||||
data: function () {
|
||||
return {
|
||||
denomination: LNBITS_DENOMINATION,
|
||||
failedPaymentsToggle: false,
|
||||
payments: [],
|
||||
paymentsTable: {
|
||||
columns: [
|
||||
@@ -32,6 +33,9 @@ window.app.component('payment-list', {
|
||||
rowsNumber: 10
|
||||
},
|
||||
search: null,
|
||||
filter: {
|
||||
'status[ne]': 'failed'
|
||||
},
|
||||
loading: false
|
||||
},
|
||||
exportTagName: '',
|
||||
@@ -107,7 +111,6 @@ window.app.component('payment-list', {
|
||||
field: row => row.extra.wallet_fiat_amount
|
||||
}
|
||||
],
|
||||
filter: null,
|
||||
loading: false
|
||||
}
|
||||
}
|
||||
@@ -215,6 +218,16 @@ window.app.component('payment-list', {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
failedPaymentsToggle(newVal) {
|
||||
if (newVal === false) {
|
||||
this.paymentsTable.filter = {
|
||||
'status[ne]': 'failed'
|
||||
}
|
||||
} else {
|
||||
this.paymentsTable.filter = null
|
||||
}
|
||||
this.fetchPayments()
|
||||
},
|
||||
lazy: function (newVal) {
|
||||
if (newVal === true) this.fetchPayments()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user