diff --git a/test/vuex/cpone-resultentry-so-others-v8-all/components/oneResultEntrySoList.vue b/test/vuex/cpone-resultentry-so-others-v8-all/components/oneResultEntrySoList.vue index a479cdf..a12b60f 100644 --- a/test/vuex/cpone-resultentry-so-others-v8-all/components/oneResultEntrySoList.vue +++ b/test/vuex/cpone-resultentry-so-others-v8-all/components/oneResultEntrySoList.vue @@ -458,20 +458,6 @@ module.exports = { this.$store.commit("sample/update_act", "new"); }, closeDialogSuccess() { - let arrtrx = this.$store.state.sample.transactions; - //var idx = _.findIndex(arrtrx, item => item.re_id === this.$store.state.sample.last_id) - // console.log(idx) - this.$store.dispatch("sample/search", { - startdate: this.xdatestart, - enddate: this.xdateend, - search: this.xnamelab, - companyid: this.selected_company.id, - switch_exclude: this.switch_exclude, - stationid: this.xselectedstation.id, - groupid: this.$store.state.sample.select_item_group.id, - subgroupid: this.$store.state.sample.select_item_subgroup.id, - lastid: this.$store.state.sample.last_id, - }); this.$store.commit("sample/update_dialog_success", false); }, closeDialogInfo() { diff --git a/test/vuex/cpone-resultentry-so-others-v8-all/modules/sample.js b/test/vuex/cpone-resultentry-so-others-v8-all/modules/sample.js index 0a0d04f..95af460 100644 --- a/test/vuex/cpone-resultentry-so-others-v8-all/modules/sample.js +++ b/test/vuex/cpone-resultentry-so-others-v8-all/modules/sample.js @@ -1357,6 +1357,16 @@ export default { context.commit("update_dialog_action", false) var msg = "Order " + prm.trx_numbering + " pemeriksaan " + prm.trx.test_name + " berhasil diupdate dong ..." context.commit("update_msg_success", msg) + if (resp.data && resp.data.updated_trx) { + let updated = resp.data.updated_trx + let transactions = [...context.state.transactions] + let idx = _.findIndex(transactions, t => t.re_id === updated.re_id) + if (idx !== -1) { + transactions[idx] = { ...transactions[idx], ...updated } + context.commit("update_transactions", transactions) + } + context.commit("update_cantedit", updated.status_name !== 'BARU') + } context.commit("update_dialog_success", true) if (context.state.search_lab_no !== '') { console.log(context.state.next_url)