mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
add query listContributionLinks[D
This commit is contained in:
parent
b1416c59e7
commit
4ab160ec44
@ -164,16 +164,23 @@ export const listTransactionLinks = gql`
|
||||
`
|
||||
|
||||
export const listContributionLinks = gql`
|
||||
query {
|
||||
listContributionLinks {
|
||||
startDate
|
||||
endDate
|
||||
query($currentPage: Int = 1, $pageSize: Int = 25, $order: Order = DESC) {
|
||||
listContributionLinks(currentPage: $currentPage, pageSize: $pageSize, order: $order) {
|
||||
links {
|
||||
id
|
||||
amount
|
||||
name
|
||||
memo
|
||||
amount
|
||||
code
|
||||
link
|
||||
createdAt
|
||||
validFrom
|
||||
validTo
|
||||
maxAmountPerMonth
|
||||
cycle
|
||||
repetition
|
||||
maxAmount
|
||||
maxPerCycle
|
||||
}
|
||||
count
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
@ -63,7 +63,8 @@
|
||||
"updated": "Der Beitrag wurde geändert."
|
||||
},
|
||||
"contribution-link": {
|
||||
"thanksYouWith": "dankt dir mit"
|
||||
"thanksYouWith": "dankt dir mit",
|
||||
"unique":"( einmalig )"
|
||||
},
|
||||
"decay": {
|
||||
"before_startblock_transaction": "Diese Transaktion beinhaltet keine Vergänglichkeit.",
|
||||
|
||||
@ -63,7 +63,8 @@
|
||||
"updated": "The contribution was changed."
|
||||
},
|
||||
"contribution-link": {
|
||||
"thanksYouWith": "thanks you with"
|
||||
"thanksYouWith": "thanks you with",
|
||||
"unique":"( unique )"
|
||||
},
|
||||
"decay": {
|
||||
"before_startblock_transaction": "This transaction does not include decay.",
|
||||
|
||||
@ -17,17 +17,25 @@
|
||||
<small>
|
||||
{{ $t('community.openContributionLinkText', { _name_: CONFIG.COMMUNITY_NAME }) }}
|
||||
</small>
|
||||
Momentan gibt es aktuell {{ count }} Aktionen.
|
||||
<ul>
|
||||
<li v-for="item in items" v-bind:key="item">{{ item.id }}</li>
|
||||
<li v-for="item in itemsContributionLinks" v-bind:key="item.id">
|
||||
<div>{{ item.name }}</div>
|
||||
<div>{{ item.memo }}</div>
|
||||
<div>
|
||||
{{ item.amount | GDD }}
|
||||
<span v-if="item.cycle === 'ONCE'">{{ $t('contribution-link.unique') }}</span>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</b-container>
|
||||
<hr />
|
||||
<b-container>
|
||||
<div class="h3">{{ $t('community.moderators') }}</div>
|
||||
<ul>
|
||||
<li v-for="item in items" v-bind:key="item">{{ item.id }}</li>
|
||||
<li v-for="item in itemsModerators" v-bind:key="item.id">{{ item.name }}</li>
|
||||
</ul>
|
||||
<mail>{{ supportMail }}</mail>
|
||||
<b-link href="mailto: abc@example.com">{{ supportMail }}</b-link>
|
||||
</b-container>
|
||||
<hr />
|
||||
<b-container>
|
||||
@ -43,16 +51,46 @@
|
||||
</template>
|
||||
<script>
|
||||
import CONFIG from '@/config'
|
||||
import { listContributionLinks } from '@/graphql/queries'
|
||||
|
||||
export default {
|
||||
name: 'InfoStatistic',
|
||||
data() {
|
||||
return {
|
||||
CONFIG,
|
||||
items: [{ id: 1 }, { id: 2 }, { id: 3 }],
|
||||
count: null,
|
||||
itemsContributionLinks: [],
|
||||
itemsModerators: [
|
||||
{ id: 1, name: 'name1' },
|
||||
{ id: 2, name: 'name2' },
|
||||
{ id: 3, name: 'name3' },
|
||||
],
|
||||
supportMail: 'support@supportemail.de',
|
||||
membersCount: '1203',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async getContributionLinks() {
|
||||
this.$apollo
|
||||
.query({
|
||||
query: listContributionLinks,
|
||||
fetchPolicy: 'network-only',
|
||||
})
|
||||
.then((result) => {
|
||||
this.count = result.data.listContributionLinks.count
|
||||
this.itemsContributionLinks = result.data.listContributionLinks.links
|
||||
})
|
||||
.catch(() => {
|
||||
this.toastError('listContributionLinks has no result, use default data')
|
||||
})
|
||||
},
|
||||
updateTransactions(pagination) {
|
||||
this.$emit('update-transactions', pagination)
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getContributionLinks()
|
||||
this.updateTransactions(0)
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user