fix
This commit is contained in:
parent
680b2b1164
commit
c7fa12f28b
@ -28,6 +28,18 @@ const configStore = useConfigStore()
|
|||||||
>
|
>
|
||||||
<VProgressCircular indeterminate />
|
<VProgressCircular indeterminate />
|
||||||
</VOverlay>
|
</VOverlay>
|
||||||
|
<VSnackbar v-model="store.getters.getSuccessMsg" :timeout="5000" location="top end" variant="flat"
|
||||||
|
color="success">
|
||||||
|
<VIcon
|
||||||
|
class="ri-success-line success-icon"
|
||||||
|
/> {{ store.getters.getShowMsg }}
|
||||||
|
</VSnackbar>
|
||||||
|
<VSnackbar v-model="store.getters.getErrorMsg" :timeout="5000" location="top end" variant="flat"
|
||||||
|
color="error">
|
||||||
|
<VIcon
|
||||||
|
class="ri-success-line success-icon"
|
||||||
|
/> {{ store.getters.getShowMsg }}
|
||||||
|
</VSnackbar>
|
||||||
<VLocaleProvider :rtl="configStore.isAppRTL">
|
<VLocaleProvider :rtl="configStore.isAppRTL">
|
||||||
<!-- ℹ️ This is required to set the background color of active nav link based on currently active global theme's primary -->
|
<!-- ℹ️ This is required to set the background color of active nav link based on currently active global theme's primary -->
|
||||||
<VApp :style="`--v-global-theme-primary: ${hexToRgb(global.current.value.colors.primary)}`">
|
<VApp :style="`--v-global-theme-primary: ${hexToRgb(global.current.value.colors.primary)}`">
|
||||||
|
@ -32,6 +32,8 @@ import {
|
|||||||
export default createStore({
|
export default createStore({
|
||||||
state: {
|
state: {
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
isErrorMsg: false,
|
||||||
|
isSuccessMsg: false,
|
||||||
patientList:[],
|
patientList:[],
|
||||||
patientMeetingList: [],
|
patientMeetingList: [],
|
||||||
providerMeetingList:[],
|
providerMeetingList:[],
|
||||||
@ -43,13 +45,26 @@ export default createStore({
|
|||||||
medicineList: [],
|
medicineList: [],
|
||||||
questioneriesList: [],
|
questioneriesList: [],
|
||||||
adminDetail: null,
|
adminDetail: null,
|
||||||
siteSetting:null
|
siteSetting: null,
|
||||||
|
showMessage:null
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
setLoading(state, payload) {
|
setLoading(state, payload) {
|
||||||
console.log('payload');
|
console.log('payload');
|
||||||
state.isLoading = payload
|
state.isLoading = payload
|
||||||
},
|
},
|
||||||
|
setErrorMsg(state, payload) {
|
||||||
|
console.log('payload');
|
||||||
|
state.isErrorMsg = payload
|
||||||
|
},
|
||||||
|
setSuccessMsg(state, payload) {
|
||||||
|
console.log('payload');
|
||||||
|
state.isSuccessMsg = payload
|
||||||
|
},
|
||||||
|
setShowMsg(state, payload) {
|
||||||
|
console.log('payload');
|
||||||
|
state.showMessage = payload
|
||||||
|
},
|
||||||
setPtientList(state, payload) {
|
setPtientList(state, payload) {
|
||||||
state.patientList = payload
|
state.patientList = payload
|
||||||
},
|
},
|
||||||
@ -605,7 +620,7 @@ export default createStore({
|
|||||||
}) .then(response => {
|
}) .then(response => {
|
||||||
commit('setLoading', false)
|
commit('setLoading', false)
|
||||||
console.log('Response:', response.data);
|
console.log('Response:', response.data);
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
commit('setLoading', false)
|
commit('setLoading', false)
|
||||||
@ -626,7 +641,12 @@ export default createStore({
|
|||||||
}) .then(response => {
|
}) .then(response => {
|
||||||
commit('setLoading', false)
|
commit('setLoading', false)
|
||||||
console.log('Response:', response.data);
|
console.log('Response:', response.data);
|
||||||
|
if (response.data.status == 'error') {
|
||||||
|
commit('setErrorMsg', true)
|
||||||
|
console.log('Response:', response.data.msg);
|
||||||
|
commit('setShowMsg', response.data.msg)
|
||||||
|
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
commit('setLoading', false)
|
commit('setLoading', false)
|
||||||
@ -659,6 +679,18 @@ export default createStore({
|
|||||||
getters: {
|
getters: {
|
||||||
getIsLoading(state){
|
getIsLoading(state){
|
||||||
return state.isLoading
|
return state.isLoading
|
||||||
|
},
|
||||||
|
getErrorMsg(state) {
|
||||||
|
console.log('payload');
|
||||||
|
return state.isErrorMsg
|
||||||
|
},
|
||||||
|
getSuccessMsg(state) {
|
||||||
|
console.log('payload');
|
||||||
|
return state.isSuccessMsg
|
||||||
|
},
|
||||||
|
getShowMsg(state) {
|
||||||
|
console.log('payload');
|
||||||
|
return state.showMessage
|
||||||
},
|
},
|
||||||
getPatientList(state){
|
getPatientList(state){
|
||||||
return state.patientList
|
return state.patientList
|
||||||
|
Loading…
Reference in New Issue
Block a user