diff --git a/app/src/plugins/app/_config/App.vue b/app/src/plugins/app/_config/App.vue index b82e138..19efa9f 100644 --- a/app/src/plugins/app/_config/App.vue +++ b/app/src/plugins/app/_config/App.vue @@ -5,11 +5,11 @@ - - + + - + @@ -76,7 +76,7 @@ export default { }, methods: { - onTeamDeleted(team) { + onTeamUpdate(team) { this.$events.emit('on-team-deleted', team) }, diff --git a/app/src/plugins/app/_config/main.ts b/app/src/plugins/app/_config/main.ts index 9192b5b..ccae222 100644 --- a/app/src/plugins/app/_config/main.ts +++ b/app/src/plugins/app/_config/main.ts @@ -47,8 +47,8 @@ const options: Options = { 'POST v1/auth/login': true, 'POST v1/auth/post': true, - 'GET v1/master-tasks/(id)': true, - 'GET v1/master-tasks': true, + // 'GET v1/master-tasks/(id)': true, + // 'GET v1/master-tasks': true, 'POST v1/master-tasks/(id)': true, 'DELETE v1/master-tasks/(id)': true, 'POST v1/master-tasks': true, @@ -64,11 +64,11 @@ const options: Options = { 'DELETE v1/tasks/(id)': true, // 'GET v1/teams/(id)': true, - 'POST v1/teams/(id)': true, - 'DELETE v1/teams/(id)': true, + // 'POST v1/teams/(id)': true, + // 'DELETE v1/teams/(id)': true, // 'GET v1/teams': true, // 'GET v1/teamsx': true, - 'POST v1/teams': true, + // 'POST v1/teams': true, // 'GET v1/employees': true, 'GET v1/search': true, diff --git a/app/src/plugins/tm@dashboard/projects/projects.vue b/app/src/plugins/tm@dashboard/projects/projects.vue index d6d2b4f..c796d01 100644 --- a/app/src/plugins/tm@dashboard/projects/projects.vue +++ b/app/src/plugins/tm@dashboard/projects/projects.vue @@ -53,7 +53,7 @@ export default { // format masterTasks to event format for calendar events = events.map(event => { - const color = this._stringToHexColor(`${event.project_code}${event.name}`) + const color = this._stringToHexColor(event.color) return { id: event.id, @@ -81,7 +81,7 @@ export default { try { this.teams = await this.$axios.get_auth_data('v1/teams') this.employees = await this.$axios.get_auth_data('v1/employees') - this.masterTasks = await this.$axios.get_auth_data('v1/master-tasks') + this.masterTasks = await this.$axios.get_auth_data('v1/mastertasks') } catch (error) { this.masterTasks = {error} } @@ -98,19 +98,19 @@ export default { }, _stringToHexColor(string) { - let hash = 0; + let hash = 0 for (let i = 0; i < string.length; i++) { - hash = string.charCodeAt(i) + ((hash << 5) - hash); + hash = string.charCodeAt(i) + ((hash << 5) - hash) } - let color = '#'; + let color = '#' for (let i = 0; i < 3; i++) { - let value = (hash >> (i * 8)) & 0xFF; - color += ('00' + value.toString(16)).substr(-2); + let value = (hash >> (i * 8)) & 0xFF + color += ('00' + value.toString(16)).substr(-2) } - return color; + return color } } } - + \ No newline at end of file diff --git a/app/src/plugins/tm@dashboard/tasks/_components/a-tasks-filter.vue b/app/src/plugins/tm@dashboard/tasks/_components/a-tasks-filter.vue index 07a0e32..9af6910 100644 --- a/app/src/plugins/tm@dashboard/tasks/_components/a-tasks-filter.vue +++ b/app/src/plugins/tm@dashboard/tasks/_components/a-tasks-filter.vue @@ -3,7 +3,7 @@ export default { - emits: ['deleted'], + emits: ['update'], data() { return { @@ -39,9 +39,9 @@ export default { async deleteTeam() { try { - await this.$axios.delete(`v1/teams/${this.team.id}`) + await this.$axios.delete_auth(`v1/teams/${this.team.id}`) this.visible = false - this.$emit('deleted', this.team) + this.$emit('update', this.team) } catch (error) { this.$toast.error(error) } diff --git a/app/src/plugins/tm@modal/team/z-team-modal.vue b/app/src/plugins/tm@modal/team/z-team-modal.vue index 3266cfa..2c61d58 100644 --- a/app/src/plugins/tm@modal/team/z-team-modal.vue +++ b/app/src/plugins/tm@modal/team/z-team-modal.vue @@ -70,7 +70,7 @@ import tmUtils from '@/plugins/tm@_utils/tm.utils' const atLeastOne = (value) => value.length export default { - emits: ['close'], + emits: ['close', 'update'], components: { ZAutocomplete, diff --git a/app/src/plugins/tm@overview/teams/teams.vue b/app/src/plugins/tm@overview/teams/teams.vue index 48ef321..692ae86 100644 --- a/app/src/plugins/tm@overview/teams/teams.vue +++ b/app/src/plugins/tm@overview/teams/teams.vue @@ -1,6 +1,6 @@ diff --git a/app/src/plugins/w/axios/models/axios.ts b/app/src/plugins/w/axios/models/axios.ts index 7eefda8..424188e 100644 --- a/app/src/plugins/w/axios/models/axios.ts +++ b/app/src/plugins/w/axios/models/axios.ts @@ -34,7 +34,7 @@ export default { async post(url: string, params = null, config?: any) { - return axios.post(url, params, config) + return axios.post(url, {data: params}, config) .then(response => response.data) .catch(error => Promise.reject(error)) }, @@ -42,14 +42,14 @@ export default { async post_auth(url: string, params = null, config?: any) { config = this._config(config) - return axios.post(url, params, config) + return axios.post(url, {data: params}, config) .then(response => response.data) .catch(error => Promise.reject(error)) }, async post_data(url: string, params = null, config?: any) { - return axios.post(url, params, config) + return axios.post(url, {data: params}, config) .then(response => response.data.data) .catch(error => Promise.reject(error.response || error)) }, @@ -57,7 +57,7 @@ export default { async post_auth_data(url: string, params = null, config?: any) { config = this._config(config) - return axios.post(url, params, config) + return axios.post(url, {data: params}, config) .then(response => response.data.data) .catch(error => Promise.reject(error.response || error)) },