Commit e33875ad authored by Janis Streib's avatar Janis Streib 🦉
Browse files

ADD: custom transaction result renderer

parent f3639625
Pipeline #117237 passed with stages
in 4 minutes and 44 seconds
......@@ -176,8 +176,14 @@
<b-form-file :state="import_valid" accept="application/json" v-model="import_file"></b-form-file>
</b-modal>
<b-modal ok-only id="ta_results" title="Transaktionsergebnis" size="lg">
<pre>
{{ visible_results[visible_ta_res_index] }}
<template v-if="current_result_ta_object_type == 'wapi_auth'">
<CopyField class="shadow" :text="visible_results[visible_ta_res_index].item[0].token"/>
<b-alert show variant="warning" class="mb-0 mt-3">Bewahren Sie das Token gut auf. Hier werden Sie es nicht
mehr einsehen können!
</b-alert>
</template>
<pre v-else>
{{ visible_results[visible_ta_res_index].item }}
</pre>
<b-button-group class="d-flex" align="center">
<b-button @click="visible_ta_res_index--" :disabled="visible_ta_res_index === 0">Vorherige</b-button>
......@@ -200,12 +206,18 @@ export default {
name: 'TransactionList',
components: {CopyField, Draggable, DBEditor},
computed: {
current_result_ta_entry() {
return this.$store.state.transaction_result.ta_list[this.visible_results[this.visible_ta_res_index].index]
},
current_result_ta_object_type() {
return this.current_result_ta_entry.object_functions[this.current_result_ta_entry.object_function].object_type
},
visible_results() {
const res = []
if (this.$store.state.transaction_result && 'ta_list' in this.$store.state.transaction_result) {
this.$store.state.transaction_result.ta_list.forEach((item, index) => {
if (item.show_result) {
res.push(this.$store.state.transaction_result.result[index])
res.push({index: index, item: this.$store.state.transaction_result.result[index]})
}
})
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment