[Calendar] Add-time-modal only for logged user

This commit is contained in:
Matej Glasnák committed 2023-02-27 12:21:58 +01:00
1 parent bf67f853e3
commit b4343dc241
3 files changed
+6 -1

No files matched your search

@@ -156,6 +156,8 @@ export default {
try {
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${editedSubtask.id}`, editedSubtask)
this.$events.emit('on-subtask-edited', subtask)
if (subtask.employee_id == this.$store.getters['auth/user'].id)
this.$events.emit('show-task-add-time-modal', { subtask })
} catch (error) {
this.$toast.error(error.message || error)
+1 -1
View File
@@ -1,5 +1,5 @@
import axios from '@/plugins/w/axios/models/axios'
// import './refreshExpired'
import './refreshExpired'
export default {
namespaced: true,
+3
View File
@@ -3,7 +3,10 @@ import axios from 'axios'
import store from '@/store'
async function _unauthorised(error: any) {
if (error?.response?.data?.message == 'Unauthenticated.')
return store.dispatch('auth/logout')
return error
}
axios.interceptors.response.use(