mirror of
https://git.meshkee.com/cssd/cssd-front.git
synced 2026-10-13 11:23:18 +03:30
fix : drawer list
This commit is contained in:
@@ -80,11 +80,17 @@ export default {
|
|||||||
icon: 'description',
|
icon: 'description',
|
||||||
text: 'All Test Result'
|
text: 'All Test Result'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
to: { name: 'ManageMedicalCenter' },
|
||||||
|
icon: 'far fa-building',
|
||||||
|
text: 'Manage Medical Center',
|
||||||
|
role: 'Admin',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
to: { name: 'ManageUsers' },
|
to: { name: 'ManageUsers' },
|
||||||
icon: 'far fa-address-book',
|
icon: 'far fa-address-book',
|
||||||
text: 'Manage Users',
|
text: 'Manage Users',
|
||||||
role: 'Admin|Supervisor',
|
role: 'Admin',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
to: { name: 'ListTestType' },
|
to: { name: 'ListTestType' },
|
||||||
|
|||||||
@@ -1,22 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-toolbar
|
<v-toolbar id="core-toolbar" flat prominent style="background: #eee;">
|
||||||
id="core-toolbar"
|
|
||||||
|
|
||||||
flat
|
|
||||||
prominent
|
|
||||||
style="background: #eee;"
|
|
||||||
>
|
|
||||||
<div class="v-toolbar-title">
|
<div class="v-toolbar-title">
|
||||||
<v-toolbar-title
|
<v-toolbar-title class="tertiary--text font-weight-light">
|
||||||
class="tertiary--text font-weight-light"
|
<v-btn v-if="responsive" class="default v-btn--simple" dark icon @click.stop="onClickBtn">
|
||||||
>
|
|
||||||
<v-btn
|
|
||||||
v-if="responsive"
|
|
||||||
class="default v-btn--simple"
|
|
||||||
dark
|
|
||||||
icon
|
|
||||||
@click.stop="onClickBtn"
|
|
||||||
>
|
|
||||||
<v-icon>mdi-view-list</v-icon>
|
<v-icon>mdi-view-list</v-icon>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
{{ title }}
|
{{ title }}
|
||||||
@@ -25,11 +11,7 @@
|
|||||||
|
|
||||||
<v-spacer/>
|
<v-spacer/>
|
||||||
<v-toolbar-items>
|
<v-toolbar-items>
|
||||||
<v-flex
|
<v-flex align-center layout py-2>
|
||||||
align-center
|
|
||||||
layout
|
|
||||||
py-2
|
|
||||||
>
|
|
||||||
<!-- <v-text-field
|
<!-- <v-text-field
|
||||||
v-if="responsiveInput"
|
v-if="responsiveInput"
|
||||||
class="mr-4 mt-2 purple-input"
|
class="mr-4 mt-2 purple-input"
|
||||||
@@ -37,21 +19,9 @@
|
|||||||
hide-details
|
hide-details
|
||||||
color="purple"
|
color="purple"
|
||||||
/> -->
|
/> -->
|
||||||
<v-menu
|
<v-menu :close-on-content-click="false" :nudge-width="200" offset-x>
|
||||||
:close-on-content-click="false"
|
|
||||||
:nudge-width="200"
|
|
||||||
offset-x
|
|
||||||
>
|
|
||||||
<template v-slot:activator="{ on }">
|
<template v-slot:activator="{ on }">
|
||||||
|
<v-icon v-ripple class="toolbar-items" v-on="on" color="tertiary">mdi-account</v-icon>
|
||||||
<v-icon
|
|
||||||
v-ripple
|
|
||||||
class="toolbar-items"
|
|
||||||
v-on="on"
|
|
||||||
color="tertiary">
|
|
||||||
mdi-account
|
|
||||||
</v-icon>
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<v-card>
|
<v-card>
|
||||||
@@ -68,23 +38,16 @@
|
|||||||
</v-list-tile>
|
</v-list-tile>
|
||||||
</v-list>
|
</v-list>
|
||||||
|
|
||||||
<v-divider></v-divider>
|
<v-divider/>
|
||||||
|
|
||||||
<v-list>
|
<v-list>
|
||||||
<router-link
|
<router-link class="toolbar-items" :to="{name: 'MyInfo'}">
|
||||||
class="toolbar-items"
|
|
||||||
:to="{name: 'MyInfo'}"
|
|
||||||
>
|
|
||||||
<v-list-tile>
|
<v-list-tile>
|
||||||
<v-list-tile-title class="black--text">My Info</v-list-tile-title>
|
<v-list-tile-title class="black--text">My Info</v-list-tile-title>
|
||||||
</v-list-tile>
|
</v-list-tile>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|
||||||
|
<router-link class="toolbar-items" :to="{name: 'Tickets'}">
|
||||||
<router-link
|
|
||||||
class="toolbar-items"
|
|
||||||
:to="{name: 'Tickets'}"
|
|
||||||
>
|
|
||||||
<v-list-tile>
|
<v-list-tile>
|
||||||
<v-list-tile-title class="black--text">My Ticket</v-list-tile-title>
|
<v-list-tile-title class="black--text">My Ticket</v-list-tile-title>
|
||||||
</v-list-tile>
|
</v-list-tile>
|
||||||
@@ -93,22 +56,12 @@
|
|||||||
</v-card>
|
</v-card>
|
||||||
</v-menu>
|
</v-menu>
|
||||||
|
|
||||||
<v-menu
|
<v-menu bottom left content-class="dropdown-menu" offset-y transition="slide-y-transition">
|
||||||
bottom
|
|
||||||
left
|
|
||||||
content-class="dropdown-menu"
|
|
||||||
offset-y
|
|
||||||
transition="slide-y-transition">
|
|
||||||
<v-card>
|
<v-card>
|
||||||
<v-list dense>
|
<v-list dense>
|
||||||
<v-list-tile
|
<v-list-tile v-for="notification in notifications" :key="notification"
|
||||||
v-for="notification in notifications"
|
@click="onClick">
|
||||||
:key="notification"
|
<v-list-tile-title v-text="notification"/>
|
||||||
@click="onClick"
|
|
||||||
>
|
|
||||||
<v-list-tile-title
|
|
||||||
v-text="notification"
|
|
||||||
/>
|
|
||||||
</v-list-tile>
|
</v-list-tile>
|
||||||
</v-list>
|
</v-list>
|
||||||
</v-card>
|
</v-card>
|
||||||
@@ -190,6 +143,7 @@ export default {
|
|||||||
#core-toolbar a {
|
#core-toolbar a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Pointer {
|
.Pointer {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,7 +99,6 @@ const ApiService = {
|
|||||||
export default ApiService
|
export default ApiService
|
||||||
export { ApiService }
|
export { ApiService }
|
||||||
|
|
||||||
/*
|
|
||||||
axios.interceptors.request.use(request => {
|
axios.interceptors.request.use(request => {
|
||||||
console.log("🔵 API Request:", request.method.toUpperCase(), request.url);
|
console.log("🔵 API Request:", request.method.toUpperCase(), request.url);
|
||||||
console.log("🔹 Headers:", request.headers);
|
console.log("🔹 Headers:", request.headers);
|
||||||
@@ -118,4 +117,4 @@ axios.interceptors.response.use(response => {
|
|||||||
}, error => {
|
}, error => {
|
||||||
console.error("🔴 API Error:", error.response ? error.response.data : error);
|
console.error("🔴 API Error:", error.response ? error.response.data : error);
|
||||||
return Promise.reject(error);
|
return Promise.reject(error);
|
||||||
});*/
|
});
|
||||||
+105
-19
@@ -4,10 +4,12 @@
|
|||||||
<material-card class="" v-if="$hasRole('Admin')" color="black" title="Admin" text="">
|
<material-card class="" 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 :title="AdminCard.title" :icon="AdminCard.icon" :color="AdminCard.color"
|
<material-cards :title="AdminCard.title" :icon="AdminCard.icon" :color="AdminCard.color"
|
||||||
:text="AdminCard.text" :aligntext="AdminCard.aligntext" :alignimg="AdminCard.alignimg" />
|
:text="AdminCard.text" :aligntext="AdminCard.aligntext"
|
||||||
|
:alignimg="AdminCard.alignimg"/>
|
||||||
</router-link>
|
</router-link>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
</template>
|
</template>
|
||||||
@@ -15,15 +17,17 @@
|
|||||||
</v-layout>
|
</v-layout>
|
||||||
</material-card>
|
</material-card>
|
||||||
|
|
||||||
|
<material-card v-if="$hasRole('Supervisor')" color="black" title="Supervisor" text="">
|
||||||
<material-card v-if="$hasRole('Admin|Supervisor')" 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']"
|
<v-flex v-if="!SupervisorCard.role || $hasRole(SupervisorCard.role)"
|
||||||
|
:class="[SupervisorCard.column, 'pa-2']"
|
||||||
:key="Key">
|
:key="Key">
|
||||||
<router-link :to="SupervisorCard.route">
|
<router-link :to="SupervisorCard.route">
|
||||||
<material-cards :title="SupervisorCard.title" :icon="SupervisorCard.icon" :color="SupervisorCard.color"
|
<material-cards :title="SupervisorCard.title" :icon="SupervisorCard.icon"
|
||||||
:text="SupervisorCard.text" :aligntext="SupervisorCard.aligntext" :alignimg="SupervisorCard.alignimg" />
|
:color="SupervisorCard.color"
|
||||||
|
:text="SupervisorCard.text" :aligntext="SupervisorCard.aligntext"
|
||||||
|
:alignimg="SupervisorCard.alignimg"/>
|
||||||
</router-link>
|
</router-link>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
</template>
|
</template>
|
||||||
@@ -31,13 +35,15 @@
|
|||||||
</v-layout>
|
</v-layout>
|
||||||
</material-card>
|
</material-card>
|
||||||
|
|
||||||
<material-card color="black" title="User" text="">
|
<material-card v-if="$hasRole('User')" 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 :title="UsersCard.title" :icon="UsersCard.icon" :color="UsersCard.color"
|
<material-cards :title="UsersCard.title" :icon="UsersCard.icon" :color="UsersCard.color"
|
||||||
:text="UsersCard.text" :aligntext="UsersCard.aligntext" :alignimg="UsersCard.alignimg" />
|
:text="UsersCard.text" :aligntext="UsersCard.aligntext"
|
||||||
|
:alignimg="UsersCard.alignimg"/>
|
||||||
</router-link>
|
</router-link>
|
||||||
</v-flex>
|
</v-flex>
|
||||||
</template>
|
</template>
|
||||||
@@ -49,23 +55,103 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { UserService } from '@/services';
|
// import { UserService } from '@/services';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
AdminCards: [
|
AdminCards: [
|
||||||
{ title: 'Manage Users', text: 'You can Manage the users information', icon: '/img/Static/Dashboard/manageusers.png', color: 'WM-LightGreenGradient-BG', route: { name: 'ManageUsers' }, aligntext: 'text-md-left', alignimg: 'text-md-left', column: 'xs12 md12 sm12', role: 'Admin|Supervisor' },
|
{
|
||||||
{ title: 'Manage Medical Center', text: 'You can edit the medical center information', icon: '/img/Static/Dashboard/settings.png', color: 'WM-MuskGradient-BG', route: { name: 'ManageMedicalCenter' }, aligntext: 'text-md-left', alignimg: 'text-md-right', column: 'xs12 md7 sm7', role: 'Admin' },
|
title: 'Manage Users',
|
||||||
{ title: 'List Test Type', text: 'You can simply add your test type', icon: '/img/Static/Dashboard/result.png', color: 'WM-GreyGradient-BG', route: { name: 'ListTestType' }, aligntext: 'text-md-left', alignimg: 'text-md-ce', column: 'xs12 md5 sm5', role: 'Admin' }
|
text: 'You can Manage the users information',
|
||||||
|
icon: '/img/Static/Dashboard/manageusers.png',
|
||||||
|
color: 'WM-LightGreenGradient-BG',
|
||||||
|
route: {name: 'ManageUsers'},
|
||||||
|
aligntext: 'text-md-left',
|
||||||
|
alignimg: 'text-md-left',
|
||||||
|
column: 'xs12 md12 sm12',
|
||||||
|
role: 'Admin|Supervisor'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Manage Medical Center',
|
||||||
|
text: 'You can edit the medical center information',
|
||||||
|
icon: '/img/Static/Dashboard/settings.png',
|
||||||
|
color: 'WM-MuskGradient-BG',
|
||||||
|
route: {name: 'ManageMedicalCenter'},
|
||||||
|
aligntext: 'text-md-left',
|
||||||
|
alignimg: 'text-md-right',
|
||||||
|
column: 'xs12 md7 sm7',
|
||||||
|
role: 'Admin'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'List Test Type',
|
||||||
|
text: 'You can simply add your test type',
|
||||||
|
icon: '/img/Static/Dashboard/result.png',
|
||||||
|
color: 'WM-GreyGradient-BG',
|
||||||
|
route: {name: 'ListTestType'},
|
||||||
|
aligntext: 'text-md-left',
|
||||||
|
alignimg: 'text-md-ce',
|
||||||
|
column: 'xs12 md5 sm5',
|
||||||
|
role: 'Admin'
|
||||||
|
}
|
||||||
],
|
],
|
||||||
SupervisorCards: [
|
SupervisorCards: [
|
||||||
{ title: 'Manage Users', text: 'You can Manage the users information', icon: '/img/Static/Dashboard/manageusers.png', color: 'WM-LightGreenGradient-BG', route: { name: 'ManageUsers' }, aligntext: 'text-md-left', alignimg: 'text-md-left', column: 'xs12 md12 sm12', role: 'Admin|Supervisor' },
|
{
|
||||||
{ title: 'Test to Verify', text: 'You can simply verify your own medical center test result in this section of website', icon: '/img/Static/Dashboard/verify.png', color: 'WM-PinkGradient-BG', route: { name: 'NotVerifyTestResult' }, aligntext: 'text-md-left', alignimg: 'text-md-left', column: 'xs12 md12 sm12', role: 'Admin|Supervisor' },
|
title: 'Manage Users',
|
||||||
|
text: 'You can Manage the users information',
|
||||||
|
icon: '/img/Static/Dashboard/manageusers.png',
|
||||||
|
color: 'WM-LightGreenGradient-BG',
|
||||||
|
route: {name: 'ManageUsers'},
|
||||||
|
aligntext: 'text-md-left',
|
||||||
|
alignimg: 'text-md-left',
|
||||||
|
column: 'xs12 md12 sm12',
|
||||||
|
role: 'Supervisor'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Test to Verify',
|
||||||
|
text: 'You can simply verify your own medical center test result in this section of website',
|
||||||
|
icon: '/img/Static/Dashboard/verify.png',
|
||||||
|
color: 'WM-PinkGradient-BG',
|
||||||
|
route: {name: 'NotVerifyTestResult'},
|
||||||
|
aligntext: 'text-md-left',
|
||||||
|
alignimg: 'text-md-left',
|
||||||
|
column: 'xs12 md12 sm12',
|
||||||
|
role: 'Supervisor'
|
||||||
|
},
|
||||||
],
|
],
|
||||||
UsersCards: [
|
UsersCards: [
|
||||||
{ title: 'My Info', text: 'You can easily edit your registration information', icon: '/img/Static/Dashboard/info.png', color: 'WM-OrangeGradient-BG', route: { name: 'MyInfo' }, aligntext: 'text-md-left', alignimg: 'text-md-right', column: 'xs12 md6 sm6' },
|
{
|
||||||
{ title: 'All Test Result', text: 'You can see all user tests and own tests', icon: '/img/Static/Dashboard/alltest.png', color: 'WM-GreenGradient-BG', route: { name: 'AllResultTest' }, aligntext: 'text-md-left', alignimg: 'text-md-right', column: 'xs12 md6 sm6' },
|
title: 'My Info',
|
||||||
{ 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-left', alignimg: 'text-md-left', column: 'xs12 md12 sm12' },
|
text: 'You can easily edit your registration information',
|
||||||
|
icon: '/img/Static/Dashboard/info.png',
|
||||||
|
color: 'WM-OrangeGradient-BG',
|
||||||
|
route: {name: 'MyInfo'},
|
||||||
|
aligntext: 'text-md-left',
|
||||||
|
alignimg: 'text-md-right',
|
||||||
|
column: 'xs12 md6 sm6',
|
||||||
|
role: 'User'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'All Test Result',
|
||||||
|
text: 'You can see all user tests and own tests',
|
||||||
|
icon: '/img/Static/Dashboard/alltest.png',
|
||||||
|
color: 'WM-GreenGradient-BG',
|
||||||
|
route: {name: 'AllResultTest'},
|
||||||
|
aligntext: 'text-md-left',
|
||||||
|
alignimg: 'text-md-right',
|
||||||
|
column: 'xs12 md6 sm6',
|
||||||
|
role: 'User'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
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-left',
|
||||||
|
alignimg: 'text-md-left',
|
||||||
|
column: 'xs12 md12 sm12',
|
||||||
|
role: 'User'
|
||||||
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user