Skip to content

Commit 922f265

Browse files
committed
Updated edit module in logs & employee
1 parent 2869ad9 commit 922f265

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

WebClient/src/components/employee/update.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,14 @@
6767

6868
<script>
6969
import { mapGetters } from 'vuex'
70+
import store from '@/store'
7071
7172
export default {
7273
data () {
7374
return {
7475
valid: false,
7576
form: {},
76-
required: (value) => !!value || 'This field is required.',
77+
required: (value) => !!value || 'This field is required.'
7778
}
7879
},
7980
@@ -98,6 +99,11 @@ export default {
9899
99100
mounted () {
100101
this.getDetails();
102+
},
103+
104+
beforeRouteLeave (to, from, next) {
105+
store.dispatch('DESTROY_KEY')
106+
next()
101107
}
102108
}
103109
</script>

WebClient/src/components/logs/update.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
import { mapGetters } from 'vuex'
105105
import { EventBus } from '@/event-bus.js'
106106
import moment from 'moment'
107+
import store from '@/store'
107108
108109
export default {
109110
data () {
@@ -201,6 +202,11 @@ export default {
201202
202203
this.initInDateTime()
203204
this.initOutDateTime()
205+
},
206+
207+
beforeRouteLeave (to, from, next) {
208+
store.dispatch('DESTROY_KEY')
209+
next()
204210
}
205211
}
206212
</script>

0 commit comments

Comments
 (0)