Flatten nested repos
This commit is contained in:
77
test/vuex/cpone-sample-lab/modules/comment.js
Normal file
77
test/vuex/cpone-sample-lab/modules/comment.js
Normal file
@@ -0,0 +1,77 @@
|
||||
import * as api from "../api/comment.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
show: false,
|
||||
loading: false,
|
||||
patient: {},
|
||||
history: [],
|
||||
comment: '',
|
||||
error: ''
|
||||
},
|
||||
mutations: {
|
||||
update_show(state, val) {
|
||||
state.show= val
|
||||
},
|
||||
update_loading(state, val) {
|
||||
state.loading= val
|
||||
},
|
||||
update_patient(state, val) {
|
||||
state.patient= val
|
||||
},
|
||||
update_comment(state, val) {
|
||||
state.comment= val
|
||||
},
|
||||
update_history(state, val) {
|
||||
state.history= val
|
||||
},
|
||||
update_error(state, val) {
|
||||
state.error= val
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
async load(context) {
|
||||
context.commit("update_loading", true)
|
||||
try {
|
||||
let prm = {
|
||||
T_OrderHeaderID: context.state.patient.T_OrderHeaderID,
|
||||
token: one_token()
|
||||
}
|
||||
let resp = await api.load(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_loading", false)
|
||||
context.commit("update_error", resp.message)
|
||||
} else {
|
||||
context.commit("update_loading", false)
|
||||
context.commit("update_error", "")
|
||||
context.commit("update_history", resp.data.data)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_loading", false)
|
||||
context.commit("update_error", e.message)
|
||||
}
|
||||
},
|
||||
async save(context) {
|
||||
context.commit("update_loading", true)
|
||||
try {
|
||||
let prm = {
|
||||
T_OrderHeaderID: context.state.patient.T_OrderHeaderID,
|
||||
T_OrderHeaderSamplingNote : context.state.patient.T_OrderHeaderSamplingNote,
|
||||
token: one_token()
|
||||
}
|
||||
let resp = await api.save(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_loading", false)
|
||||
context.commit("update_error", resp.message)
|
||||
} else {
|
||||
context.commit("update_loading", false)
|
||||
context.commit("update_error", "")
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_loading", false)
|
||||
context.commit("update_error", e.message)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
45
test/vuex/cpone-sample-lab/modules/order_info.js
Normal file
45
test/vuex/cpone-sample-lab/modules/order_info.js
Normal file
@@ -0,0 +1,45 @@
|
||||
import * as api from "../api/order_info.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
show:false,
|
||||
loading: false,
|
||||
error_message: '',
|
||||
orders: []
|
||||
},
|
||||
mutations: {
|
||||
update_loading(state, val) {
|
||||
state.loading = val
|
||||
},
|
||||
update_show(state, val) {
|
||||
state.show= val
|
||||
},
|
||||
update_error_message(state, val) {
|
||||
state.error_message= val
|
||||
},
|
||||
update_orders(state,val) {
|
||||
state.orders = val
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
async search(context, prm) {
|
||||
context.commit("update_loading", true)
|
||||
try {
|
||||
prm.token = one_token()
|
||||
context.commit("update_loading",true)
|
||||
context.commit("update_show",true)
|
||||
let resp = await api.search(prm)
|
||||
if (resp.status != "OK") {
|
||||
context.commit("update_error_message", resp.message)
|
||||
} else {
|
||||
context.commit("update_error_message", "")
|
||||
context.commit("update_orders", resp.data)
|
||||
context.commit("update_loading",false)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_error_message", e.message)
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
58
test/vuex/cpone-sample-lab/modules/req.js
Normal file
58
test/vuex/cpone-sample-lab/modules/req.js
Normal file
@@ -0,0 +1,58 @@
|
||||
import * as api from "../api/req.js"
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
show: false,
|
||||
loading: false,
|
||||
patient: {},
|
||||
requirements: '',
|
||||
note: {},
|
||||
error: ''
|
||||
},
|
||||
mutations: {
|
||||
update_show(state, val) {
|
||||
state.show= val
|
||||
},
|
||||
update_note(state, val) {
|
||||
state.note= val
|
||||
},
|
||||
update_loading(state, val) {
|
||||
state.loading= val
|
||||
},
|
||||
update_patient(state, val) {
|
||||
state.patient= val
|
||||
},
|
||||
update_requirements(state, val) {
|
||||
state.requirements= val
|
||||
},
|
||||
update_error(state, val) {
|
||||
state.error= val
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
async load(context) {
|
||||
context.commit("update_loading", true)
|
||||
context.commit("update_note", {})
|
||||
try {
|
||||
let prm = {
|
||||
T_OrderHeaderID: context.state.patient.T_OrderHeaderID,
|
||||
token: one_token()
|
||||
}
|
||||
let resp = await api.req(prm)
|
||||
if (resp.data.status != "OK") {
|
||||
context.commit("update_loading", false)
|
||||
context.commit("update_error", resp.message)
|
||||
} else {
|
||||
context.commit("update_loading", false)
|
||||
context.commit("update_error", "")
|
||||
context.commit("update_requirements", resp.data.data)
|
||||
context.commit("update_note", resp.data.note)
|
||||
}
|
||||
} catch (e) {
|
||||
context.commit("update_loading", false)
|
||||
context.commit("update_error", e.message)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
1146
test/vuex/cpone-sample-lab/modules/samplecall.js
Normal file
1146
test/vuex/cpone-sample-lab/modules/samplecall.js
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user