Skip to content

Commit ca25bb9

Browse files
committed
Fixed navbar drawer
1 parent f8236c8 commit ca25bb9

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

WebClient/src/components/log-employee-form.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@
2222
</template>
2323

2424
<script>
25-
import { LOG_EMPLOYEE } from '@/store/actions-type'
2625
import { mapGetters } from 'vuex'
26+
import { LOG_EMPLOYEE } from '@/store/actions-type'
27+
import { EventBus } from '@/event-bus.js'
2728
2829
export default {
2930
data () {
@@ -59,6 +60,10 @@ export default {
5960
resetForm () {
6061
this.$refs.form.reset()
6162
}
63+
},
64+
65+
created () {
66+
EventBus.$emit('toggle-drawer')
6267
}
6368
}
6469
</script>

WebClient/src/components/nav-bar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ import { EventBus } from '@/event-bus.js'
9090
export default {
9191
data() {
9292
return {
93-
drawer: false,
93+
drawer: true,
9494
items: [
9595
{ icon: "home", title: "Home", to: "home", visible: true },
9696
{ icon: "supervisor_account", title: "Login", to: "login", visible: !this.isAuthenticated }

WebClient/src/router/index.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import Vue from 'vue'
22
import store from '@/store'
33
import Router from 'vue-router'
44
import AuthService from '@/services/auth-service.js'
5-
import { EventBus } from '@/event-bus.js'
65
import { LOGOUT } from '@/store/actions-type'
76

87
Vue.use(Router)
@@ -13,11 +12,7 @@ const router = new Router({
1312
{
1413
path: '/',
1514
name: 'home',
16-
component: () => import('@/views/home'),
17-
beforeEnter: (to, from, next) => {
18-
EventBus.$emit('toggle-drawer')
19-
next()
20-
}
15+
component: () => import('@/views/home')
2116
},
2217
{
2318
path: '/login',

0 commit comments

Comments
 (0)