WIP Доделала модалку

This commit is contained in:
Daria Golova
2023-05-05 15:23:12 +03:00
parent 0345ddeee9
commit 05ce9f0125
7 changed files with 98 additions and 31 deletions

View File

@@ -293,7 +293,6 @@ const actions = {
commit("setBenefitData", res.results);
});
},
getMedicalCardData({ commit }) {
fetchWrapper
.get(
@@ -337,6 +336,11 @@ const actions = {
localStorage.removeItem("medicalId");
});
},
createProtocol({ commit, rootGetters, state }, data) {
data.employee = rootGetters.getUserData;
data.id = state.protocolsData.length + 1;
commit("setProtocolsData", data);
},
};
const mutations = {
@@ -366,6 +370,9 @@ const mutations = {
state.events = res.events;
});
},
setProtocolsData(state, data) {
state.protocolsData = [...state.protocolsData, data];
},
};
export default {