fixes
This commit is contained in:
@@ -17,6 +17,8 @@ import {
|
||||
MEETING_NOTES_API,
|
||||
MEETING_PRESCREPTIONS_API,
|
||||
PATIENT_DELETE_API,
|
||||
PATIENT_LABKIT_LIST_API,
|
||||
PATIENT_LABKIT_STATUS_UPDATE_API,
|
||||
PATIENT_LIST_API,
|
||||
PATIENT_MEETING_LIST_API,
|
||||
PATIENT_UPDATE_API,
|
||||
@@ -28,7 +30,6 @@ import {
|
||||
} from './constants.js';
|
||||
|
||||
|
||||
|
||||
export default createStore({
|
||||
state: {
|
||||
isLoading: false,
|
||||
@@ -36,9 +37,11 @@ export default createStore({
|
||||
isSuccessMsg: false,
|
||||
patientList:[],
|
||||
patientMeetingList: [],
|
||||
patientLabKitList:[],
|
||||
providerMeetingList:[],
|
||||
providersList:[],
|
||||
labsList:[],
|
||||
patientLabKitStatus:'',
|
||||
singlePatientAppointment: null,
|
||||
patientPrescription:null,
|
||||
patientNotes: null,
|
||||
@@ -86,8 +89,11 @@ export default createStore({
|
||||
setPtientMeetingList(state, payload) {
|
||||
state.patientMeetingList = payload
|
||||
},
|
||||
setProviderMeetingList(state, payload) {
|
||||
state.providerMeetingList = payload
|
||||
setPtientMeetingList(state, payload) {
|
||||
state.patientMeetingList = payload
|
||||
},
|
||||
setPatientLabKitList(state, payload) {
|
||||
state.patientLabKitList = payload
|
||||
},
|
||||
setProvidersList(state, payload) {
|
||||
state.providersList = payload
|
||||
@@ -115,7 +121,12 @@ export default createStore({
|
||||
},
|
||||
setSiteSetting(state, payload) {
|
||||
state.siteSetting = payload
|
||||
},
|
||||
setPatientLabKitStatus(state, payload) {
|
||||
state.patientLabKitStatus = payload
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
actions: {
|
||||
|
||||
@@ -372,6 +383,39 @@ export default createStore({
|
||||
console.error('Error:', error);
|
||||
});
|
||||
},
|
||||
async patientLabKitList ({commit,state},payload){
|
||||
commit('setLoading', true)
|
||||
await axios.post(PATIENT_LABKIT_LIST_API+payload.patient_id ,{}, {
|
||||
headers: {
|
||||
'Authorization': `Bearer ${localStorage.getItem('admin_access_token')}`,
|
||||
}
|
||||
}) .then(response => {
|
||||
commit('setLoading', false)
|
||||
console.log('Response Labkit:', response.data);
|
||||
commit('setPatientLabKitList',response.data)
|
||||
})
|
||||
.catch(error => {
|
||||
commit('setLoading', false)
|
||||
console.error('Error:', error);
|
||||
});
|
||||
},
|
||||
async updateLabkitListStatus ({commit,state},payload){
|
||||
commit('setLoading', true)
|
||||
await axios.post(PATIENT_LABKIT_STATUS_UPDATE_API+payload.cart_id ,{
|
||||
status:payload.status
|
||||
}, {
|
||||
headers: {
|
||||
'Authorization': `Bearer ${localStorage.getItem('admin_access_token')}`,
|
||||
}
|
||||
}) .then(response => {
|
||||
commit('setLoading', false)
|
||||
commit('setPatientLabKitStatus',response.data);
|
||||
})
|
||||
.catch(error => {
|
||||
commit('setLoading', false)
|
||||
console.error('Error:', error);
|
||||
});
|
||||
},
|
||||
async getAppointmentByIdAgent ({commit,state},payload){
|
||||
commit('setLoading', true)
|
||||
await axios.post(APPOINTMENT_DETAILS_API+payload.patient_id + '/' + payload.appointment_id, {}, {
|
||||
@@ -380,7 +424,6 @@ export default createStore({
|
||||
}
|
||||
}) .then(response => {
|
||||
commit('setLoading', false)
|
||||
console.log('Response Notes:', response.data.data);
|
||||
commit('setSinglePatientAppointment',response.data.data)
|
||||
})
|
||||
.catch(error => {
|
||||
@@ -443,7 +486,6 @@ export default createStore({
|
||||
}
|
||||
}) .then(response => {
|
||||
commit('setLoading', false)
|
||||
console.log('Response Notes:', response.data.data);
|
||||
commit('setPatientNotes',response.data.data)
|
||||
})
|
||||
.catch(error => {
|
||||
@@ -739,7 +781,12 @@ export default createStore({
|
||||
getProviderMeetingList(state){
|
||||
return state.providerMeetingList
|
||||
},
|
||||
|
||||
getPatientLabKitList(state){
|
||||
return state.patientLabKitList
|
||||
},
|
||||
getPatientLabKitStatus(state){
|
||||
return state.patientLabKitStatus
|
||||
},
|
||||
getProvidersList(state){
|
||||
return state.providersList
|
||||
},
|
||||
@@ -770,5 +817,6 @@ export default createStore({
|
||||
getCheckLoginExpire(state){
|
||||
return state.checkLoginExpire
|
||||
},
|
||||
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user