[Task] Delete fix

This commit is contained in:
Matej Glasnák committed 2023-02-22 16:44:20 +01:00
1 parent 388466db98
commit ef6369714b
35 files changed
+93 -79

No files matched your search

+6 -6
View File
@@ -1,8 +1,6 @@
import axios from '@/plugins/w@custom/axios/models/axios'
import store from '@/store'
import ax from 'axios'
export default {
namespaced: true,
@@ -25,10 +23,10 @@ export default {
state.employees = employees
// TODO: Remove
const employee = employees.find(employee => employee.email == 'zachariah.vonrueden@jandl.sk')
store.commit('auth/auth_success', {
user: employee
})
// const employee = employees.find(employee => employee.email == 'zachariah.vonrueden@jandl.sk')
// store.commit('auth/auth_success', {
// user: employee
// })
},
set_teams(state: any, teams: any) {
@@ -67,6 +65,7 @@ export default {
update_subtask(state: any, subtask: any) {
state.unscheduledSubtasks = state.unscheduledSubtasks.map(st => st.id == subtask.id ? subtask : st)
state.ongoingSubtasks = state.ongoingSubtasks.map(st => st.id == subtask.id ? subtask : st)
state.mastertasks = state.mastertasks.map(mastertask => {
mastertask.subtasks = mastertask.subtasks.map(st => st.id == subtask.id ? subtask : st)
return mastertask
@@ -76,6 +75,7 @@ export default {
delete_subtask(state: any, subtask: any) {
state.unscheduledSubtasks = state.unscheduledSubtasks.filter(st => st.id != subtask.id)
state.ongoingSubtasks = state.ongoingSubtasks.filter(st => st.id != subtask.id)
state.mastertasks = state.mastertasks.map(mastertask => {
mastertask.subtasks = mastertask.subtasks.filter(st => st.id != subtask.id)
return mastertask