tango-app-api-trax 3.8.19-nike → 3.8.20-nike
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -668,7 +668,7 @@ export async function sopMobilechecklistQuestionValidatorv1( req, res, next ) {
|
|
|
668
668
|
validationCount++;
|
|
669
669
|
}
|
|
670
670
|
} else {
|
|
671
|
-
if ( ( !
|
|
671
|
+
if ( ( !sectionQuestion[0].linkType && ( sectionQuestion[0].answer == null || sectionQuestion[0].answer == '' ) ) || ( sectionQuestion[0].linkType && sectionQuestion[0].linkquestionenabled && ( sectionQuestion[0].answer == null || sectionQuestion[0].answer == '' ) ) ) {
|
|
672
672
|
validationCount++;
|
|
673
673
|
}
|
|
674
674
|
}
|
|
@@ -1589,6 +1589,18 @@ export async function sopMobilechecklistMultiSectionFormatterv1( req, res, next
|
|
|
1589
1589
|
|
|
1590
1590
|
requestData.questionAnswers = sectionFormat;
|
|
1591
1591
|
logger.error( { message: requestData.questionAnswers, error: 'QuestionanswersPayload' } );
|
|
1592
|
+
|
|
1593
|
+
if ( requestData.submittype == 'submit' ) {
|
|
1594
|
+
for ( let section of sectionFormat ) {
|
|
1595
|
+
for ( let question of section.questions ) {
|
|
1596
|
+
let mustValidate = !question.linkType || ( question.linkType && question.linkquestionenabled );
|
|
1597
|
+
if ( mustValidate && ( !question.userAnswer || !question.userAnswer.length ) ) {
|
|
1598
|
+
return res.sendError( 'Please Fill All Fields', 400 );
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
}
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1592
1604
|
next();
|
|
1593
1605
|
} catch ( error ) {
|
|
1594
1606
|
logger.error( { function: 'sopMobilechecklistMultiSectionFormatter', error: error, body: req.body } );
|