fix
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import axios from 'axios';
|
||||
import { createStore } from 'vuex';
|
||||
import {
|
||||
ADMIN_LOGIN_DETAIL,
|
||||
APPOINTMENT_DETAILS_API,
|
||||
LABS_DELETE_API,
|
||||
LABS_LIST_API,
|
||||
@@ -36,7 +37,8 @@ export default createStore({
|
||||
patientPrescription:null,
|
||||
patientNotes: null,
|
||||
medicineList: [],
|
||||
questioneriesList: []
|
||||
questioneriesList: [],
|
||||
adminDetail:null
|
||||
},
|
||||
mutations: {
|
||||
setLoading(state, payload) {
|
||||
@@ -72,7 +74,11 @@ export default createStore({
|
||||
},
|
||||
setQuestionersList(state, payload) {
|
||||
state.questioneriesList = payload
|
||||
},
|
||||
setAdminDetail(state, payload) {
|
||||
state.adminDetail = payload
|
||||
}
|
||||
|
||||
},
|
||||
actions: {
|
||||
|
||||
@@ -536,7 +542,25 @@ export default createStore({
|
||||
commit('setLoading', false)
|
||||
console.error('Error:', error);
|
||||
});
|
||||
},
|
||||
},
|
||||
async adminDetial({ commit }, payload) {
|
||||
commit('setLoading', true)
|
||||
|
||||
await axios.post(ADMIN_LOGIN_DETAIL, {}, {
|
||||
headers: {
|
||||
'Authorization': `Bearer ${localStorage.getItem('admin_access_token')}`,
|
||||
}
|
||||
}) .then(response => {
|
||||
commit('setLoading', false)
|
||||
console.log('Response:', response.data);
|
||||
commit('setAdminDetail',response.data.medicines)
|
||||
|
||||
})
|
||||
.catch(error => {
|
||||
commit('setLoading', false)
|
||||
console.error('Error:', error);
|
||||
});
|
||||
},
|
||||
},
|
||||
getters: {
|
||||
getIsLoading(state){
|
||||
@@ -573,5 +597,8 @@ export default createStore({
|
||||
getQuestioneriesList(state){
|
||||
return state.questioneriesList
|
||||
},
|
||||
getAdminDetail(state){
|
||||
return state.adminDetail
|
||||
},
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user