This commit is contained in:
Denzel committed 2025-01-10 15:42:16 +03:00
1 parent ef08b2fa44
commit 7da9fa3d14
2 files changed
+28 -23

No files matched your search

+12 -12
View File
@@ -22,7 +22,7 @@
<v-text-field
:placeholder="form.startDate.toLocaleDateString()"
:value="form.startDate.toLocaleDateString()"
color="primary"
color="teal-darken-4"
label="Дата начала"
persistentPlaceholder
readonly
@@ -30,7 +30,7 @@
<v-menu activator="parent">
<v-date-picker
v-model="form.startDate"
color="primary"
color="teal-darken-4"
hideHeader
hideWeekdays
>
@@ -44,7 +44,7 @@
<v-text-field
:placeholder="form.endDate.toLocaleDateString()"
:value="form.endDate.toLocaleDateString()"
color="primary"
color="teal-darken-4"
label="Дата окончания"
persistentPlaceholder
readonly
@@ -52,7 +52,7 @@
<v-menu activator="parent">
<v-date-picker
v-model="form.endDate"
color="primary"
color="teal-darken-4"
hideHeader
hideWeekdays
>
@@ -64,7 +64,7 @@
</v-text-field>
</v-card-text>
<v-card-actions>
<v-btn color="primary" @click="step = 1">Далее</v-btn>
<v-btn color="teal-darken-4" @click="step = 1" size="medium">Далее</v-btn>
</v-card-actions>
</v-card>
</v-stepper-window-item>
@@ -96,11 +96,11 @@
<v-icon>mdi-delete</v-icon>
</v-btn>
</div>
<v-btn color="primary" @click="addQuestion">Добавить вопрос</v-btn>
<v-btn color="teal-darken-4" @click="addQuestion">Добавить вопрос</v-btn>
</v-card-text>
<v-card-actions>
<v-btn color="primary" @click="step -= 1">Назад</v-btn>
<v-btn color="primary" @click="step = 2">Далее</v-btn>
<v-btn color="teal-darken-4" size="medium" @click="step -= 1">Назад</v-btn>
<v-btn color="teal-darken-4" size="medium" @click="step = 2">Далее</v-btn>
</v-card-actions>
</v-card>
</v-stepper-window-item>
@@ -185,8 +185,8 @@
</div>
</v-card-text>
<v-card-actions>
<v-btn color="primary" @click="step -= 1">Назад</v-btn>
<v-btn color="primary" @click="step = 3">Далее</v-btn>
<v-btn color="teal-darken-4" size="medium" @click="step -= 1">Назад</v-btn>
<v-btn color="teal-darken-4" size="medium" @click="step = 3">Далее</v-btn>
</v-card-actions>
</v-card>
</v-stepper-window-item>
@@ -227,8 +227,8 @@
</ul>
</v-card-text>
<v-card-actions>
<v-btn color="primary" @click="step -= 1">Назад</v-btn>
<v-btn color="primary" @click="saveVoting">Сохранить</v-btn>
<v-btn color="teal-darken-4" size="medium" @click="step -= 1">Назад</v-btn>
<v-btn color="teal-darken-4" size="medium" @click="saveVoting">Сохранить</v-btn>
</v-card-actions>
</v-card>
</v-stepper-window-item>
+16 -11
View File
@@ -23,23 +23,28 @@
cols="12" lg="3" md="4"
>
<v-card :class="{ 'voted-card': voting.voted }">
<v-card-title>{{ voting.title }}</v-card-title>
<v-card-title class="d-flex justify-space-between">{{ voting.title }}
<v-btn flat size="medium">
<v-icon color="orange-lighten-1">mdi-pencil</v-icon>
</v-btn>
</v-card-title>
<v-card-subtitle>
Окончание: {{ formatDate(voting.endDate) }}
</v-card-subtitle>
<v-card-text>
Осталось: {{ timeRemaining(voting.endDate) }}
</v-card-text>
<v-card-actions>
<v-card-actions class="justify-space-between">
<v-btn
v-if="!voting.voted"
color="primary"
color="teal-darken-4"
size="medium"
@click="openVoteModal(voting)"
>
Проголосовать
</v-btn>
<v-btn v-else disabled>Уже проголосовали</v-btn>
<v-btn color="error" @click="deleteVoting(voting.id)">
<v-btn v-else color="teal-darken-4" disabled size="medium">Уже проголосовали</v-btn>
<v-btn color="error" @click="deleteVoting(voting.id)" size="medium">
<v-icon>mdi-delete</v-icon>
</v-btn>
</v-card-actions>
@@ -63,11 +68,11 @@
<v-card-subtitle>
Завершено: {{ formatDate(voting.endDate) }}
</v-card-subtitle>
<v-card-actions>
<v-btn color="primary" @click="openResultsModal(voting)">
<v-card-actions class="justify-space-between">
<v-btn color="teal-darken-4" size="medium" @click="openResultsModal(voting)">
Результаты
</v-btn>
<v-btn color="error" @click="deleteVoting(voting.id)">
<v-btn color="error" size="medium" @click="deleteVoting(voting.id)">
<v-icon>mdi-delete</v-icon>
</v-btn>
</v-card-actions>
@@ -79,7 +84,7 @@
<!-- Конструктор -->
<v-tabs-window-item value="constructor">
<VoteConstructor />
<VoteConstructor/>
</v-tabs-window-item>
</v-tabs-window>
@@ -113,11 +118,11 @@
</template>
<script>
import { computed, ref } from "vue";
import {computed, ref} from "vue";
import VoteConstructor from "@/views/VoteConstructor.vue";
export default {
components: { VoteConstructor },
components: {VoteConstructor},
setup() {
const currentTab = ref("current");
const votes = ref([