fix
This commit is contained in:
@@ -3,6 +3,8 @@ import { createStore } from 'vuex';
|
||||
import {
|
||||
ADMIN_GET_SITE_SETTING,
|
||||
ADMIN_LOGIN_DETAIL,
|
||||
ADMIN_UPDATE_PASSWORD,
|
||||
ADMIN_UPDATE_SITE_SETTING,
|
||||
APPOINTMENT_DETAILS_API,
|
||||
LABS_DELETE_API,
|
||||
LABS_LIST_API,
|
||||
@@ -583,6 +585,53 @@ export default createStore({
|
||||
console.error('Error:', error);
|
||||
});
|
||||
},
|
||||
async siteSettingUpdate({ commit }, payload) {
|
||||
commit('setLoading', true)
|
||||
|
||||
await axios.post(ADMIN_UPDATE_SITE_SETTING+payload.id, {
|
||||
plan_main_title: payload.plan_main_title,
|
||||
plan_description: payload.plan_description,
|
||||
header_title: payload.header_title,
|
||||
footer_text: payload.footer_text,
|
||||
domain_name: payload.domain_name,
|
||||
logo:payload.logo,
|
||||
favicon:payload.favicon//imageBase64.value
|
||||
}, {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
'Authorization': `Bearer ${localStorage.getItem('admin_access_token')}`,
|
||||
}
|
||||
}) .then(response => {
|
||||
commit('setLoading', false)
|
||||
console.log('Response:', response.data);
|
||||
|
||||
})
|
||||
.catch(error => {
|
||||
commit('setLoading', false)
|
||||
console.error('Error:', error);
|
||||
});
|
||||
},
|
||||
async adminPasswordUpadate({ commit }, payload) {
|
||||
commit('setLoading', true)
|
||||
|
||||
await axios.post(ADMIN_UPDATE_PASSWORD, {
|
||||
password: payload.password,
|
||||
new_password : payload.new_password ,
|
||||
confirm_password : payload.confirm_password ,
|
||||
}, {
|
||||
headers: {
|
||||
'Authorization': `Bearer ${localStorage.getItem('admin_access_token')}`,
|
||||
}
|
||||
}) .then(response => {
|
||||
commit('setLoading', false)
|
||||
console.log('Response:', response.data);
|
||||
|
||||
})
|
||||
.catch(error => {
|
||||
commit('setLoading', false)
|
||||
console.error('Error:', error);
|
||||
});
|
||||
},
|
||||
},
|
||||
getters: {
|
||||
getIsLoading(state){
|
||||
|
Reference in New Issue
Block a user