fix
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
ADMIN_LAB_KIT_UPDATE_API,
|
||||
ADMIN_LOGIN_DETAIL,
|
||||
ADMIN_PATIENT_DETAIL_API,
|
||||
ADMIN_PROVIDER_DETAIL_API,
|
||||
ADMIN_UPDATE_PASSWORD,
|
||||
ADMIN_UPDATE_SITE_SETTING,
|
||||
APPOINTMENT_DETAILS_API,
|
||||
@@ -63,7 +64,8 @@ export default createStore({
|
||||
timeout: null,
|
||||
checkLoginExpire: false,
|
||||
labKitList: [],
|
||||
patientDetail:null
|
||||
patientDetail: null,
|
||||
providerDetail:null
|
||||
},
|
||||
mutations: {
|
||||
setLoading(state, payload) {
|
||||
@@ -102,6 +104,15 @@ export default createStore({
|
||||
console.log('payload');
|
||||
state.patientDetail = payload
|
||||
},
|
||||
setProviderDetail(state, payload) {
|
||||
console.log('payload');
|
||||
state.providerDetail = payload
|
||||
},
|
||||
setProviderMeetingList(state, payload) {
|
||||
console.log('payload');
|
||||
state.providerMeetingList = payload
|
||||
},
|
||||
|
||||
setPtientList(state, payload) {
|
||||
state.patientList = payload
|
||||
},
|
||||
@@ -984,6 +995,24 @@ export default createStore({
|
||||
console.error('Error:', error);
|
||||
});
|
||||
},
|
||||
async providerDetial({ commit }, payload) {
|
||||
commit('setLoading', true)
|
||||
|
||||
await axios.post(ADMIN_PROVIDER_DETAIL_API+payload.id, {}, {
|
||||
headers: {
|
||||
'Authorization': `Bearer ${localStorage.getItem('admin_access_token')}`,
|
||||
}
|
||||
}) .then(response => {
|
||||
commit('setLoading', false)
|
||||
console.log('Response:', response.data);
|
||||
commit('setProviderDetail',response.data)
|
||||
|
||||
})
|
||||
.catch(error => {
|
||||
commit('setLoading', false)
|
||||
console.error('Error:', error);
|
||||
});
|
||||
},
|
||||
},
|
||||
getters: {
|
||||
getIsLoading(state){
|
||||
@@ -1058,5 +1087,8 @@ export default createStore({
|
||||
getPatientDetail(state) {
|
||||
return state.patientDetail
|
||||
},
|
||||
getProviderDetail(state) {
|
||||
return state.providerDetail
|
||||
},
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user