diff --git a/app/.env b/app/.env index baf1a6a..2b7873c 100644 --- a/app/.env +++ b/app/.env @@ -1 +1 @@ -VUE_APP_WAXIOS_URL=https://fill-later.sk/api/ \ No newline at end of file +VUE_APP_WAXIOS_URL=https://taskmanager.internal.studiotem.com/be/api/ \ No newline at end of file diff --git a/app/public/mock/v1/teams.GET.json b/app/public/mock/v1/teamsx.GET.json similarity index 100% rename from app/public/mock/v1/teams.GET.json rename to app/public/mock/v1/teamsx.GET.json diff --git a/app/src/plugins/app/_config/main.ts b/app/src/plugins/app/_config/main.ts index 45603f7..4f8acb4 100644 --- a/app/src/plugins/app/_config/main.ts +++ b/app/src/plugins/app/_config/main.ts @@ -66,7 +66,8 @@ const options: Options = { 'GET v1/teams/(id)': true, 'POST v1/teams/(id)': true, 'DELETE v1/teams/(id)': true, - 'GET v1/teams': true, + // 'GET v1/teams': true, + 'GET v1/teamsx': true, 'POST v1/teams': true, 'GET v1/employees': true, diff --git a/app/src/plugins/app/_layout/app/_components/a-header.vue b/app/src/plugins/app/_layout/app/_components/a-header.vue index f0872c8..6d4669f 100644 --- a/app/src/plugins/app/_layout/app/_components/a-header.vue +++ b/app/src/plugins/app/_layout/app/_components/a-header.vue @@ -29,11 +29,11 @@

- {{ user.name.charAt(0) + user.surname.charAt(0) }} + {{ user.name?.charAt(0) || '' + user.surname?.charAt(0) || '' }}

- {{ `${user.name} ${user.surname}` }} + {{ `${user.name} ${user.surname || ''}` }}
diff --git a/app/src/plugins/app/_layout/app/app.layout.vue b/app/src/plugins/app/_layout/app/app.layout.vue index 4d4c243..ea80e55 100644 --- a/app/src/plugins/app/_layout/app/app.layout.vue +++ b/app/src/plugins/app/_layout/app/app.layout.vue @@ -40,7 +40,7 @@ export default { width: 100vw max-width: 100vw display: flex - flex-direction: column + flex-direction: column @media (min-width: 992px) .split-pane-right-side 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 fb8f08e..153af18 100644 --- a/app/src/plugins/tm@overview/_components/z-tasks-search.vue +++ b/app/src/plugins/tm@overview/_components/z-tasks-search.vue @@ -43,7 +43,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 @@