This commit is contained in:
Shokouhi
2019-07-02 12:37:41 +04:30
parent 579cab4e33
commit 1ab25bf79d
4 changed files with 135 additions and 26 deletions
@@ -8,7 +8,7 @@
class="mx-2 my-3"
v-for="item in items"
:key="item.id"
>
<div class="Chat White" v-if="item.sender_user_id == user_id">
<span>{{ item.text }}</span>
@@ -59,18 +59,23 @@ export default {
<style lang="scss" scoped>
.Chat {
padding: 10px 15px;
margin: 1% 0;
color: white;
border-radius: 10px;
width: fit-content;
display: block;
box-shadow: 5px 15px 20px rgba(0, 0, 0, 0.2);
}
.Chat.Cyan {
background: cornflowerblue;
box-shadow: 5px 15px 20px rgba(0, 0, 0, 0.2);
text-align: right;
float: right;
clear: right;
}
.Chat.White {
background: #fff;
color: black;
box-shadow: 5px 15px 20px rgba(0, 0, 0, 0.2);
float: left;
clear: left;
}
</style>
+71 -15
View File
@@ -1,21 +1,22 @@
<template>
<v-container fluid>
<material-card class=""
color="black"
title="Material Dashboard Heading"
title="Admin"
text=""
>
<v-layout row wrap >
<template v-for="(Card, Key ) in Cards">
<v-flex v-if="!Card.role || $hasRole(Card.role)" :class="[Card.column , 'pa-2']" :key="Key">
<router-link :to="Card.route">
<template v-for="(AdminCard, Key ) in AdminCards">
<v-flex v-if="!AdminCard.role || $hasRole(AdminCard.role)" :class="[AdminCard.column , 'pa-2']" :key="Key">
<router-link :to="AdminCard.route">
<material-cards
:title="Card.title"
:icon="Card.icon"
:color="Card.color"
:text="Card.text"
:aligntext="Card.aligntext"
:alignimg="Card.alignimg"
:title="AdminCard.title"
:icon="AdminCard.icon"
:color="AdminCard.color"
:text="AdminCard.text"
:aligntext="AdminCard.aligntext"
:alignimg="AdminCard.alignimg"
/>
</router-link>
</v-flex>
@@ -23,6 +24,56 @@
</v-layout>
</material-card>
<material-card class=""
color="black"
title="Supervisor"
text=""
>
<v-layout row wrap >
<template v-for="(SupervisorCard, Key ) in SupervisorCards">
<v-flex v-if="!SupervisorCard.role || $hasRole(SupervisorCard.role)" :class="[SupervisorCard.column , 'pa-2']" :key="Key">
<router-link :to="SupervisorCard.route">
<material-cards
:title="SupervisorCard.title"
:icon="SupervisorCard.icon"
:color="SupervisorCard.color"
:text="SupervisorCard.text"
:aligntext="SupervisorCard.aligntext"
:alignimg="SupervisorCard.alignimg"
/>
</router-link>
</v-flex>
</template>
</v-layout>
</material-card>
<material-card class=""
color="black"
title="User"
text=""
>
<v-layout row wrap >
<template v-for="(UsersCard, Key ) in UsersCards">
<v-flex v-if="!UsersCard.role || $hasRole(UsersCard.role)" :class="[UsersCard.column , 'pa-2']" :key="Key">
<router-link :to="UsersCard.route">
<material-cards
:title="UsersCard.title"
:icon="UsersCard.icon"
:color="UsersCard.color"
:text="UsersCard.text"
:aligntext="UsersCard.aligntext"
:alignimg="UsersCard.alignimg"
/>
</router-link>
</v-flex>
</template>
</v-layout>
</material-card>
</v-container>
</template>
@@ -30,15 +81,20 @@
export default {
data() {
return {
Cards :[
{title:'My Info', text:'You can easily edit your registration information',icon:'/img/Static/Dashboard/darkmug.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/pad.png',color:'WM-GreenGradient-BG',route:{name: 'AllResultTest'},aligntext:'text-md-left',alignimg:'text-md-right',column:'xs12 md6 sm6'},
AdminCards :[
{title:'Manage Users', text:'You can edit the medical center information',icon:'/img/Static/Dashboard/ipad.png',color:'WM-YellowPinkGradient-BG',route:{name: 'ManageUsers'},aligntext:'text-md-center',alignimg:'text-md-left',column:'xs12 md12 sm12', role: 'Admin|Supervisor'},
{title:'Manage Medical Center', text:'Managing users very fast by ...',icon:'/img/Static/Dashboard/Macbook.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 own test type',icon:'/img/Static/Dashboard/Book-and-Pen.png',color:'WM-GreyGradient-BG',route:{name: 'ListTestType'},aligntext:'text-md-left',alignimg:'text-md-right',column:'xs12 md5 sm5', role: 'Admin'},
{title:'List Test Type', text:'You can simply add your own test type',icon:'/img/Static/Dashboard/Book-and-Pen.png',color:'WM-GreyGradient-BG',route:{name: 'ListTestType'},aligntext:'text-md-left',alignimg:'text-md-right',column:'xs12 md5 sm5', role: 'Admin'}
],
SupervisorCards :[
{title:'Manage Users', text:'You can edit the medical center information',icon:'/img/Static/Dashboard/ipad.png',color:'WM-YellowPinkGradient-BG',route:{name: 'ManageUsers'},aligntext:'text-md-center',alignimg:'text-md-left',column:'xs12 md12 sm12', role: 'Admin|Supervisor'},
{title:'Test to Verify', text:'You can simply add your own test type in this section of website',icon:'/img/Static/Dashboard/notepad-colorful.png',color:'WM-PinkGradient-BG',route:{name: 'NotVerifyTestResult'},aligntext:'text-md-center',alignimg:'text-md-left',column:'xs12 md12 sm12', role: 'Admin|Supervisor'},
],
UsersCards :[
{title:'My Info', text:'You can easily edit your registration information',icon:'/img/Static/Dashboard/darkmug.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/pad.png',color:'WM-GreenGradient-BG',route:{name: 'AllResultTest'},aligntext:'text-md-left',alignimg:'text-md-right',column:'xs12 md6 sm6'},
{title:'Add a Test Result', text:'You can edit the medical center information',icon:'/img/Static/Dashboard/ipad.png',color:'WM-YellowPinkGradient-BG',route:{name: 'SubmitTestResult'},aligntext:'text-md-center',alignimg:'text-md-left',column:'xs12 md12 sm12'},
]
],
}
}
}
+50 -2
View File
@@ -28,8 +28,23 @@
</template>
<template slot="items" slot-scope="{ item }">
<td class="headline font-weight-light WM-NoLetterSpacing">{{ item.name }}</td>
<td class="title font-weight-light">{{ item.messages_count }}</td>
<td class="title font-weight-light">{{ item.unread_messages_count }}</td>
<td class="title font-weight-light">
<span class="Chip">
<span class="Count Content">
3 count
</span>
<!-- {{ item.messages_count }} -->
</span>
</td>
<td class="title font-weight-light">
<span class="Chip">
<span class="Unread Content">
3 unread
<!-- {{ item.unread_messages_count }} -->
</span>
</span>
<!-- {{ item.unread_messages_count }} -->
</td>
<td class="text-xs-right">
<v-btn color="pink" @click="showmessages(item.id)" class="WM-ActionButton">
<v-icon class="white--text mr-2 caption">fas fa-chevron-right</v-icon>
@@ -124,4 +139,37 @@ export default {
.WM-ActionButton {
padding: 8px 22px;
}
.Chip {
align-items: center;
border-radius: 28px;
display: inline-flex;
font-size: 13px;
margin: 4px;
outline: none;
position: relative;
transition: 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);
vertical-align: middle;
height:24px;
color:#000;
}
.Chip .Content {
align-items: center;
border-radius: 24px;
cursor: default;
display: inline-flex;
height: 32px;
justify-content: space-between;
padding: 0 12px;
vertical-align: middle;
white-space: nowrap;
z-index: 1;
}
.Chip .Content.Count {
background-color: #b2dfdb;
}
.Chip .Content.Unread {
background-color: #ffcdd2;
}
</style>