This commit is contained in:
nasir@endelospay.com
2024-06-06 04:00:35 +05:00
parent 0f9c7cec8e
commit 0d229f62f1
5 changed files with 418 additions and 285 deletions

View File

@@ -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){