mirror of
https://github.com/IT4Change/gradido.git
synced 2026-01-16 09:54:32 +00:00
step 1
This commit is contained in:
parent
10c077e138
commit
e3f9a83ec5
45
frontend/public/json-example/admin_transactionGdt_list.json
Normal file
45
frontend/public/json-example/admin_transactionGdt_list.json
Normal file
@ -0,0 +1,45 @@
|
||||
{"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
|
||||
}
|
||||
],
|
||||
"transactionExecutingCount": 3000,
|
||||
"count": 3
|
||||
}
|
||||
@ -40,6 +40,13 @@ const communityAPI = {
|
||||
`${CONFIG.COMMUNITY_API_URL}listTransactions/${firstPage}/${items}/${order}/${sessionId}`,
|
||||
)
|
||||
},
|
||||
transactionsGdt: async (sessionId, firstPage = 1, items = 5, order = 'DESC') => {
|
||||
return apiGet(
|
||||
`${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 = {
|
||||
sessionId,
|
||||
|
||||
@ -58,10 +58,14 @@
|
||||
:pending="pending"
|
||||
@update-balance="updateBalance"
|
||||
@update-transactions="updateTransactions"
|
||||
@updateGdt="updateGdt"
|
||||
:transactionsGdt="transactionsGdt"
|
||||
|
||||
></router-view>
|
||||
</fade-transition>
|
||||
</div>
|
||||
<content-footer v-if="!$route.meta.hideFooter"></content-footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -75,6 +79,7 @@ import ContentFooter from './ContentFooter.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
|
||||
@ -106,7 +111,8 @@ export default {
|
||||
bookedBalance: 0,
|
||||
transactionCount: 0,
|
||||
pending: true,
|
||||
}
|
||||
transactionsGdt: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initScrollbar() {
|
||||
@ -141,12 +147,69 @@ 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
|
||||
}]
|
||||
|
||||
//console.log("DashboardLayout_gdd.vue")
|
||||
//console.log(this.result)
|
||||
},
|
||||
updateBalance(ammount) {
|
||||
this.balance -= ammount
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.initScrollbar()
|
||||
this.updateGdt()
|
||||
console.log(this.transactionsGdt)
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<div class="gdd-transaction-gtd-list">
|
||||
<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"
|
||||
: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>
|
||||
</b-list-group>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'gdd-transaction-gtd-list',
|
||||
props: {
|
||||
transactionsGdt: { default: () => [] },
|
||||
},
|
||||
methods: {
|
||||
updateGdt() {
|
||||
this.$emit('update-gdt')
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.el-table .cell {
|
||||
padding-left: 0px;
|
||||
padding-right: 0px;
|
||||
}
|
||||
</style>
|
||||
@ -10,6 +10,7 @@
|
||||
:show-pagination="true"
|
||||
@update-transactions="updateTransactions"
|
||||
/>
|
||||
<gdd-transaction-gdt-list :timestamp="timestamp" :transactionsGdt="transactionsGdt" @update-gdt="updateGdt"/>
|
||||
</b-col>
|
||||
</b-row>
|
||||
</b-container>
|
||||
@ -17,17 +18,22 @@
|
||||
</template>
|
||||
<script>
|
||||
import GddTransactionList from './AccountOverview/GddTransactionList.vue'
|
||||
import GddTransactionGdtList from './AccountOverview/GddTransactionGdtList.vue'
|
||||
|
||||
export default {
|
||||
name: 'UserProfileTransactionList',
|
||||
components: {
|
||||
GddTransactionList,
|
||||
GddTransactionGdtList
|
||||
},
|
||||
props: {
|
||||
transactions: {
|
||||
default: () => [],
|
||||
},
|
||||
transactionCount: { type: Number, default: 0 },
|
||||
transactionsGdt: {
|
||||
default: () => [],
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -38,6 +44,9 @@ export default {
|
||||
updateTransactions(pagination) {
|
||||
this.$emit('update-transactions', pagination)
|
||||
},
|
||||
updateGdt() {
|
||||
this.$emit('update-gdt')
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user