From 104c5ad690e6dcce6a2f61731475f85823b8af38 Mon Sep 17 00:00:00 2001 From: yoution Date: Wed, 13 Jan 2021 16:47:46 +0800 Subject: [PATCH] fix: #4206 disblae next button when add empty job --- .../components/JobsPickerQuestion/JobsPickerQuestion.jsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/projects/detail/components/JobsPickerQuestion/JobsPickerQuestion.jsx b/src/projects/detail/components/JobsPickerQuestion/JobsPickerQuestion.jsx index 3cd4fa71b..bdcf09fe5 100644 --- a/src/projects/detail/components/JobsPickerQuestion/JobsPickerQuestion.jsx +++ b/src/projects/detail/components/JobsPickerQuestion/JobsPickerQuestion.jsx @@ -54,12 +54,8 @@ class JobsPickerQuestion extends Component { }, noPartialFillsExist: (formValues, value) => { return _.every(value, v => { - - const isOneValueFilled = v.title.trim().length > 0 || v.people > 0 || v.duration > 0 || (v.skills && v.skills.length) || v.description.trim().length || (v.workLoad && v.workLoad.value !== null) || (v.role && v.role.value !== null) const isAllValuesFilled = v.title.trim().length > 0 && v.people > 0 && v.duration > 0 && v.skills && v.skills.length && v.description.trim().length && v.workLoad.value !== null && v.role.value !== null - // If one value is filled, all values should be filled to make this row valid. Partial fill is not valid - const isRowValid = !isOneValueFilled || isAllValuesFilled - return isRowValid + return isAllValuesFilled }) } }