From 3f37acd04f8d63b20de9ef6d5f221d80b1525d93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Glasn=C3=A1k?= Date: Tue, 13 Jun 2023 12:07:24 +0200 Subject: [PATCH] [Master task modal] Fixed team verification --- .../master-task/_mixins/selects.mixin.ts | 20 ++----------- .../master-task/z-master-task-modal.vue | 29 +++++++++++++++---- .../_components/a-task-spent-time.vue | 4 ++- 3 files changed, 28 insertions(+), 25 deletions(-) diff --git a/app/src/plugins/tm@modal/master-task/_mixins/selects.mixin.ts b/app/src/plugins/tm@modal/master-task/_mixins/selects.mixin.ts index 337fcd8..dc22da2 100644 --- a/app/src/plugins/tm@modal/master-task/_mixins/selects.mixin.ts +++ b/app/src/plugins/tm@modal/master-task/_mixins/selects.mixin.ts @@ -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 diff --git a/app/src/plugins/tm@modal/master-task/z-master-task-modal.vue b/app/src/plugins/tm@modal/master-task/z-master-task-modal.vue index 3c7e81f..2a531e9 100644 --- a/app/src/plugins/tm@modal/master-task/z-master-task-modal.vue +++ b/app/src/plugins/tm@modal/master-task/z-master-task-modal.vue @@ -23,10 +23,10 @@ - + @@ -50,6 +50,7 @@