mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
Merge branch 'main' of bitbucket.org:studiotem/jandl-taskmanager-app into production
This commit is contained in:
commit
d3140dad1c
1 file changed
+11
@@ -432,6 +432,17 @@ export default {
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
'mastertask.team_id': {
|
||||
handler(value, oldValue) {
|
||||
if (this.editMode && (!value && oldValue)) {
|
||||
// Removes only employees from the old team when team_id is removed
|
||||
const oldTeamEmployeesIds = this.teams.find(team => team.id == oldValue)?.employees.map(employee => employee?.id) || []
|
||||
const employeesNotInOldTeam = this.mastertask.employees.filter(employee => !oldTeamEmployeesIds.includes(employee?.id))
|
||||
this.mastertask.employees = employeesNotInOldTeam
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user