Commit 7005c69a authored by Adrian's avatar Adrian

Cambiando el sidenav

parent 804e935f
......@@ -59,23 +59,17 @@
{{ user ? user : 'Usuario Demo' }}
</v-list-item-title>
<v-list-item-subtitle class="white--text">
{{ rol }}
<v-autocomplete
style="margin-top: -5px"
class="autocomplete-roles"
@change="setRol"
:items="roles"
dense
hide-details
v-model="mRol"
></v-autocomplete>
</v-list-item-subtitle>
</v-list-item-content>
<v-list-item-action>
<v-menu offset-y>
<template v-slot:activator="{ on, attrs }">
<v-btn icon v-on="on" v-bind="attrs">
<v-icon color="white">expand_more</v-icon>
</v-btn>
</template>
<v-list>
<v-list-item link @click="setRol(rol)" v-for="(rol, index) in roles" :key="index">
<v-list-item-title>{{ rol }}</v-list-item-title>
</v-list-item>
</v-list>
</v-menu>
</v-list-item-action>
</v-list-item>
</v-toolbar-title>
<v-divider></v-divider>
......@@ -218,26 +212,20 @@
</v-list-item-avatar>
<v-list-item-content class="pt-0 pb-0">
<v-list-item-title class="white--text pt-0 mt-0">
{{ user ? user : 'Usuario Demo' }}
{{ user ? user : 'Usuario demo' }}
</v-list-item-title>
<v-list-item-subtitle class="white--text">
{{ rol }}
<v-list-item-subtitle class="white--text cursor--pointer">
<v-autocomplete
style="margin-top: -2px"
class="autocomplete-roles"
@change="setRol"
:items="roles"
dense
hide-details
v-model="mRol"
></v-autocomplete>
</v-list-item-subtitle>
</v-list-item-content>
<v-list-item-action>
<v-menu offset-y>
<template v-slot:activator="{ on, attrs }">
<v-btn icon v-on="on" v-bind="attrs">
<v-icon color="white">expand_more</v-icon>
</v-btn>
</template>
<v-list>
<v-list-item link @click="setRol(rol)" v-for="(rol, index) in roles" :key="index">
<v-list-item-title>{{ rol }}</v-list-item-title>
</v-list-item>
</v-list>
</v-menu>
</v-list-item-action>
</v-list-item>
</template>
<v-divider color="white"></v-divider>
......@@ -326,6 +314,7 @@ export default {
this.$store.commit('setSidenav', this.$storage.get('sidenav'));
}
this.roles = this.$storage.get('roles');
this.mRol = this.roles[0];
this.rol = this.$storage.get('rol');
}
this.layout = this.$storage.get('template') || 'right';
......@@ -338,7 +327,8 @@ export default {
rol: null,
layout: null,
viewLayout: {},
sitename: 'Frontend Base'
sitename: 'Frontend Base',
mRol: null
};
},
watch: {
......@@ -411,7 +401,8 @@ export default {
isActive(url) {
return this.$route.path === url;
},
setRol(rol) {
setRol() {
const rol = this.mRol;
this.$storage.set('rol', rol);
this.rol = rol;
const menus = this.getModules(this.$storage.get('modules'), rol);
......@@ -447,15 +438,6 @@ export default {
}
}
},
getNotifications() {
this.$notifications();
},
execute(func) {
this[func]();
},
fullscreen() {
this.$util.fullscreen();
},
getLabel(item) {
return item.label;
}
......@@ -512,4 +494,14 @@ export default {
.icon--class {
margin-right: 5px !important;
}
.autocomplete-roles {
input {
color: $white !important;
}
.v-input__icon {
.v-icon {
color: $white !important;
}
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment