mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
filter transactions for type creation due to the first transaction is always a decay
This commit is contained in:
parent
c4cbc50da0
commit
3abce024ba
@ -8,7 +8,7 @@ const apolloQueryMock = jest.fn().mockResolvedValue({
|
|||||||
transactionList: {
|
transactionList: {
|
||||||
transactions: [
|
transactions: [
|
||||||
{
|
{
|
||||||
type: 'created',
|
type: 'creation',
|
||||||
balance: 100,
|
balance: 100,
|
||||||
decayStart: 0,
|
decayStart: 0,
|
||||||
decayEnd: 0,
|
decayEnd: 0,
|
||||||
@ -27,7 +27,7 @@ const apolloQueryMock = jest.fn().mockResolvedValue({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'created',
|
type: 'creation',
|
||||||
balance: 200,
|
balance: 200,
|
||||||
decayStart: 0,
|
decayStart: 0,
|
||||||
decayEnd: 0,
|
decayEnd: 0,
|
||||||
@ -58,9 +58,7 @@ const mocks = {
|
|||||||
query: apolloQueryMock,
|
query: apolloQueryMock,
|
||||||
},
|
},
|
||||||
$toasted: {
|
$toasted: {
|
||||||
global: {
|
error: toastedErrorMock,
|
||||||
error: toastedErrorMock,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -30,10 +30,10 @@ export default {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then((result) => {
|
.then((result) => {
|
||||||
this.items = result.data.transactionList.transactions
|
this.items = result.data.transactionList.transactions.filter((t) => t.type === 'creation')
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
this.$toasted.global.error(error.message)
|
this.$toasted.error(error.message)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user