Skip to content
Snippets Groups Projects

Resolve "Logout of tutors after inactivity"

Merged Jan Maximilian Michal requested to merge 22-logout-of-tutors-after-inactivity into master
All threads resolved!
4 files
+ 18
10
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -26,7 +26,7 @@
type="password"
required
></v-text-field>
<v-btn type="submit" color="primary">Access</v-btn>
<v-btn :loading="loading" type="submit" color="primary">Access</v-btn>
</v-form>
</v-flex>
</v-layout>
@@ -35,6 +35,7 @@
<script>
import {mapActions, mapState} from 'vuex'
export default {
name: 'grady-login',
data () {
@@ -43,16 +44,30 @@
username: '',
password: ''
},
error: ''
loading: false
}
},
computed: {
...mapState([
'error'
])
},
methods: {
...mapActions([
'getJWTToken',
'getExamModule',
'getUserRole',
'getJWTTimeDelta'
]),
submit () {
this.$store.dispatch('getJWTToken', this.credentials).then(response => {
this.$router.push('/reviewer/')
}).catch(_ => {
this.error = this.$store.state.error
})
this.loading = true
this.getJWTToken(this.credentials).then(() => {
this.loading = false
this.getExamModule()
this.getUserRole()
this.getJWTTimeDelta()
this.$router.push('/student/')
}).catch(() => { this.loading = false })
}
}
}
Loading