diff --git a/frontend/README.md b/frontend/README.md index d94034c15..e9ac0b097 100755 --- a/frontend/README.md +++ b/frontend/README.md @@ -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 \ No newline at end of file diff --git a/frontend/src/apis/communityAPI.js b/frontend/src/apis/communityAPI.js index 65b9d40b9..ed1d336df 100644 --- a/frontend/src/apis/communityAPI.js +++ b/frontend/src/apis/communityAPI.js @@ -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, diff --git a/frontend/src/views/Layout/DashboardLayout_gdd.vue b/frontend/src/views/Layout/DashboardLayout_gdd.vue index 302fe5039..2b07e3884 100755 --- a/frontend/src/views/Layout/DashboardLayout_gdd.vue +++ b/frontend/src/views/Layout/DashboardLayout_gdd.vue @@ -49,7 +49,6 @@
-
- @@ -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) }, } diff --git a/frontend/src/views/Pages/AccountOverview/GddTransactionGdtList.vue b/frontend/src/views/Pages/AccountOverview/GddTransactionGdtList.vue index 775d4b70e..f19db82d3 100644 --- a/frontend/src/views/Pages/AccountOverview/GddTransactionGdtList.vue +++ b/frontend/src/views/Pages/AccountOverview/GddTransactionGdtList.vue @@ -1,26 +1,36 @@ @@ -34,7 +44,7 @@ export default { methods: { updateGdt() { this.$emit('update-gdt') - }, + }, }, } diff --git a/frontend/src/views/Pages/UserProfileTransactionList.vue b/frontend/src/views/Pages/UserProfileTransactionList.vue index 75d296306..20e9bcb93 100644 --- a/frontend/src/views/Pages/UserProfileTransactionList.vue +++ b/frontend/src/views/Pages/UserProfileTransactionList.vue @@ -1,6 +1,6 @@