mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +00:00
* frontend - moved to vue 2.7 and vite * frontend - moved to vue 3 * frontend - login page updates * fix(frontend): WiP migration * fix(frontend): WiP migration * fix(frontend): WiP migration * fix(frontend): WiP migration * fix(frontend): WiP migration * fix(frontend): fix eslint/stylelint issues * fix(frontend): fix eslint/stylelint issues * feature(frontend): update node in docker frontend * feature(frontend): move send types out of Send file * feature(frontend): add entry in package json to fix eslint issue * feature(frontend): eslint fix * replace docker-compose with docker compose * update docker-compose test file * feature(frontend): Creation fixes * feature(frontend): Add missing updates for apollo scripts. --------- Co-authored-by: einhornimmond <silas@einhornimmond.de>
86 lines
2.6 KiB
Vue
86 lines
2.6 KiB
Vue
<template>
|
|
<div class="gdt-transaction-collapse py-4 mb-4 gradido-no-border">
|
|
<BRow class="gdt-list-collapse-header-text mb-3">
|
|
<BCol class="collapse-headline">
|
|
<b>{{ getLinesByType.headline }}</b>
|
|
</BCol>
|
|
</BRow>
|
|
<BRow class="gdt-list-collapse-box--all">
|
|
<BCol cols="12" lg="4" md="4">
|
|
<div class="collapse-first">{{ getLinesByType.first }}</div>
|
|
<div class="collapse-second">{{ getLinesByType.second }}</div>
|
|
</BCol>
|
|
<BCol offset="1" offset-md="0" offset-lg="0">
|
|
<div class="collapse-firstMath">{{ getLinesByType.firstMath }}</div>
|
|
<div class="collapse-secondMath">
|
|
{{ getLinesByType.secondMath }}
|
|
</div>
|
|
</BCol>
|
|
</BRow>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import { GdtEntryType } from '@/graphql/enums'
|
|
|
|
export default {
|
|
name: 'TransactionCollapse',
|
|
props: {
|
|
amount: { type: Number },
|
|
gdtEntryType: { type: String, default: GdtEntryType.FORM },
|
|
factor: { type: Number },
|
|
gdt: { type: Number },
|
|
},
|
|
computed: {
|
|
getLinesByType() {
|
|
switch (this.gdtEntryType) {
|
|
case GdtEntryType.FORM:
|
|
case GdtEntryType.CVS:
|
|
case GdtEntryType.ELOPAGE:
|
|
case GdtEntryType.DIGISTORE:
|
|
case GdtEntryType.CVS2: {
|
|
return {
|
|
headline: this.$t('gdt.calculation'),
|
|
first: this.$t('gdt.factor'),
|
|
firstMath: this.factor + ' GDT pro €',
|
|
second: this.$t('gdt.formula'),
|
|
secondMath:
|
|
this.$n(this.amount, 'decimal') +
|
|
' € * ' +
|
|
this.factor +
|
|
' GDT / € = ' +
|
|
this.$n(this.gdt, 'decimal') +
|
|
' GDT',
|
|
}
|
|
}
|
|
case GdtEntryType.ELOPAGE_PUBLISHER: {
|
|
return {
|
|
headline: this.$t('gdt.publisher'),
|
|
first: null,
|
|
firstMath: null,
|
|
second: null,
|
|
secondMath: null,
|
|
}
|
|
}
|
|
case GdtEntryType.GLOBAL_MODIFICATOR: {
|
|
return {
|
|
headline: this.$t('gdt.conversion-gdt-euro'),
|
|
first: this.$t('gdt.raise'),
|
|
firstMath: this.factor * 100 + ' % ',
|
|
second: this.$t('gdt.conversion'),
|
|
secondMath:
|
|
this.$n(this.amount, 'decimal') +
|
|
' GDT * ' +
|
|
this.factor * 100 +
|
|
' % = ' +
|
|
this.$n(this.gdt, 'decimal') +
|
|
' GDT',
|
|
}
|
|
}
|
|
default:
|
|
throw new Error('no additional transaction info for this type: ' + this.gdtEntryType)
|
|
}
|
|
},
|
|
},
|
|
}
|
|
</script>
|