mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Changed the logic of no transactions, sets -1 if error was thrown so that we dont have the error if no transactions are present.
This commit is contained in:
parent
47078a9a01
commit
151f497252
@ -100,6 +100,7 @@ export default {
|
||||
})
|
||||
.catch((error) => {
|
||||
this.pending = true
|
||||
this.transactionCount = -1
|
||||
this.$toasted.global.error(error.message)
|
||||
// what to do when loading balance fails?
|
||||
})
|
||||
|
||||
@ -61,6 +61,12 @@ describe('GddTransactionList', () => {
|
||||
})
|
||||
|
||||
describe('without any properties', () => {
|
||||
beforeEach(async () => {
|
||||
await wrapper.setProps({
|
||||
transactions: [],
|
||||
transactionCount: -1,
|
||||
})
|
||||
})
|
||||
it('renders text saying that there are error.empty-transactionlist ', () => {
|
||||
expect(wrapper.find('div.gdd-transaction-list').text()).toContain(
|
||||
'transaction.nullTransactions',
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
{{ $t('error.no-transactionlist') }}
|
||||
</small>
|
||||
</div>
|
||||
<div v-if="transactionCount === 'undefined'" class="test-empty-transactionlist text-right">
|
||||
<div v-if="transactionCount < 0" class="test-empty-transactionlist text-right">
|
||||
<b-icon icon="exclamation-triangle" class="mr-2" style="color: red"></b-icon>
|
||||
<small>{{ $t('error.empty-transactionlist') }}</small>
|
||||
</div>
|
||||
@ -134,7 +134,7 @@
|
||||
:per-page="pageSize"
|
||||
:total-rows="transactionCount"
|
||||
></pagination-buttons>
|
||||
<div v-if="transactionCount === 0" class="mt-4 text-center">
|
||||
<div v-if="transactionCount < 0" class="mt-4 text-center">
|
||||
<span>{{ $t('transaction.nullTransactions') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user