mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-14 00:51:06 +03:30
fix problems
This commit is contained in:
-1
@@ -10,7 +10,6 @@ const $hasRole = function(roles) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
|||||||
@@ -1,23 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-container fluid>
|
<v-container fluid>
|
||||||
|
|
||||||
<material-card class=""
|
<material-card class="" v-if="$hasRole('Admin')" color="black" title="Admin" text="">
|
||||||
v-if="$hasRole('Admin')"
|
|
||||||
color="black"
|
|
||||||
title="Admin"
|
|
||||||
text="">
|
|
||||||
<v-layout row wrap>
|
<v-layout row wrap>
|
||||||
<template v-for="(AdminCard, Key ) in AdminCards">
|
<template v-for="(AdminCard, Key ) in AdminCards">
|
||||||
<v-flex v-if="!AdminCard.role || $hasRole(AdminCard.role)" :class="[AdminCard.column, 'pa-2']" :key="Key">
|
<v-flex v-if="!AdminCard.role || $hasRole(AdminCard.role)" :class="[AdminCard.column, 'pa-2']" :key="Key">
|
||||||
<router-link :to="AdminCard.route">
|
<router-link :to="AdminCard.route">
|
||||||
<material-cards
|
<material-cards :title="AdminCard.title" :icon="AdminCard.icon" :color="AdminCard.color"
|
||||||
:title="AdminCard.title"
|
:text="AdminCard.text" :aligntext="AdminCard.aligntext" :alignimg="AdminCard.alignimg" />
|
||||||
:icon="AdminCard.icon"
|
|
||||||
:color="AdminCard.color"
|
|
||||||
:text="AdminCard.text"
|
|
||||||
:aligntext="AdminCard.aligntext"
|
|
||||||
:alignimg="AdminCard.alignimg"
|
|
||||||
/>
|
|
||||||
</router-link>
|
</router-link>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
</template>
|
</template>
|
||||||
@@ -26,24 +16,14 @@
|
|||||||
</material-card>
|
</material-card>
|
||||||
|
|
||||||
|
|
||||||
<material-card
|
<material-card v-if="$hasRole('Supervisor|Admin')" color="black" title="Supervisor" text="">
|
||||||
v-if="$hasRole('Supervisor|Admin')"
|
|
||||||
color="black"
|
|
||||||
title="Supervisor"
|
|
||||||
text=""
|
|
||||||
>
|
|
||||||
<v-layout row wrap>
|
<v-layout row wrap>
|
||||||
<template v-for="(SupervisorCard, Key ) in SupervisorCards">
|
<template v-for="(SupervisorCard, Key ) in SupervisorCards">
|
||||||
<v-flex v-if="!SupervisorCard.role || $hasRole(SupervisorCard.role)" :class="[SupervisorCard.column , 'pa-2']" :key="Key">
|
<v-flex v-if="!SupervisorCard.role || $hasRole(SupervisorCard.role)" :class="[SupervisorCard.column, 'pa-2']"
|
||||||
|
:key="Key">
|
||||||
<router-link :to="SupervisorCard.route">
|
<router-link :to="SupervisorCard.route">
|
||||||
<material-cards
|
<material-cards :title="SupervisorCard.title" :icon="SupervisorCard.icon" :color="SupervisorCard.color"
|
||||||
:title="SupervisorCard.title"
|
:text="SupervisorCard.text" :aligntext="SupervisorCard.aligntext" :alignimg="SupervisorCard.alignimg" />
|
||||||
:icon="SupervisorCard.icon"
|
|
||||||
:color="SupervisorCard.color"
|
|
||||||
:text="SupervisorCard.text"
|
|
||||||
:aligntext="SupervisorCard.aligntext"
|
|
||||||
:alignimg="SupervisorCard.alignimg"
|
|
||||||
/>
|
|
||||||
</router-link>
|
</router-link>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
</template>
|
</template>
|
||||||
@@ -51,23 +31,13 @@
|
|||||||
</v-layout>
|
</v-layout>
|
||||||
</material-card>
|
</material-card>
|
||||||
|
|
||||||
<material-card
|
<material-card color="black" title="User" text="">
|
||||||
color="black"
|
|
||||||
title="User"
|
|
||||||
text=""
|
|
||||||
>
|
|
||||||
<v-layout row wrap>
|
<v-layout row wrap>
|
||||||
<template v-for="(UsersCard, Key ) in UsersCards">
|
<template v-for="(UsersCard, Key ) in UsersCards">
|
||||||
<v-flex v-if="!UsersCard.role || $hasRole(UsersCard.role)" :class="[UsersCard.column, 'pa-2']" :key="Key">
|
<v-flex v-if="!UsersCard.role || $hasRole(UsersCard.role)" :class="[UsersCard.column, 'pa-2']" :key="Key">
|
||||||
<router-link :to="UsersCard.route">
|
<router-link :to="UsersCard.route">
|
||||||
<material-cards
|
<material-cards :title="UsersCard.title" :icon="UsersCard.icon" :color="UsersCard.color"
|
||||||
:title="UsersCard.title"
|
:text="UsersCard.text" :aligntext="UsersCard.aligntext" :alignimg="UsersCard.alignimg" />
|
||||||
:icon="UsersCard.icon"
|
|
||||||
:color="UsersCard.color"
|
|
||||||
:text="UsersCard.text"
|
|
||||||
:aligntext="UsersCard.aligntext"
|
|
||||||
:alignimg="UsersCard.alignimg"
|
|
||||||
/>
|
|
||||||
</router-link>
|
</router-link>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
</template>
|
</template>
|
||||||
@@ -79,6 +49,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { UserService } from '@/services';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -97,9 +68,10 @@ export default {
|
|||||||
{ title: 'Add a Test Result', text: 'You can add the test result', icon: '/img/Static/Dashboard/addtest.png', color: 'WM-YellowGradient-BG', route: { name: 'SubmitTestResult' }, aligntext: 'text-md-center', alignimg: 'text-md-left', column: 'xs12 md12 sm12' },
|
{ title: 'Add a Test Result', text: 'You can add the test result', icon: '/img/Static/Dashboard/addtest.png', color: 'WM-YellowGradient-BG', route: { name: 'SubmitTestResult' }, aligntext: 'text-md-center', alignimg: 'text-md-left', column: 'xs12 md12 sm12' },
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
async created() {
|
||||||
|
console.log(await UserService.getInfo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss"></style>
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|||||||
Reference in New Issue
Block a user