From 5d2cfe98bb9bc47ae163f60fa1a5f1a84715f8c0 Mon Sep 17 00:00:00 2001 From: Denzel Date: Wed, 22 Jan 2025 11:33:40 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B7=D0=B0=D0=BA=D0=BE=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D1=87=D0=B5=D0=BD=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D0=BE?= =?UTF-8?q?=D0=BD=D0=B0=D0=BB=20=D0=B4=D0=BB=D1=8F=20=D1=80=D0=B5=D0=B4?= =?UTF-8?q?=D0=B0=D0=BA=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/front/src/components/vote/VoteCard.vue | 8 ++-- src/front/src/views/VoteHomePage.vue | 45 +++++++++++----------- 2 files changed, 27 insertions(+), 26 deletions(-) diff --git a/src/front/src/components/vote/VoteCard.vue b/src/front/src/components/vote/VoteCard.vue index 9d93c9a2f..b44da5956 100644 --- a/src/front/src/components/vote/VoteCard.vue +++ b/src/front/src/components/vote/VoteCard.vue @@ -11,10 +11,10 @@ {{ voteCard.name }} - - mdi-pencil - + + + + diff --git a/src/front/src/views/VoteHomePage.vue b/src/front/src/views/VoteHomePage.vue index 11fb2a05d..298eab38c 100644 --- a/src/front/src/views/VoteHomePage.vue +++ b/src/front/src/views/VoteHomePage.vue @@ -24,7 +24,6 @@ :isFinished="currentTab==='active'" :voteCard="voting" @deleteVoting="deleteVoting" - @openEditVoteModal="(voting) => openModal('edit', voting)" @openResultModal="(voting) => openModal('results', voting)" @openVoteModal="(voting) => openModal('vote', voting)" /> @@ -53,18 +52,18 @@ - - - Редактировать голосование: {{ selectedVoting?.title }} - - - - - Сохранить - Закрыть - - - + + + + + + + + + + + + @@ -115,7 +114,7 @@ export default { updating("active"); const voteModal = ref(false); - const editVoteModal = ref(false); + // const editVoteModal = ref(false); const resultsModal = ref(false); const selectedVoting = ref(null); @@ -145,7 +144,7 @@ export default { const closeModal = () => { voteModal.value = false; - editVoteModal.value = false; + // editVoteModal.value = false; resultsModal.value = false; selectedVoting.value = null; router.push({name: "VoteHomePage"}); @@ -157,10 +156,12 @@ export default { await loadVoteDetails(voting.id); voteModal.value = true; router.push({name: "Voting", params: {id: voting.id}}); - } else if (type === "edit") { - editVoteModal.value = true; - router.push({name: "EditVote", params: {id: voting.id}}); - } else if (type === "results") { + } + // else if (type === "edit") { + // editVoteModal.value = true; + // router.push({name: "EditVote", params: {id: voting.id}}); + // } + else if (type === "results") { await loadVoteResult(voting.id); resultsModal.value = true; router.push({name: "VoteResults", params: {id: voting.id}}); @@ -181,13 +182,13 @@ export default { watch( () => route, async () => { - if (!voteModal.value && !editVoteModal.value && !resultsModal.value) { + if (!voteModal.value && !resultsModal.value) { const voting = votes.value.find((v) => v.id === route.params.id); if (route.name === "Voting") { await loadVoteDetails(route.params.id); voteModal.value = true; } - if (route.name === "EditVote") editVoteModal.value = true; + // if (route.name === "EditVote") editVoteModal.value = true; if (route.name === "VoteResults") { await loadVoteResult(route.params.id) resultsModal.value = true; @@ -205,7 +206,7 @@ export default { votes, sortedVotes, voteModal, - editVoteModal, + // editVoteModal, resultsModal, selectedVoting, openModal,