generated from VLADIMIR/template_frontend
format
This commit is contained in:
@@ -1,37 +1,35 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { ref } from 'vue'
|
||||
|
||||
import { getAuthClient } from '@/api/auth_client';
|
||||
import { getAuthClient } from '@/api/auth_client'
|
||||
import HeaderMenu from '@/components/HeaderMenu.vue'
|
||||
import { useAuthStore } from '@/stores/auth';
|
||||
import { useAuthStore } from '@/stores/auth'
|
||||
|
||||
const authStore = useAuthStore();
|
||||
const client = getAuthClient();
|
||||
const authStore = useAuthStore()
|
||||
const client = getAuthClient()
|
||||
|
||||
const permissions = ref<string[]>([])
|
||||
|
||||
async function getPermissions() {
|
||||
permissions.value = []
|
||||
const res = await client.GetPermissions({})
|
||||
permissions.value = res.permissions!
|
||||
permissions.value = []
|
||||
const res = await client.GetPermissions({})
|
||||
permissions.value = res.permissions!
|
||||
}
|
||||
|
||||
getPermissions()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<HeaderMenu :add-logout="true" active="office" />
|
||||
<HeaderMenu :add-logout="true" active="office" />
|
||||
|
||||
<div class="center-block-custom content-block">
|
||||
<p>
|
||||
Доброго времени суток, {{ authStore.username }}.
|
||||
</p>
|
||||
<p>
|
||||
{{ authStore.userRoles }}
|
||||
</p>
|
||||
<div class="center-block-custom content-block">
|
||||
<p>Доброго времени суток, {{ authStore.username }}.</p>
|
||||
<p>
|
||||
{{ authStore.userRoles }}
|
||||
</p>
|
||||
|
||||
{{ permissions }}
|
||||
</div>
|
||||
{{ permissions }}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
|
||||
Reference in New Issue
Block a user