[Master task modal] Fixed team verification

This commit is contained in:
Matej Glasnák committed 2023-06-13 12:07:24 +02:00
1 parent b2470a80c2
commit 3f37acd04f
3 files changed
+28 -25

No files matched your search

@@ -45,27 +45,11 @@ export default {
if (typeof employee.duration == 'string') {
totalDuration += parseFloat(employee.duration)
employee.duration = parseFloat(employee.duration)
employee.invalid = false
}
else if (typeof employee.duration == 'number') {
totalDuration += employee.duration
}
return employee
})
if (!this.mastertask.team)
return this.mastertask.duration = totalDuration
this.mastertask.team.employees = this.mastertask.team.employees.map(employee => {
if (isNaN(employee.duration) || isNaN(parseFloat(employee.duration)))
return employee
if (typeof employee.duration == 'string') {
totalDuration += parseFloat(employee.duration)
employee.duration = parseFloat(employee.duration)
}
else if (typeof employee.duration == 'number') {
totalDuration += employee.duration
employee.invalid = false
}
return employee