You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
willaengine/resources/js/Global/components/Drawer/SideBar.vue

300 lines
8.3 KiB

<template>
5 years ago
<v-layout wrap>
<v-container class="Header">
<v-icon class="Menu" @click.stop="drawer = !drawer" dark>WMi-menu</v-icon>
5 years ago
<a :href="mainHref">
<v-icon class="Home" dark>WMi-Real-Estate</v-icon>
5 years ago
</a>
5 years ago
<div class="Name caption"> {{ getAuthUser.name }} </div>
5 years ago
<div class="Time">
4 years ago
<div class="En Bold">{{ getCurrentTime }}</div>
<div class="Fa Thin">{{ new Date() | moment("dddd jDD jMMMM jYYYY") }}</div>
5 years ago
</div>
<!-- <div class="Notification" dark>
<wm-notifications></wm-notifications>
5 years ago
</div>-->
</v-container>
<v-navigation-drawer v-model="drawer" app temporary right width="420">
5 years ago
<v-list class="pa-1">
5 years ago
<div class="row user-info">
<v-flex lg9 class="pa-3">
<img class="Avatar" :src="$_getPath()+'images/Global/Misc/Avatar.png'" />
<div class="Title">
<div class="Name Fa">{{ getAuthUser.name }}</div>
<div class="Role Fa">مدیریت</div>
</div>
</v-flex>
<v-flex lg3>
<a class="LogOut">
<v-tooltip bottom color="black" transition="slide-x-transition">
<template v-slot:activator="{ on }">
<v-btn class="mt-4" small @click.native.stop="logout" slot="activator" outlined fab color="black" dark v-on="on">
<v-icon dark>WMi-off-1</v-icon>
5 years ago
</v-btn>
</template>
<span>خروج از حساب کاربری</span>
</v-tooltip>
</a>
</v-flex>
</div>
5 years ago
</v-list>
5 years ago
<v-list class="pt-0" dense>
5 years ago
<v-divider class="Divider"/>
5 years ago
<a :href="item.href" v-for="(item, key) in Items" :key="key">
<template v-if="(!item.permissionClass || $_can(item.permissionClass, false, item.module)) && (!item.moduleName || getModules.find(x => x.slug === item.moduleName))">
5 years ago
<wm-list-tile :TitleFa="item.titleFa" :TitleEn="item.titleEn" :icon="item.icon" :tileClass="item.tileClass"/>
5 years ago
</template>
</a>
</v-list>
<div class="footer">
<div class="flex-justified-space-between links">
<div class="flex-justified-right texts">
<a href="https://www.willaarts.ir/ContactUs" class="WM-Link"> تماس با ما </a>
<a href="https://www.willaarts.ir/AboutUs" class="WM-Link"> درباره ی ما </a>
<a href="https://www.willaarts.ir/FAQ" class="WM-Link"> سوالات متداول </a>
</div>
<div class="social-media flex-justified-left">
<a href="https://www.aparat.com/WillaArts" class="WM-Link"> <v-icon>WMi-aparat</v-icon> </a>
<a href="https://www.instagram.com/willaarts.ir/" class="WM-Link"> <v-icon>WMi-instagram-2</v-icon> </a>
<a href="https://www.linkedin.com/in/willaartsgroup/" class="WM-Link"> <v-icon>WMi-linkedin-1</v-icon> </a>
</div>
</div>
<a href="https://www.willaarts.ir/ContactUs" class="WM-Link">
<div class="flex-justified-center water-mark">
<v-icon class="text--32">WMi-willa-engine</v-icon>
<div class="text-right">
<div class="Fa"> قدرت گرفته از سیستم ویـــــلااِنجین </div>
<div class="En"> Powered By WillaEngine IMS </div>
</div>
</div>
</a>
</div>
5 years ago
</v-navigation-drawer>
</v-layout>
</template>
<script>
5 years ago
import Tile from "@Global/components/Drawer/Tile";
import Notifications from "@Global/components/Drawer/Notifications";
5 years ago
import Routes from "@Global/utils/common/routes";
5 years ago
import { mapActions, mapGetters } from "vuex";
export default {
data() {
return {
fav: true,
menu: true,
message: false,
hints: true,
drawer: false,
Items: [
{ titleEn: 'My Profile', titleFa: ' حساب کاربری من ', icon: 'user', permissionClass: null, href: '/user/dashboard' },
5 years ago
{
titleEn: " My Users ",
titleFa: " کاربران مجموعه ی من ",
5 years ago
icon: "users",
5 years ago
permissionClass: "User::index",
5 years ago
module: "core",
href: '/user/home',
5 years ago
tileClass: 'red-theme',
},
{
titleEn: " Product Management ",
titleFa: " مدیریت محصولات ",
5 years ago
icon: "dropbox",
permissionClass: "Product::index",
4 years ago
module: "core",
href: '/product/home',
5 years ago
tileClass: 'cyan-theme',
},
5 years ago
{
titleEn: " Blog Management ",
titleFa: " مدیریت خبرنامه ",
moduleName: "blog",
5 years ago
icon: "rss",
href: '/blog',
tileClass: 'orange-theme',
},
{
titleEn: " Portfolio Management ",
titleFa: " مدیریت نمونه کارها ",
moduleName: "portfolio",
5 years ago
icon: "art-gallery",
5 years ago
href: '/portfolio',
},
// {
// titleEn: " SMS Management ",
// titleFa: " مدیریت پیام های کوتاه ",
// icon: "comment-alt",
// permissionClass: "SMS::manage",
// href: '/sms/manage',
// }
5 years ago
],
user: { name: "" },
5 years ago
mainHref: Routes.main(),
5 years ago
};
},
components: {
5 years ago
"wm-list-tile": Tile,
"wm-notifications": Notifications
},
methods: {
...mapActions("auth", ["logout"]),
},
computed: {
5 years ago
...mapGetters("auth", ["getAuthUser"]),
...mapGetters("common", ["getCurrentTime"]),
...mapGetters("rolePermission", ["getModules"]),
}
5 years ago
};
</script>
<style lang="scss" scoped>
5 years ago
.user-info .Title {
float: right;
}
.user-info .Avatar {
float: right;
width: 48px;
margin: 0px 10px;
}
5 years ago
.user-info .Title .Name {
font-size: 14px;
}
5 years ago
5 years ago
.Header .Menu {
5 years ago
position: absolute;
right: 20px;
top: 20px;
}
5 years ago
.Header .Home {
5 years ago
position: absolute;
right: 50px;
top: 20px;
5 years ago
}
5 years ago
.Header .Name {
position: absolute;
right: 80px;
top: 20px;
color: #fff;
line-height: 18px;
}
.Notification {
5 years ago
position: absolute;
left: 20px;
top: 20px;
}
.Divider {
5 years ago
margin: 0px;
}
.Name {
5 years ago
font-size: 16px;
}
.Role {
5 years ago
font-size: 14px;
color: #aaaaaa;
}
.Time {
5 years ago
text-align: center;
color: #fff;
}
4 years ago
.Time .En {
font-size: 22px;
}
.Time .Fa {
font-size: 14px;
margin-top: -5px;
}
.Header {
5 years ago
padding-bottom: 0px;
}
.LogOut {
5 years ago
position: absolute;
left: 10px;
}
.drawer-trigger {
5 years ago
position: fixed;
top: 0px;
padding: 40px;
background-color: white;
left: 400px;
}
.drawer-trigger.active {
5 years ago
color: red;
}
.drawer {
5 years ago
position: fixed;
top: 0px;
5 years ago
left: -600px;
5 years ago
bottom: 0px;
background-color: white;
5 years ago
width: 600px;
}
.drawer.open {
5 years ago
left: 0px;
}
.v-application .caption {
font-family: iranyekan-regular!important;
}
.footer {
position: absolute;
bottom: 0px;
width: 420px;
padding-bottom: 10px;
text-align: center;
padding-left: 20px;
}
.footer .water-mark {
}
.footer .links {
width: 420px;
border-bottom: 1px solid #eeeeee;
padding-bottom: 10px;
margin: auto;
}
.footer .links .texts a {
font-size: 14px;
color: #9e9e9e;
margin-right: 20px;
transition: 0.2s;
}
.footer .links .social-media {
padding-left: 10px;
}
.footer .links .social-media a {
margin-right: 5px;
transition: 0.2s;
}
.footer .links .social-media a .v-icon {
color: #9e9e9e;
font-size: 16px;
}
.footer .links a:hover, .footer .links .social-media a:hover .v-icon {
color: #000;
}
.footer .water-mark .v-icon {
font-size: 50px;
color: #000;
}
.footer .water-mark .Fa {
font-size: 16px;
}
.footer .water-mark .En {
font-size: 8px;
text-transform: uppercase;
letter-spacing: 4px;
margin-right: -4px;
}
</style>