db request test, style gdt

This commit is contained in:
ogerly 2021-08-09 08:46:26 +02:00
parent 0f8e29ac06
commit 3e73a0ff4b
30 changed files with 68 additions and 83 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 763 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 737 B

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="36px" height="36px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 43.2 (39069) - http://www.bohemiancoding.com/sketch -->
<title>UI/icons/dark/github</title>
<desc>Created with Sketch.</desc>
<defs/>
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="UI/icons/dark/github" fill="#182359">
<path d="M17.9985267,2 C9.16436969,2 2,9.16338746 2,18.0004911 C2,25.0695847 6.58405721,31.0660855 12.9420179,33.1818042 C13.7425335,33.3291384 14.0342552,32.8350778 14.0342552,32.4107554 C14.0342552,32.0306332 14.020504,31.0248319 14.0126462,29.6899843 C9.56217195,30.6564965 8.62316216,27.5447988 8.62316216,27.5447988 C7.89533135,25.696246 6.84631204,25.2041499 6.84631204,25.2041499 C5.3935971,24.2120998 6.95632156,24.2317444 6.95632156,24.2317444 C8.56226404,24.3447006 9.40697996,25.8809049 9.40697996,25.8809049 C10.834157,28.3256699 13.1522146,27.6194481 14.063722,27.2098591 C14.2090917,26.1765554 14.6226097,25.4713159 15.0793456,25.0715492 C11.5266276,24.6678535 7.7912152,23.294699 7.7912152,17.163633 C7.7912152,15.417232 8.41492986,13.9880905 9.43841125,12.8703152 C9.27339697,12.4656374 8.72433162,10.8380859 9.5955677,8.63593112 C9.5955677,8.63593112 10.9382731,8.20571534 13.9949661,10.2762516 C15.27088,9.9206851 16.6401056,9.7438841 18.0004911,9.7370085 C19.3598944,9.7438841 20.7281378,9.9206851 22.0060161,10.2762516 C25.0607447,8.20571534 26.4014856,8.63593112 26.4014856,8.63593112 C27.2746861,10.8380859 26.7256208,12.4656374 26.5615888,12.8703152 C27.5870346,13.9880905 28.2058381,15.417232 28.2058381,17.163633 C28.2058381,23.3104147 24.4645324,24.6629424 20.9010099,25.0587802 C21.4746309,25.5528408 21.9863716,26.5291752 21.9863716,28.0211793 C21.9863716,30.1604715 21.966727,31.8862457 21.966727,32.4107554 C21.966727,32.8390067 22.255502,33.3369962 23.0668222,33.180822 C29.4198717,31.0601921 34,25.0676202 34,18.0004911 C34,9.16338746 26.8356303,2 17.9985267,2" id="icons/icon-github"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="36px" height="36px" viewBox="0 0 36 36" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 43.2 (39069) - http://www.bohemiancoding.com/sketch -->
<title>UI/icons/color/google</title>
<desc>Created with Sketch.</desc>
<defs/>
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="UI/icons/color/google">
<g id="Group" transform="translate(2.000000, 2.000000)">
<path d="M32.4365525,16.6024012 C32.4365525,15.4515967 32.3313665,14.344128 32.1357206,13.2820585 L16.5492615,13.2820585 L16.5492615,19.5616128 L25.4557094,19.5616128 C25.0721312,21.5908257 23.9059692,23.3098098 22.1535707,24.4613022 L22.1535707,28.5341733 L27.5019274,28.5341733 C30.631561,25.7077204 32.4365525,21.5461142 32.4365525,16.6024012 L32.4365525,16.6024012 Z" id="Shape" fill="#4285F4"/>
<path d="M16.5492615,32.4674071 C21.0175621,32.4674071 24.7635856,31.0139403 27.5019274,28.5341733 L22.1535707,24.4613022 C20.6718508,25.4353244 18.7756982,26.0110706 16.5492615,26.0110706 C12.2387399,26.0110706 8.59088994,23.1557272 7.2893887,19.3181072 L1.76011213,19.3181072 L1.76011213,23.5244249 C4.48302664,28.8299569 10.0796222,32.4674071 16.5492615,32.4674071 L16.5492615,32.4674071 Z" id="Shape" fill="#34A853"/>
<path d="M7.2893887,19.3181072 C6.95840347,18.344085 6.77047118,17.3033395 6.77047118,16.2337035 C6.77047118,15.1640676 6.95840347,14.1233221 7.2893887,13.1492999 L7.2893887,8.94298219 L1.76011213,8.94298219 C0.639530783,11.1345322 0,13.6142992 0,16.2337035 C0,18.8531079 0.639530783,21.3328749 1.76011213,23.5244249 L7.2893887,19.3181072 L7.2893887,19.3181072 Z" id="Shape" fill="#FBBC05"/>
<path d="M16.5492615,6.4563365 C18.9790577,6.4563365 21.160615,7.27558824 22.8758478,8.88382548 L27.6225407,4.22764161 C24.755872,1.60892511 21.0098485,0 16.5492615,0 C10.0803235,0 4.48302664,3.63813805 1.76011213,8.94298219 L7.2893887,13.1492999 C8.59088994,9.31236774 12.2394411,6.4563365 16.5492615,6.4563365 Z" id="Shape" fill="#EA4335"/>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 533 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -40,7 +40,7 @@ const communityAPI = {
`${CONFIG.COMMUNITY_API_URL}listTransactions/${firstPage}/${items}/${order}/${sessionId}`,
)
},
transactionsGdt: async (sessionId, firstPage = 1, items = 5, order = 'DESC') => {
transactionsgdt: async (sessionId, firstPage = 1, items = 5, order = 'DESC') => {
return apiGet(
`${CONFIG.COMMUNITY_API_URL}listGDTTransactions/${firstPage}/${items}/${order}/${sessionId}`,
)

View File

@ -57,8 +57,9 @@
:pending="pending"
@update-balance="updateBalance"
@update-transactions="updateTransactions"
@updateGdt="updateGdt"
@update-gdt="updateGdt"
:transactionsGdt="transactionsGdt"
:transactionGdtCount="transactionGdtCount"
></router-view>
</fade-transition>
</div>
@ -107,6 +108,7 @@ export default {
transactionCount: 0,
pending: true,
transactionsGdt: [],
transactionGdtCount: 0,
}
},
methods: {
@ -142,12 +144,13 @@ export default {
// what to do when loading balance fails?
}
},
async updateGdt() {
const result = await communityAPI.transactionsGdt(
this.$store.state.sessionId
)
async updateGdt(pagination) {
const result2 = await communityAPI.transactionsgdt(
this.$store.state.sessionId
)
console.log(result)
console.log(' communityAPI.transactionsgdt')
console.log(result2)
this.transactionsGdt = [
{
@ -210,6 +213,8 @@ export default {
count: 4,
},
]
this.transactionGdtCount = this.transactionsGdt[0].count
// console.log('transactionGdtCount', this.transactionGdtCount)
},
updateBalance(ammount) {
this.balance -= ammount

View File

@ -1,8 +1,9 @@
<template>
<div class="gdt-transaction-list">
{{this.transactionsGdt[0].gdt}}
<b-list-group>
<b-list-group>
<b-list-group-item
v-for="{
id,
@ -16,31 +17,34 @@
amount2,
factor2,
gdt,
} in transactionsGdt[0].gdt"
} in this.transactionsGdt[0].gdt"
:key="id"
>
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">{{id}}: {{ email }}</h5>
<small>{{ date }} {{ $i18n.locale === 'de' ? 'Uhr' : '' }}</small>
</div>
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">List group item heading</h5>
<small>{{ $d($moment(date), 'long') }} {{ $i18n.locale === 'de' ? 'Uhr' : '' }}</small>
</div>
<p class="mb-1">
Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit.
</p>
<small>Donec id elit non mi porta.</small>
<div>{{ id }} {{ amount }} {{ date }} {{ email }} {{ comment }} {{ coupon_code }}
{{ gdt_entry_type_id }} {{ factor }} {{ amount2 }} {{ factor2 }}
{{ gdt }}</div>
{{ gdt_entry_type_id === 7 ? 'GDT in Euro gekauft' : 'GDT von gradido bekommen' }}
<div v-if="gdt_entry_type_id === 7">
{{amount }} GDT {{ (amount / factor) }}
</div>
<div v-else>
{{amount }} GDT
</div>
<small>
{{ id }} {{ amount }} {{ date }} {{ email }} {{ comment }} {{ coupon_code }}
{{ gdt_entry_type_id }} {{ factor }} {{ amount2 }} {{ factor2 }} {{ gdt }}
</small>
<div>{{gdt_entry_type_id === 7 ? 'GDT in Euro gekauft' : 'GDT von gradido bekommen'}}</div>
</b-list-group-item>
</b-list-group>
<!--
<hr>
<div>
{{transactionsGdt[0].state}}
@ -53,20 +57,29 @@
<div>
{{transactionsGdt[0]}}
</div>
-->
</div>
</template>
<script>
export default {
name: 'gdt-transaction-list',
props: {
transactionsGdt: { default: () => [] },
transactionGdtCount: { type: Number, default: 0 },
},
data() {
return {
gdt: []
}
},
methods: {
updateGdt() {
this.$emit('update-gdt')
this.$emit('update-gdt', {
firstPage: this.currentPage,
items: this.pageSize,
})
},
},
}

View File

@ -1,32 +1,29 @@
<template>
<div >
<div class="pb-4">
<b-tabs content-class="mt-3 pt-4 pb-4" justified>
<b-tab :title="'Gradido (' + $n(balance, 'decimal') + ' GDD)'" active class="px-4">
<p class="tab-tex">Gradido Transaktionen </p>
<b-tab :title="'Gradido (' + $n(balance, 'decimal') + ' GDD)'" class="px-4">
<p class="tab-tex">Gradido Transaktionen</p>
<gdd-transaction-list
:timestamp="timestamp"
:transactionCount="transactionCount"
:transactions="transactions"
:show-pagination="true"
@update-transactions="updateTransactions"
/>
:timestamp="timestamp"
:transactionCount="transactionCount"
:transactions="transactions"
:show-pagination="true"
@update-transactions="updateTransactions"
/>
</b-tab>
<b-tab :title="'Gradido Transform (' + $n(GdtBalance, 'decimal') +' GDT)'" class="px-4">
<b-tab :title="'Gradido Transform (' + $n(GdtBalance, 'decimal') + ' GDT)'" class="px-4">
<p class="">Gradido Transform Transaktionen</p>
<gdt-transaction-list
:timestamp="timestamp"
:transactionsGdt="transactionsGdt"
@update-gdt="updateGdt"
/>
</b-tab>
</b-tabs>
</div>
<gdt-transaction-list
:transactionsGdt="transactionsGdt"
:transactionGdtCount="transactionGdtCount"
@update-gdt="updateGdt"
/>
</b-tab>
</b-tabs>
</div>
</template>
<script>
import GddTransactionList from './AccountOverview/GddTransactionList.vue'
@ -48,6 +45,7 @@ export default {
transactionsGdt: {
default: () => [],
},
transactionGdtCount: { type: Number, default: 0 },
},
data() {
return {
@ -64,6 +62,4 @@ export default {
},
}
</script>
<style>
</style>
<style></style>