Sort uncleared transactions to the top
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
dae017f99e
commit
55fddea5a2
1 changed files with 9 additions and 1 deletions
|
@ -398,7 +398,15 @@ export default {
|
|||
|
||||
sortedTransactions() {
|
||||
const tx = [...this.transactions]
|
||||
tx.sort((b, a) => new Date(a.time).getTime() - new Date(b.time).getTime())
|
||||
tx.sort((b, a) => {
|
||||
if (a.cleared && !b.cleared) {
|
||||
return -1
|
||||
} else if (!a.cleared && b.cleared) {
|
||||
return 1
|
||||
}
|
||||
|
||||
return new Date(a.time).getTime() - new Date(b.time).getTime()
|
||||
})
|
||||
return tx
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue