This commit is contained in:
nasir@endelospay.com
2024-06-08 03:54:45 +05:00
parent 872735dac3
commit 908fdd43e5
14 changed files with 1588 additions and 20 deletions

View File

@@ -7,6 +7,7 @@ import {
ADMIN_LAB_KIT_LIST_API,
ADMIN_LAB_KIT_UPDATE_API,
ADMIN_LOGIN_DETAIL,
ADMIN_PATIENT_DETAIL_API,
ADMIN_UPDATE_PASSWORD,
ADMIN_UPDATE_SITE_SETTING,
APPOINTMENT_DETAILS_API,
@@ -56,7 +57,8 @@ export default createStore({
showMessage: null,
timeout: null,
checkLoginExpire: false,
labKitList:[]
labKitList: [],
patientDetail:null
},
mutations: {
setLoading(state, payload) {
@@ -87,6 +89,10 @@ export default createStore({
console.log('payload');
state.showMessage = payload
},
setPatientDetail(state, payload) {
console.log('payload');
state.patientDetail = payload
},
setPtientList(state, payload) {
state.patientList = payload
@@ -874,6 +880,24 @@ export default createStore({
console.error('Error:', error);
});
},
async patientDetial({ commit }, payload) {
commit('setLoading', true)
await axios.post(ADMIN_PATIENT_DETAIL_API+payload.id, {}, {
headers: {
'Authorization': `Bearer ${localStorage.getItem('admin_access_token')}`,
}
}) .then(response => {
commit('setLoading', false)
console.log('Response:', response.data);
commit('setPatientDetail',response.data)
})
.catch(error => {
commit('setLoading', false)
console.error('Error:', error);
});
},
},
getters: {
getIsLoading(state){
@@ -938,5 +962,8 @@ export default createStore({
getLabKitList(state) {
return state.labKitList
},
getPatientDetail(state) {
return state.patientDetail
},
}
})