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

FIX: tab synced last result

parent 9187c2e4
Pipeline #117233 passed with stages
in 4 minutes and 50 seconds
......@@ -198,6 +198,19 @@ import CopyField from './CopyField'
export default {
name: 'TransactionList',
components: {CopyField, Draggable, DBEditor},
computed: {
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])
}
})
}
return res
}
},
methods: {
function2variant: TransactionUtil.function2variant,
function2text: TransactionUtil.function2text,
......@@ -254,16 +267,10 @@ export default {
this.move(val.moved.oldIndex, val.moved.newIndex)
},
async executeTa() {
this.visible_results = []
this.visible_ta_res_index = 0
await this.$store.dispatch('executeTransaction')
if (this.$store.state.transaction_result.type !== 'error') {
this.$store.commit('reloadRouterComp')
this.$store.state.transaction_result.ta_list.forEach((item, index) => {
if (item.show_result) {
this.visible_results.push(this.$store.state.transaction_result.result[index])
}
})
if (this.visible_results.length > 0) {
this.$bvModal.show('ta_results')
}
......@@ -271,17 +278,9 @@ export default {
}
},
created() {
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) {
this.visible_results.push(this.$store.state.transaction_result.result[index])
}
})
}
},
data() {
return {
visible_results: [],
visible_ta_res_index: 0,
import_file: null,
import_valid: null,
......
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