Commit 9187c2e4 authored by Janis Streib's avatar Janis Streib 🦉
Browse files

FIX: ta tab synxc

parent 36f56679
......@@ -197,6 +197,10 @@ async function init() {
window.localStorage.setItem('transaction_result', JSON.stringify(state.transaction_result))
}
},
setTransactionResult(state, result) {
state.transaction_result = result
window.localStorage.setItem('transaction_result', JSON.stringify(state.transaction_result))
},
showSidebar(state, show) {
state.show_sidebar = show
window.localStorage.setItem('show_sidebar', show)
......@@ -224,30 +228,24 @@ async function init() {
const api_list = APIUtil.buildAPITaFromTaObjectArray(state.ta_list)
try {
const res = await WAPITransactionSerice.execute(state.netdb_axios_config, api_list)
window.console.debug(res)
state.undo_redo_new_mutaion = true
state.undone = []
state.done = []
window.localStorage.removeItem('done')
window.localStorage.removeItem('undone')
window.localStorage.removeItem('undo_redo_new_mutation')
window.localStorage.removeItem('ta_list')
state.transaction_result = {
commit('setTransactionResult', {
type: 'success',
result: res.data,
ta_list: state.ta_list
}
state.ta_list = []
})
commit('emptyTransactionList')
commit('clearUndoRedoDone')
commit('clearUndoRedoUndone')
commit('setUndoRedoNewMutation', true)
} catch (e) {
window.console.debug(e.response)
state.transaction_result = {
commit('set_transaction_result', {
type: 'error',
error: e.response.data.exception,
uuid: state.ta_list[APIUtil.getAPIErrorIndexFromDBException(e.response.data.exception)].uuid
}
})
} finally {
commit('setTransactionBusy', false)
window.localStorage.setItem('transaction_result', JSON.stringify(state.transaction_result))
}
}
},
......@@ -255,7 +253,25 @@ async function init() {
sharedMutations(
{
predicate:
['pushUndoRedoUndone', 'popUndoRedoUndone', 'clearUndoRedoUndone', 'setUndoRedoNewMutation', 'clearUndoRedoDone', 'popUndoRedoDone', 'emptyState', 'login', 'logout', 'addTransactionElement', 'removeTransactionElement', 'emptyTransactionList', 'removeTransactionResult', 'setTransactionBusy', 'moveTaElements', 'replaceTransactionList']
[
'pushUndoRedoUndone',
'popUndoRedoUndone',
'clearUndoRedoUndone',
'setUndoRedoNewMutation',
'clearUndoRedoDone',
'popUndoRedoDone',
'emptyState',
'login',
'logout',
'addTransactionElement',
'removeTransactionElement',
'emptyTransactionList',
'removeTransactionResult',
'setTransactionBusy',
'moveTaElements',
'replaceTransactionList',
'setTransactionResult'
]
}
)
]
......
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