mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[toast] adding parsing function
This commit is contained in:
1 parent
f5f787b5fe
commit
f40065ffd1
18 files changed
+21
-21
No files matched your search
@@ -74,7 +74,7 @@ export default {
|
|||||||
this.$router.push('/')
|
this.$router.push('/')
|
||||||
this.$toast.success('Boli ste odhlásený')
|
this.$toast.success('Boli ste odhlásený')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.error(error)
|
this.$toast.error(this.$parseError(error))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export default {
|
|||||||
try {
|
try {
|
||||||
await this.$store.dispatch('tm/initialize')
|
await this.$store.dispatch('tm/initialize')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.error(error)
|
this.$toast.error(this.$parseError(error))
|
||||||
} finally {
|
} finally {
|
||||||
this.loader?.hide()
|
this.loader?.hide()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ export default {
|
|||||||
await this.$store.dispatch('auth/forgotPassword', this.credentials)
|
await this.$store.dispatch('auth/forgotPassword', this.credentials)
|
||||||
this.$router.push({name: 'Forgot success', query: {email: this.credentials.email}})
|
this.$router.push({name: 'Forgot success', query: {email: this.credentials.email}})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.error(error)
|
this.$toast.error(this.$parseError(error))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ export default {
|
|||||||
this.$router.push({ name: 'Login' })
|
this.$router.push({ name: 'Login' })
|
||||||
this.$toast.success('Your password has been successfully changed.')
|
this.$toast.success('Your password has been successfully changed.')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.error(error)
|
this.$toast.error(this.$parseError(error))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ export default {
|
|||||||
const { mastertasks, subtasks, teams} = await this.$axios.get_auth(`v1/search?q=${search}`)
|
const { mastertasks, subtasks, teams} = await this.$axios.get_auth(`v1/search?q=${search}`)
|
||||||
this.searchResults = {mastertasks: mastertasks.data, subtasks: subtasks.data, teams: teams.data}
|
this.searchResults = {mastertasks: mastertasks.data, subtasks: subtasks.data, teams: teams.data}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.error(error)
|
this.$toast.error(this.$parseError(error))
|
||||||
this.searchResults = {error}
|
this.searchResults = {error}
|
||||||
}
|
}
|
||||||
}, 300)
|
}, 300)
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export default {
|
|||||||
const blob = await response.blob()
|
const blob = await response.blob()
|
||||||
FileSaver.saveAs(blob, file.name)
|
FileSaver.saveAs(blob, file.name)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.error(error)
|
this.$toast.error(this.$parseError(error))
|
||||||
} finally {
|
} finally {
|
||||||
file.isLoading = false
|
file.isLoading = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.error(error)
|
this.$toast.error(this.$parseError(error))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@ export default {
|
|||||||
this.$events.emit("blocker-created")
|
this.$events.emit("blocker-created")
|
||||||
this.closeModal()
|
this.closeModal()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.error(error)
|
this.$toast.error(this.$parseError(error))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export default {
|
|||||||
this.$emit('on-blocker-deleted', this.blocker)
|
this.$emit('on-blocker-deleted', this.blocker)
|
||||||
this.closeModal()
|
this.closeModal()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.error(error)
|
this.$toast.error(this.$parseError(error))
|
||||||
} finally {
|
} finally {
|
||||||
this.isDeleting = false
|
this.isDeleting = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export default {
|
|||||||
this.$emit('master-task-edited', mastertask)
|
this.$emit('master-task-edited', mastertask)
|
||||||
this.$events.emit('close-both-modals')
|
this.$events.emit('close-both-modals')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.error(error)
|
this.$toast.error(this.$parseError(error))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ export default {
|
|||||||
this.$emit('on-mastertask-deleted', this.mastertask)
|
this.$emit('on-mastertask-deleted', this.mastertask)
|
||||||
this.closeModal()
|
this.closeModal()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.error(error)
|
this.$toast.error(this.$parseError(error))
|
||||||
} finally {
|
} finally {
|
||||||
this.isDeleting = false
|
this.isDeleting = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export default {
|
|||||||
this.$events.emit('master-task:team-member-deleted', { teamId: this.team.id, memberId: this.member.id })
|
this.$events.emit('master-task:team-member-deleted', { teamId: this.team.id, memberId: this.member.id })
|
||||||
this.closeModal()
|
this.closeModal()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.error(error)
|
this.$toast.error(this.$parseError(error))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -324,7 +324,7 @@ export default {
|
|||||||
this.$emit('master-task-edited', this.mastertask)
|
this.$emit('master-task-edited', this.mastertask)
|
||||||
this.closeModal()
|
this.closeModal()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.error(error)
|
this.$toast.error(this.$parseError(error))
|
||||||
} finally {
|
} finally {
|
||||||
this.isSaving = false
|
this.isSaving = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export default {
|
|||||||
this.visible = false
|
this.visible = false
|
||||||
this.$emit('on-subtask-edited', subtask)
|
this.$emit('on-subtask-edited', subtask)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.error(error)
|
this.$toast.error(this.$parseError(error))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ export default {
|
|||||||
this.closeModal()
|
this.closeModal()
|
||||||
this.$emit('on-subtask-deleted', this.subtask)
|
this.$emit('on-subtask-deleted', this.subtask)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.error(error)
|
this.$toast.error(this.$parseError(error))
|
||||||
} finally {
|
} finally {
|
||||||
this.isDeleting = false
|
this.isDeleting = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ export default {
|
|||||||
this.editMode = editMode || !this.subtask.id
|
this.editMode = editMode || !this.subtask.id
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('ERROR', error)
|
console.error('ERROR', error)
|
||||||
this.$toast.error(error)
|
this.$toast.error(this.$parseError(error))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -288,7 +288,7 @@ export default {
|
|||||||
|
|
||||||
this.closeModal()
|
this.closeModal()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.error(error)
|
this.$toast.error(this.$parseError(error))
|
||||||
} finally {
|
} finally {
|
||||||
this.isSaving = false
|
this.isSaving = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export default {
|
|||||||
this.$emit('update', this.team)
|
this.$emit('update', this.team)
|
||||||
this.$store.commit('tm/delete_team', this.team)
|
this.$store.commit('tm/delete_team', this.team)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.error(error)
|
this.$toast.error(this.$parseError(error))
|
||||||
} finally {
|
} finally {
|
||||||
this.isDeleting = false
|
this.isDeleting = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ export default {
|
|||||||
this.team = { employees: [] }
|
this.team = { employees: [] }
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.error(error)
|
this.$toast.error(this.$parseError(error))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -125,7 +125,7 @@ export default {
|
|||||||
|
|
||||||
this.closeModal()
|
this.closeModal()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.error(error)
|
this.$toast.error(this.$parseError(error))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ export default {
|
|||||||
await this.$store.dispatch('auth/updateUserInfo', data)
|
await this.$store.dispatch('auth/updateUserInfo', data)
|
||||||
this.$toast.success('Profil bol úspešne zmenený')
|
this.$toast.success('Profil bol úspešne zmenený')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.error(error)
|
this.$toast.error(this.$parseError(error))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user