gradido/frontend/src/components/GdtTransactionList.vue
MateuszMichalowski cdaca99b04
feat(frontend): migration setup (#3342)
* frontend - moved to vue 2.7 and vite

* frontend - moved to vue 3

* frontend - login page updates

* fix(frontend): WiP migration

* fix(frontend): WiP migration

* fix(frontend): WiP migration

* fix(frontend): WiP migration

* fix(frontend): WiP migration

* fix(frontend): fix eslint/stylelint issues

* fix(frontend): fix eslint/stylelint issues

* feature(frontend): update node in docker frontend

* feature(frontend): move send types out of Send file

* feature(frontend): add entry in package json to fix eslint issue

* feature(frontend): eslint fix

* replace docker-compose with docker compose

* update docker-compose test file

* feature(frontend): Creation fixes

* feature(frontend): Add missing updates for apollo scripts.

---------

Co-authored-by: einhornimmond <silas@einhornimmond.de>
2024-08-08 23:02:15 +02:00

89 lines
2.0 KiB
Vue

<template>
<div class="gdt-transaction-list">
<div class="list-group">
<div v-if="transactionGdtCount === 0" class="text-center">
{{ $t('gdt.no-transactions') }}
<hr />
<BButton class="gdt-funding" :href="link" target="_blank">
{{ $t('gdt.funding') }}
</BButton>
</div>
<div v-else-if="transactionGdtCount === -1" class="text-center">
{{ $t('gdt.not-reachable') }}
</div>
<div
v-for="{ id, amount, date, comment, gdtEntryType, factor, gdt } in transactionsGdt"
v-else
:key="id"
>
<transaction
:id="id"
:amount="amount"
:date="date"
:comment="comment"
:gdt-entry-type="gdtEntryType"
:factor="factor"
:gdt="gdt"
/>
</div>
</div>
<BPagination
v-if="transactionGdtCount > pageSize"
v-model="currentPage"
class="mt-3"
pills
size="lg"
:per-page="pageSize"
:total-rows="transactionGdtCount"
align="center"
:hide-ellipsis="true"
/>
</div>
</template>
<script>
import Transaction from '@/components/Transaction'
export default {
name: 'GdtTransactionList',
components: {
Transaction,
},
props: {
transactionsGdt: {
type: Array,
required: true,
},
transactionGdtCount: { type: Number, required: true },
pageSize: { type: Number, required: true },
modelValue: { type: Number, required: true },
},
data() {
return {
currentPage: this.value,
link: 'https://gradido.net/' + this.$store.state.language + '/memberships/',
}
},
watch: {
currentPage() {
if (this.modelValue !== this.currentPage) this.$emit('input', this.currentPage)
},
},
}
</script>
<style>
.el-table .cell {
padding-left: 0;
padding-right: 0;
}
.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
background-color: #f8f9fe38;
}
.gdt-transaction-list-item {
outline: none !important;
}
</style>