@@ -19,7 +19,7 @@ import AHeader from './_components/a-header.vue' export default { components: { ASidemenu, - // AHeader + AHeader } } diff --git a/app/src/plugins/tm@dashboard/teams/_components/a-team-filter.vue b/app/src/plugins/tm@dashboard/teams/_components/a-team-filter.vue index 69c6722..eee29bb 100644 --- a/app/src/plugins/tm@dashboard/teams/_components/a-team-filter.vue +++ b/app/src/plugins/tm@dashboard/teams/_components/a-team-filter.vue @@ -44,7 +44,7 @@ export default { return { teams: [], teamsNames: [], - + // Kaluza: Napojit funkcionalitu selectedTeam: '', @@ -74,7 +74,7 @@ export default { }, async _getTeams() { - this.teams = await this.$axios.get_auth_data('v1/teams') + this.teams = await this.$axios.get_auth_data('v1/teamsx') this.teams.forEach(team => { this.teamsNames.push(team.name) }) diff --git a/app/src/plugins/tm@modal/master-task/z-master-task-modal.vue b/app/src/plugins/tm@modal/master-task/z-master-task-modal.vue index 3e574b9..57fa755 100644 --- a/app/src/plugins/tm@modal/master-task/z-master-task-modal.vue +++ b/app/src/plugins/tm@modal/master-task/z-master-task-modal.vue @@ -348,12 +348,12 @@ export default { async created() { try { - this.teams = await this.$axios.get_auth_data('v1/teams') + this.teams = await this.$axios.get_auth_data('v1/teamsx') this.employees = await this.$axios.get_auth_data('v1/employees') // this.masterTask = await this.$axios.get_auth_data(`v1/master-task/${this.masterTaksId}`) // this.selectedTeam = `${this.masterTask.team.name} - ${this.masterTask.team.id}`) } catch (error) { - this.$toast(error) + this.$toast.error(error) } }, diff --git a/app/src/plugins/tm@modal/sub-task/z-sub-task-modal.vue b/app/src/plugins/tm@modal/sub-task/z-sub-task-modal.vue index 8bb0ca8..e539c12 100644 --- a/app/src/plugins/tm@modal/sub-task/z-sub-task-modal.vue +++ b/app/src/plugins/tm@modal/sub-task/z-sub-task-modal.vue @@ -345,7 +345,7 @@ export default { this.masterTasks = await this.$axios.get_auth_data('v1/master-tasks') this.employees = await this.$axios.get_auth_data('v1/employees') } catch (error) { - this.$toast(error) + this.$toast.error(error) } }, @@ -382,7 +382,7 @@ export default { this.close() this.$router.push({ name: 'Dashboard - Tasks' }) } catch (error) { - this.$toast(error) + this.$toast.error(error) } }, diff --git a/app/src/plugins/tm@overview/_components/z-tasks-search.vue b/app/src/plugins/tm@overview/_components/z-tasks-search.vue index 62082c2..fbc56c8 100644 --- a/app/src/plugins/tm@overview/_components/z-tasks-search.vue +++ b/app/src/plugins/tm@overview/_components/z-tasks-search.vue @@ -33,7 +33,7 @@ export default { try { this.employees = await this.$axios.get_auth_data('v1/employees') } catch (error) { - this.$toast(error) + this.$toast.error(error) } }, diff --git a/app/src/plugins/w/axios/models/axios.ts b/app/src/plugins/w/axios/models/axios.ts index 8a68f5f..492ef97 100644 --- a/app/src/plugins/w/axios/models/axios.ts +++ b/app/src/plugins/w/axios/models/axios.ts @@ -21,7 +21,7 @@ export default { async get_data(url: string, config?: any) { return axios.get(url, config) .then(response => response.data.data) - .catch(error => Promise.reject(error.response)) + .catch(error => Promise.reject(error.response || error)) }, async get_auth_data(url: string, config?: any) { @@ -29,7 +29,7 @@ export default { return axios.get(url, config) .then(response => Promise.resolve(response.data.data)) - .catch(error => Promise.reject(error.response)) + .catch(error => Promise.reject(error.response || error)) }, async post(url: string, params = null, config?: any) { @@ -51,7 +51,7 @@ export default { return axios.post(url, params, config) .then(response => response.data.data) - .catch(error => Promise.reject(error.response)) + .catch(error => Promise.reject(error.response || error)) }, async post_auth_data(url: string, params = null, config?: any) { @@ -59,7 +59,7 @@ export default { return axios.post(url, params, config) .then(response => response.data.data) - .catch(error => Promise.reject(error.response)) + .catch(error => Promise.reject(error.response || error)) }, async delete(url: string, config?: any) { @@ -79,7 +79,7 @@ export default { async delete_data(url: string, config?: any) { return axios.delete(url, config) .then(response => response.data.data) - .catch(error => Promise.reject(error.response)) + .catch(error => Promise.reject(error.response || error)) }, async delete_auth_data(url: string, config?: any) { @@ -87,7 +87,7 @@ export default { return axios.delete(url, config) .then(response => response.data.data) - .catch(error => Promise.reject(error.response)) + .catch(error => Promise.reject(error.response || error)) }, async patch(url: string, params = null, config?: any) { @@ -107,7 +107,7 @@ export default { async patch_data(url: string, params = null, config?: any) { return axios.patch(url, params, config) .then(response => response.data.data) - .catch(error => Promise.reject(error.response)) + .catch(error => Promise.reject(error.response || error)) }, async patch_auth_data(url: string, params = null, config?: any) { @@ -115,7 +115,7 @@ export default { return axios.patch(url, params, config) .then(response => response.data.data) - .catch(error => Promise.reject(error.response)) + .catch(error => Promise.reject(error.response || error)) }, async put(url: string, params = null, config?: any) { @@ -135,7 +135,7 @@ export default { async put_data(url: string, params = null, config?: any) { return axios.put(url, params, config) .then(response => response.data.data) - .catch(error => Promise.reject(error.response)) + .catch(error => Promise.reject(error.response || error)) }, async put_auth_data(url: string, params = null, config?: any) { @@ -143,7 +143,7 @@ export default { return axios.put(url, params, config) .then(response => response.data.data) - .catch(error => Promise.reject(error.response)) + .catch(error => Promise.reject(error.response || error)) }, _config(config: any) { diff --git a/app/src/plugins/w/loadable/_components/w-loadable.vue b/app/src/plugins/w/loadable/_components/w-loadable.vue index 56956e6..3bf0f15 100644 --- a/app/src/plugins/w/loadable/_components/w-loadable.vue +++ b/app/src/plugins/w/loadable/_components/w-loadable.vue @@ -1,7 +1,7 @@