mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fixed error handling, change reviews fixed
This commit is contained in:
parent
ae1aaa9741
commit
01b58d5f6b
@ -1,45 +0,0 @@
|
|||||||
{"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
|
|
||||||
}
|
|
||||||
@ -170,7 +170,7 @@
|
|||||||
},
|
},
|
||||||
"gdt": {
|
"gdt": {
|
||||||
"gdt-received":"Gradido Transform (GDT) erhalten",
|
"gdt-received":"Gradido Transform (GDT) erhalten",
|
||||||
"factor":"Factor",
|
"factor":"Faktor",
|
||||||
"conversion-gdt-euro":"Umrechnung Euro / Gradido Transform (GDT)",
|
"conversion-gdt-euro":"Umrechnung Euro / Gradido Transform (GDT)",
|
||||||
"calculation":"Berechnung der Gradido Transform",
|
"calculation":"Berechnung der Gradido Transform",
|
||||||
"conversion":"Umrechnung",
|
"conversion":"Umrechnung",
|
||||||
|
|||||||
@ -136,7 +136,7 @@ export default {
|
|||||||
this.pending = false
|
this.pending = false
|
||||||
} else {
|
} else {
|
||||||
this.pending = true
|
this.pending = true
|
||||||
// what to do when loading balance fails?
|
this.$toasted.error(result.result.message)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateBalance(ammount) {
|
updateBalance(ammount) {
|
||||||
|
|||||||
@ -125,9 +125,3 @@ export default {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
|
||||||
.active {
|
|
||||||
background-color: rgba(192, 192, 192, 0.568);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|||||||
@ -17,13 +17,6 @@
|
|||||||
} in this.transactionsGdt"
|
} in this.transactionsGdt"
|
||||||
:key="id"
|
:key="id"
|
||||||
>
|
>
|
||||||
<div class="d-flex w-100 justify-content-between pb-3">
|
|
||||||
<h5 class="mb-1">
|
|
||||||
{{ $t('gdt.gdt-received') }} {{ comment ? ': [' + comment + ']' : '' }}
|
|
||||||
</h5>
|
|
||||||
<small>{{ $d($moment(date), 'long') }} {{ $i18n.locale === 'de' ? 'Uhr' : '' }}</small>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- ROW Start -->
|
<!-- ROW Start -->
|
||||||
<div class="d-flex gdt-transaction-list-item" v-b-toggle="'a' + date + ''">
|
<div class="d-flex gdt-transaction-list-item" v-b-toggle="'a' + date + ''">
|
||||||
<!-- ICON -->
|
<!-- ICON -->
|
||||||
@ -124,16 +117,6 @@
|
|||||||
<script>
|
<script>
|
||||||
import communityAPI from '../../../apis/communityAPI'
|
import communityAPI from '../../../apis/communityAPI'
|
||||||
|
|
||||||
const iconsByType = {
|
|
||||||
1: { icon: 'arrow-left-circle', classes: 'text-success', operator: '+' },
|
|
||||||
2: { icon: 'arrow-left-circle', classes: 'text-success', operator: '+' },
|
|
||||||
3: { icon: 'arrow-left-circle', classes: 'text-success', operator: '+' },
|
|
||||||
4: { icon: 'arrow-left-circle', classes: 'text-success', operator: '+' },
|
|
||||||
5: { icon: 'arrow-left-circle', classes: 'text-success', operator: '+' },
|
|
||||||
6: { icon: 'arrow-left-circle', classes: 'text-success', operator: '+' },
|
|
||||||
7: { icon: 'arrow-left-circle', classes: 'text-info', operator: '+' },
|
|
||||||
}
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'gdt-transaction-list',
|
name: 'gdt-transaction-list',
|
||||||
data() {
|
data() {
|
||||||
@ -143,23 +126,14 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getProperties(givenType) {
|
|
||||||
const type = iconsByType[givenType]
|
|
||||||
if (type)
|
|
||||||
return {
|
|
||||||
icon: type.icon,
|
|
||||||
class: type.classes + ' m-mb-1 font2em',
|
|
||||||
operator: type.operator,
|
|
||||||
}
|
|
||||||
this.throwError('no icon to given type')
|
|
||||||
},
|
|
||||||
throwError(msg) {
|
|
||||||
throw new Error(msg)
|
|
||||||
},
|
|
||||||
async updateGdt() {
|
async updateGdt() {
|
||||||
const result = await communityAPI.transactionsgdt(this.$store.state.sessionId)
|
const result = await communityAPI.transactionsgdt(this.$store.state.sessionId)
|
||||||
this.transactionsGdt = result.result.data.gdtEntries
|
if (result.success) {
|
||||||
this.transactionGdtCount = result.result.data.count
|
this.transactionsGdt = result.result.data.gdtEntries
|
||||||
|
this.transactionGdtCount = result.result.data.count
|
||||||
|
} else {
|
||||||
|
this.$toasted.error(result.result.message)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user