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
bf43f94d72
1 file changed
+11
-3
@@ -675,8 +675,12 @@ export default {
|
||||
this.$store.commit('tm/update_subtask', subtask);
|
||||
this.$events.emit('on-subtask-edited', this.subtask);
|
||||
} else {
|
||||
this.subtask.employees.forEach((employee) => {
|
||||
if (employee.id)
|
||||
// Filter out employees that don't have both id and duration
|
||||
const validEmployees = this.subtask.employees.filter(
|
||||
(employee) => employee.id && employee.duration,
|
||||
);
|
||||
|
||||
validEmployees.forEach((employee) => {
|
||||
employee.timeblocks = this.timeblocks
|
||||
.filter((timeblock) => timeblock.date)
|
||||
.map((timeblock) => {
|
||||
@@ -691,7 +695,11 @@ export default {
|
||||
};
|
||||
});
|
||||
});
|
||||
const subtaskCopy = this.subtask;
|
||||
|
||||
const subtaskCopy = {
|
||||
...this.subtask,
|
||||
employees: validEmployees,
|
||||
};
|
||||
delete subtaskCopy._master_task;
|
||||
const { subtasks } = await this.$axios.post_auth(
|
||||
`v1/mastertasks/${this.subtask.master_task_id}/subtasks`,
|
||||
|
||||
Reference in new issue
Block a user