P-96 Роль администратора
This commit is contained in:
1 parent
150a6f817b
commit
902e223333
1 file changed
+4
-4
@@ -6,7 +6,7 @@
|
|||||||
<v-tabs v-model="currentTab">
|
<v-tabs v-model="currentTab">
|
||||||
<v-tab value="current">Текущие голосования</v-tab>
|
<v-tab value="current">Текущие голосования</v-tab>
|
||||||
<v-tab value="completed">Завершенные голосования</v-tab>
|
<v-tab value="completed">Завершенные голосования</v-tab>
|
||||||
<v-tab value="constructor">Создать новое голосование</v-tab>
|
<v-tab value="constructor" v-if="user.is_superuser || user.is_staff">Создать новое голосование</v-tab>
|
||||||
</v-tabs>
|
</v-tabs>
|
||||||
</template>
|
</template>
|
||||||
</v-toolbar>
|
</v-toolbar>
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
</v-tabs-window-item>
|
</v-tabs-window-item>
|
||||||
|
|
||||||
<!-- Конструктор -->
|
<!-- Конструктор -->
|
||||||
<v-tabs-window-item value="constructor">
|
<v-tabs-window-item value="constructor" v-if="user.is_superuser || user.is_staff">
|
||||||
<VoteConstructor @updating="updating"/>
|
<VoteConstructor @updating="updating"/>
|
||||||
</v-tabs-window-item>
|
</v-tabs-window-item>
|
||||||
</v-tabs-window>
|
</v-tabs-window>
|
||||||
@@ -114,7 +114,6 @@ export default {
|
|||||||
setup() {
|
setup() {
|
||||||
const accountStore = useAccountStore();
|
const accountStore = useAccountStore();
|
||||||
const user = accountStore.user;
|
const user = accountStore.user;
|
||||||
console.log(user.is_superuser)
|
|
||||||
const testResults = [
|
const testResults = [
|
||||||
{name: 'Дональд Трамп', votes: 99},
|
{name: 'Дональд Трамп', votes: 99},
|
||||||
{name: 'Иван Иванов', votes: 30},
|
{name: 'Иван Иванов', votes: 30},
|
||||||
@@ -231,7 +230,8 @@ export default {
|
|||||||
deleteVoting,
|
deleteVoting,
|
||||||
updating,
|
updating,
|
||||||
res,
|
res,
|
||||||
testResults
|
testResults,
|
||||||
|
user
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user