diff --git a/src/front/src/components/vote/VoteCard.vue b/src/front/src/components/vote/VoteCard.vue
index efff4d34d..31056ec8c 100644
--- a/src/front/src/components/vote/VoteCard.vue
+++ b/src/front/src/components/vote/VoteCard.vue
@@ -1,7 +1,7 @@
{{ voteCard.name }}
-
+
mdi-pencil
@@ -35,7 +35,7 @@
Результаты
-
+
mdi-delete
@@ -75,6 +75,7 @@
import Timer from "@/components/UI/Timer.vue"
import {baseURL} from "@/utils/axios-api";
import {computed, ref} from 'vue'
+import {useAccountStore} from "@/store/AccountStore";
export default {
components: {Timer},
@@ -95,9 +96,12 @@ export default {
}
},
setup(props) {
+ console.log(props.voteCard.author, '^-^')
const timeChange = ref(false)
const youSure = ref(false)
const isFinished = ref(false);
+ const accountStore = useAccountStore();
+ const user = accountStore.user;
const images = computed(() => {
return props.voteCard.files.length > 0 ? props.voteCard.files : ['/media/defaultimg/vote.png']
@@ -111,7 +115,7 @@ export default {
isFinished.value = true;
}
- return {timeChange, baseURL, images, youSure, isFinished}
+ return {timeChange, baseURL, images, youSure, isFinished, user}
}
}
diff --git a/src/front/src/components/vote/VoteConstructor.vue b/src/front/src/components/vote/VoteConstructor.vue
index 416c31bac..bdc5f1378 100644
--- a/src/front/src/components/vote/VoteConstructor.vue
+++ b/src/front/src/components/vote/VoteConstructor.vue
@@ -251,14 +251,11 @@
import {computed, ref, watch} from "vue";
import {createVote, getEmployees} from "@/utils/axios-api";
import DateSelect from "@/components/UI/date-select.vue";
-import {useAccountStore} from "@/store/AccountStore";
export default {
components: {DateSelect},
emits: ['updating'],
setup(props, {emit}) {
- const accountStore = useAccountStore();
- const user = accountStore.user;
const step = ref(0);
const isVoteCreated = ref(false);
const form = ref({
diff --git a/src/front/src/views/VoteHomePage.vue b/src/front/src/views/VoteHomePage.vue
index 7fd347774..09de78a7b 100644
--- a/src/front/src/views/VoteHomePage.vue
+++ b/src/front/src/views/VoteHomePage.vue
@@ -53,20 +53,6 @@
@openVoteModal="(voting) => openModal('vote', voting)"
@openResultModal="(voting) => openModal('results', voting)"
/>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -119,12 +105,16 @@ import {useRoute, useRouter} from "vue-router";
import {deleteVote, getVoteDetail, getVotes} from "@/utils/axios-api";
import {formatDate} from "@vueuse/shared";
import VoteResult from "@/components/vote/VoteResult.vue";
+import {useAccountStore} from "@/store/AccountStore";
export default {
methods: {formatDate},
components: {VoteResult, CurrentVote, VoteConstructor, VoteCardVue},
setup() {
+ const accountStore = useAccountStore();
+ const user = accountStore.user;
+ console.log(user.is_superuser)
const testResults = [
{name: 'Дональд Трамп', votes: 99},
{name: 'Иван Иванов', votes: 30},
@@ -226,7 +216,6 @@ export default {
updating("active");
updating("completed");
- console.log(completedVotes);
return {
currentTab,