mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
pull dario
This commit is contained in:
parent
79f80e2af8
commit
c17871f82b
@ -342,7 +342,7 @@ Ein GDT Eintrag sieht so aus:
|
||||
```
|
||||
{
|
||||
"id": 8857,
|
||||
"amount": 1000, // = 10,00 Euro
|
||||
"amount": 1000, // GDT
|
||||
"date": "2020-06-17T14:12:00+00:00",
|
||||
"email": "foerderkreis-1@gradido.org",
|
||||
"comment": null,
|
||||
@ -379,8 +379,10 @@ Bis zum 5. (Bernd ist 2.)
|
||||
Diese Beziehung wird durch die connectEntries dargestellt.
|
||||
Insbesondere durch den publishersPath, connect enthält einfach nur alle mögliche Daten.
|
||||
|
||||
|
||||
# TODO
|
||||
TODO: Update GDT-Server um paging und Zugriff auf alle Einträge zu erhalten, optimierter Zugriff
|
||||
GET https://staging.gradido.net/state-balances/ajaxGdtTransactions
|
||||
Liefert wenn alles in Ordnung ist:
|
||||
|
||||
wenn nicht type 7 dann "amount" in euro ansonsten in GDT
|
||||
@ -45,10 +45,10 @@ const communityAPI = {
|
||||
`${CONFIG.COMMUNITY_API_URL}state-balances/ajaxGdtOverview/${firstPage}/${items}/${order}/${sessionId}`,
|
||||
)
|
||||
},
|
||||
//http://localhost/vue/public/json-example/admin_transactionGdt_list.json
|
||||
//http://localhost/state-balances/ajaxGdtOverview
|
||||
/* create: async (sessionId, email, amount, memo, target_date = new Date() ) => {
|
||||
const payload = {
|
||||
/* http://localhost/vue/public/json-example/admin_transactionGdt_list.json
|
||||
http://localhost/state-balances/ajaxGdtOverview
|
||||
create: async (sessionId, email, amount, memo, target_date = new Date() ) => {
|
||||
const payload = {
|
||||
sessionId,
|
||||
email,
|
||||
amount,
|
||||
|
||||
@ -49,7 +49,6 @@
|
||||
|
||||
<div @click="$sidebar.displaySidebar(false)">
|
||||
<fade-transition :duration="200" origin="center top" mode="out-in">
|
||||
<!-- your content here -->
|
||||
<router-view
|
||||
:balance="balance"
|
||||
:gdt-balance="GdtBalance"
|
||||
@ -58,14 +57,12 @@
|
||||
:pending="pending"
|
||||
@update-balance="updateBalance"
|
||||
@update-transactions="updateTransactions"
|
||||
@updateGdt="updateGdt"
|
||||
@updateGdt="updateGdt"
|
||||
:transactionsGdt="transactionsGdt"
|
||||
|
||||
></router-view>
|
||||
</fade-transition>
|
||||
</div>
|
||||
<content-footer v-if="!$route.meta.hideFooter"></content-footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -75,11 +72,9 @@ import 'perfect-scrollbar/css/perfect-scrollbar.css'
|
||||
import loginAPI from '../../apis/loginAPI'
|
||||
|
||||
import ContentFooter from './ContentFooter.vue'
|
||||
// import DashboardContent from './Content.vue';
|
||||
import { FadeTransition } from 'vue2-transitions'
|
||||
import communityAPI from '../../apis/communityAPI'
|
||||
import VueQrcode from 'vue-qrcode'
|
||||
//import { gdt } from '../../../public/json-example/admin_transactionGdt_list.json'
|
||||
|
||||
function hasElement(className) {
|
||||
return document.getElementsByClassName(className).length > 0
|
||||
@ -112,7 +107,7 @@ export default {
|
||||
transactionCount: 0,
|
||||
pending: true,
|
||||
transactionsGdt: [],
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initScrollbar() {
|
||||
@ -147,60 +142,59 @@ export default {
|
||||
// what to do when loading balance fails?
|
||||
}
|
||||
},
|
||||
async updateGdt(){
|
||||
//this.transactionsGdt = gdt
|
||||
// const result = await communityAPI.transactionsGdt(
|
||||
// this.$store.state.sessionId
|
||||
// )
|
||||
|
||||
this.transactionsGdt = [{"state":"success", "gdt":
|
||||
[
|
||||
{
|
||||
"id": 8821,
|
||||
"amount": 1000,
|
||||
"date": "2020-08-12T14:12:00+00:00",
|
||||
"email": "foerderkreis-1@gradido.org",
|
||||
"comment": null,
|
||||
"coupon_code": "",
|
||||
"gdt_entry_type_id": 4,
|
||||
"factor": "20.0000",
|
||||
"amount2": 0,
|
||||
"factor2": "0.0500",
|
||||
"gdt": 1000
|
||||
},
|
||||
{
|
||||
"id": 8552,
|
||||
"amount": 1000,
|
||||
"date": "2020-06-17T14:12:00+00:00",
|
||||
"email": "foerderkreis-1@gradido.org",
|
||||
"comment": null,
|
||||
"coupon_code": "",
|
||||
"gdt_entry_type_id": 4,
|
||||
"factor": "20.0000",
|
||||
"amount2": 0,
|
||||
"factor2": "0.0500",
|
||||
"gdt": 1000
|
||||
},
|
||||
{
|
||||
"id": 8317,
|
||||
"amount": 1000,
|
||||
"date": "2020-03-16T14:12:00+00:00",
|
||||
"email": "foerderkreis-1@gradido.org",
|
||||
"comment": null,
|
||||
"coupon_code": "",
|
||||
"gdt_entry_type_id": 4,
|
||||
"factor": "20.0000",
|
||||
"amount2": 0,
|
||||
"factor2": "0.0500",
|
||||
"gdt": 1000
|
||||
}
|
||||
],
|
||||
"transactionGdtExecutingCount": 3000,
|
||||
"count": 3
|
||||
}]
|
||||
async updateGdt() {
|
||||
// const result = await communityAPI.transactionsGdt(
|
||||
// this.$store.state.sessionId
|
||||
// )
|
||||
|
||||
//console.log("DashboardLayout_gdd.vue")
|
||||
//console.log(this.result)
|
||||
this.transactionsGdt = [
|
||||
{
|
||||
state: 'success',
|
||||
gdt: [
|
||||
{
|
||||
id: 8821,
|
||||
amount: 1000,
|
||||
date: '2020-08-12T14:12:00+00:00',
|
||||
email: 'foerderkreis-1@gradido.org',
|
||||
comment: null,
|
||||
coupon_code: '',
|
||||
gdt_entry_type_id: 4,
|
||||
factor: '20.0000',
|
||||
amount2: 0,
|
||||
factor2: '0.0500',
|
||||
gdt: 1000,
|
||||
},
|
||||
{
|
||||
id: 8552,
|
||||
amount: 1000,
|
||||
date: '2020-06-17T14:12:00+00:00',
|
||||
email: 'foerderkreis-1@gradido.org',
|
||||
comment: null,
|
||||
coupon_code: '',
|
||||
gdt_entry_type_id: 4,
|
||||
factor: '20.0000',
|
||||
amount2: 0,
|
||||
factor2: '0.0500',
|
||||
gdt: 1000,
|
||||
},
|
||||
{
|
||||
id: 8317,
|
||||
amount: 1000,
|
||||
date: '2020-03-16T14:12:00+00:00',
|
||||
email: 'foerderkreis-1@gradido.org',
|
||||
comment: null,
|
||||
coupon_code: '',
|
||||
gdt_entry_type_id: 4,
|
||||
factor: '20.0000',
|
||||
amount2: 0,
|
||||
factor2: '0.0500',
|
||||
gdt: 1000,
|
||||
},
|
||||
],
|
||||
transactionGdtExecutingCount: 3000,
|
||||
count: 3,
|
||||
},
|
||||
]
|
||||
},
|
||||
updateBalance(ammount) {
|
||||
this.balance -= ammount
|
||||
@ -209,7 +203,6 @@ export default {
|
||||
mounted() {
|
||||
this.initScrollbar()
|
||||
this.updateGdt()
|
||||
console.log(this.transactionsGdt)
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -1,26 +1,36 @@
|
||||
<template>
|
||||
<div class="gdd-transaction-gtd-list">
|
||||
<hr>
|
||||
{{transactionsGdt[0].gdt}}
|
||||
<hr />
|
||||
{{ transactionsGdt[0].gdt }}
|
||||
<b-list-group>
|
||||
<b-list-group-item
|
||||
v-for="{ id, amount, date, email, comment, coupon_code, gdt_entry_type_id, factor, amount2, factor2, gdt } in transactionsGdt"
|
||||
v-for="{
|
||||
id,
|
||||
amount,
|
||||
date,
|
||||
email,
|
||||
comment,
|
||||
coupon_code,
|
||||
gdt_entry_type_id,
|
||||
factor,
|
||||
amount2,
|
||||
factor2,
|
||||
gdt,
|
||||
} in transactionsGdt[0].gdt"
|
||||
:key="id"
|
||||
|
||||
>
|
||||
<div> id: {{id}}</div>
|
||||
<div> amount: {{amount}}</div>
|
||||
<div> date: {{date}}</div>
|
||||
<div> email: {{email}}</div>
|
||||
<div> comment: {{comment}}</div>
|
||||
<div> coupon_code: {{coupon_code}}</div>
|
||||
<div> gdt_entry_type_id: {{gdt_entry_type_id}}</div>
|
||||
<div> factor: {{factor}}</div>
|
||||
<div> amount2: {{amount2}}</div>
|
||||
<div> factor2: {{factor2}}</div>
|
||||
<div> gdt: {{gdt}}</div>
|
||||
|
||||
</b-list-group-item>
|
||||
<div>id: {{ id }}</div>
|
||||
<div>amount: {{ amount }}</div>
|
||||
<div>date: {{ date }}</div>
|
||||
<div>email: {{ email }}</div>
|
||||
<div>comment: {{ comment }}</div>
|
||||
<div>coupon_code: {{ coupon_code }}</div>
|
||||
<div>gdt_entry_type_id: {{ gdt_entry_type_id }}</div>
|
||||
<div>factor: {{ factor }}</div>
|
||||
<div>amount2: {{ amount2 }}</div>
|
||||
<div>factor2: {{ factor2 }}</div>
|
||||
<div>gdt: {{ gdt }}</div>
|
||||
</b-list-group-item>
|
||||
</b-list-group>
|
||||
</div>
|
||||
</template>
|
||||
@ -34,7 +44,7 @@ export default {
|
||||
methods: {
|
||||
updateGdt() {
|
||||
this.$emit('update-gdt')
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<b-container fluid>
|
||||
<b-container>
|
||||
<b-row>
|
||||
<b-col class="order-xl-1">
|
||||
<gdd-transaction-list
|
||||
@ -10,7 +10,11 @@
|
||||
:show-pagination="true"
|
||||
@update-transactions="updateTransactions"
|
||||
/>
|
||||
<gdd-transaction-gdt-list :timestamp="timestamp" :transactionsGdt="transactionsGdt" @update-gdt="updateGdt"/>
|
||||
<gdd-transaction-gdt-list
|
||||
:timestamp="timestamp"
|
||||
:transactionsGdt="transactionsGdt"
|
||||
@update-gdt="updateGdt"
|
||||
/>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</b-container>
|
||||
@ -24,7 +28,7 @@ export default {
|
||||
name: 'UserProfileTransactionList',
|
||||
components: {
|
||||
GddTransactionList,
|
||||
GddTransactionGdtList
|
||||
GddTransactionGdtList,
|
||||
},
|
||||
props: {
|
||||
transactions: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user