fix: payments filter (#2989)

This commit is contained in:
Tiago Vasconcelos 2025-02-24 11:53:18 +00:00 committed by GitHub
parent ab0f52d811
commit 73a57ecf97
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

File diff suppressed because one or more lines are too long

View file

@ -359,7 +359,7 @@ window.LNbits = {
prepareFilterQuery(tableConfig, props) { prepareFilterQuery(tableConfig, props) {
if (props) { if (props) {
tableConfig.pagination = props.pagination tableConfig.pagination = props.pagination
tableConfig.filter = props.filter tableConfig.filter = {...tableConfig.filter, ...props.filter}
} }
const pagination = tableConfig.pagination const pagination = tableConfig.pagination
tableConfig.loading = true tableConfig.loading = true

View file

@ -312,7 +312,7 @@ window.PaymentsPageLogic = {
const timeFrom = this.searchDate.from + 'T00:00:00' const timeFrom = this.searchDate.from + 'T00:00:00'
const timeTo = this.searchDate.to + 'T23:59:59' const timeTo = this.searchDate.to + 'T23:59:59'
this.lnbitsBalance = data[data.length - 1].balance this.lnbitsBalance = data.length ? data[data.length - 1].balance : 0
data = data.filter(p => { data = data.filter(p => {
if (this.searchDate.from && this.searchDate.to) { if (this.searchDate.from && this.searchDate.to) {
return p.date >= timeFrom && p.date <= timeTo return p.date >= timeFrom && p.date <= timeTo