WIP Набросала отображение данных

This commit is contained in:
Daria Golova
2023-05-15 18:44:43 +03:00
parent c480b016e3
commit 7d399645d7
4 changed files with 85 additions and 15 deletions

View File

@@ -59,7 +59,7 @@ const state = () => ({
avatar: "",
benefitData: [],
events: [],
protocolsData: [
protocolsList: [
{
id: 1,
employee: {
@@ -126,6 +126,11 @@ const state = () => ({
status: "filled",
},
],
protocolData: {
bite: "distal bite",
hygieneIndex: 2,
KPUIndex: 3,
},
});
const getters = {
@@ -338,8 +343,8 @@ const actions = {
},
createProtocol({ commit, rootGetters, state }, data) {
data.employee = rootGetters.getUserData;
data.id = state.protocolsData.length + 1;
commit("setProtocolsData", data);
data.id = state.protocolsList.length + 1;
commit("setProtocolsList", data);
},
};
@@ -370,8 +375,8 @@ const mutations = {
state.events = res.events;
});
},
setProtocolsData(state, data) {
state.protocolsData = [...state.protocolsData, data];
setProtocolsList(state, data) {
state.protocolsList = [...state.protocolsList, data];
},
};