[WIP] Добавил возможность просмотра фото

This commit is contained in:
DwCay
2023-06-27 19:22:10 +03:00
parent 3bfbaadbca
commit ac2f17d5aa
7 changed files with 156 additions and 34 deletions

View File

@@ -130,6 +130,7 @@ const state = () => ({
protocolData: null,
healthState: [
{
id: 1,
year: 2023,
pictures: [],
comments: [
@@ -145,6 +146,7 @@ const state = () => ({
],
},
{
id: 2,
year: 2022,
pictures: [],
comments: [
@@ -160,6 +162,7 @@ const state = () => ({
],
},
{
id: 3,
year: 2021,
pictures: [],
comments: [
@@ -439,6 +442,9 @@ const getters = {
};
const actions = {
deleteItemData({ commit }, props) {
commit("setDataWithouDeleted", props);
},
getBenefitData({ commit }) {
fetchWrapper.get("general/benefit/").then((res) => {
commit("setBenefitData", res.results);
@@ -505,6 +511,11 @@ const actions = {
};
const mutations = {
setDataWithouDeleted(state, props) {
state[props.stateKey] = state[props.stateKey].filter(
(item) => item.id !== props.itemId
);
},
setBenefitData(state, data) {
state.benefitData = data;
},