Update VoteHomePage.vue

This commit is contained in:
Nukeap committed 2025-01-20 08:23:23 +03:00
1 parent 051b1d6521
commit 2d57632a4d
1 file changed
+11 -61
+11 -61
View File
@@ -2,71 +2,21 @@
<v-container fluid class="pt-2 d-flex flex-column">
<v-row class="flex-column">
<v-col cols="auto">
<v-tabs v-model="currentTab">
<v-tab v-for="x in tabs" :key="x.value" :value="x.value">{{ x.text }}</v-tab>
<v-tabs
grow
v-model="currentTab">
<v-tab
v-for="x in tabs" :key="x.value" :value="x.value">{{ x.text }}</v-tab>
</v-tabs>
</v-col>
<v-col class="overflow-auto">
<v-tabs-window v-model="currentTab">
<v-col class="overflow-auto ">
<v-window v-model="currentTab" class="bg-red v-row flex-column" >
<!-- Текущие голосования -->
<v-tabs-window-item value="current">
<v-container>
<v-row>
<v-col
v-for="voting in sortedCurrentVotes"
:key="voting.id"
cols="12"
lg="4"
md="4"
>
<VoteCardVue
:voteCard="voting"
@openVoteModal="(voting) => openModal('vote', voting)"
@openEditVoteModal="(voting) => openModal('edit', voting)"
@deleteVoting="deleteVoting"
/>
</v-col>
</v-row>
</v-container>
</v-tabs-window-item>
<!-- Завершенные голосования -->
<v-tabs-window-item value="completed">
<v-container>
<v-row>
<v-col
v-for="voting in sortedCompletedVotes"
:key="voting.id"
cols="12"
lg="3"
md="4"
:class="{ 'voted-card': voting.voted }"
>
<v-card>
<v-card-title>{{ voting.title }}</v-card-title>
<v-card-subtitle>
Завершено: {{ formatDate(voting.endDate) }}
</v-card-subtitle>
<v-card-actions class="justify-space-between">
<v-btn color="teal-darken-4" size="medium" @click="(voting) => openModal('results', voting)">
Результаты
</v-btn>
<v-btn color="error" size="medium" @click="deleteVoting(voting.id)">
<v-icon>mdi-delete</v-icon>
</v-btn>
</v-card-actions>
</v-card>
</v-col>
</v-row>
</v-container>
</v-tabs-window-item>
<!-- Конструктор -->
<v-tabs-window-item value="constructor">
<VoteConstructor @updating="updating" />
</v-tabs-window-item>
</v-tabs-window>
<v-col>ews</v-col>s
</v-window>
<!-- Модальные окна -->
<v-dialog v-model="voteModal" @click:outside="closeModal">