tango-app-api-trax 3.7.85 → 3.7.87
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
|
@@ -666,10 +666,12 @@ export async function sopMobilechecklistQuestionValidatorv1( req, res, next ) {
|
|
|
666
666
|
let sectionQuestion = requestSection.filter( ( secQuestion ) => secQuestion.qname == question.oldQname || secQuestion.qname == question.qname );
|
|
667
667
|
if ( sectionQuestion.length ) {
|
|
668
668
|
if ( requestData.submittype == 'submit' ) {
|
|
669
|
-
if ( (
|
|
670
|
-
|
|
669
|
+
if ( ( [ 'multipleImage', 'multiplechoicemultiple' ].includes( question.answerType ) || ( question.answerType =='dropdown' && question.allowMultiple ) ) ) {
|
|
670
|
+
if ( ( !sectionQuestion[0].linkType || ( sectionQuestion[0].linkType && sectionQuestion[0].linkquestionenabled ) ) && ( sectionQuestion[0].Multianswer == null || sectionQuestion[0].Multianswer == '' || !sectionQuestion[0].Multianswer.length ) ) {
|
|
671
|
+
validationCount++;
|
|
672
|
+
}
|
|
671
673
|
} else {
|
|
672
|
-
if ( ![ 'multiplechoicemultiple', 'multipleImage' ].includes( question.answerType ) && ( question.answerType =='dropdown' && !question.allowMultiple ) && ( ( !sectionQuestion[0].linkType && ( sectionQuestion[0].answer == null || sectionQuestion[0].answer == '' ) ) || ( sectionQuestion[0].linkType && sectionQuestion[0].linkquestionenabled && ( sectionQuestion[0].answer == null || sectionQuestion[0].answer == '' ) ) ) ) {
|
|
674
|
+
if ( ( ![ 'multiplechoicemultiple', 'multipleImage' ].includes( question.answerType ) && ( question.answerType =='dropdown' && !question.allowMultiple ) ) && ( ( !sectionQuestion[0].linkType && ( sectionQuestion[0].answer == null || sectionQuestion[0].answer == '' ) ) || ( sectionQuestion[0].linkType && sectionQuestion[0].linkquestionenabled && ( sectionQuestion[0].answer == null || sectionQuestion[0].answer == '' ) ) ) ) {
|
|
673
675
|
validationCount++;
|
|
674
676
|
}
|
|
675
677
|
}
|
|
@@ -4763,13 +4765,13 @@ export async function downloadChecklist( req, res ) {
|
|
|
4763
4765
|
question.remarks = question.remarks == null || question.remarks == 'null' ? '' : question.remarks;
|
|
4764
4766
|
question.userAnswer.forEach( ( answer ) => {
|
|
4765
4767
|
if ( answer?.referenceImage?.trim() ) {
|
|
4766
|
-
answer.referenceImage =
|
|
4768
|
+
answer.referenceImage = JSON.parse( process.env.CDNURL )?.TraxAnswerCDN+answer.referenceImage;
|
|
4767
4769
|
}
|
|
4768
4770
|
if ( [ 'Capture Image', 'Capture Video' ].includes( answer.validationType ) && answer?.validationAnswer?.trim() ) {
|
|
4769
|
-
answer.validationAnswer =
|
|
4771
|
+
answer.validationAnswer = JSON.parse( process.env.CDNURL )?.TraxAnswerCDN+answer.validationAnswer;
|
|
4770
4772
|
}
|
|
4771
4773
|
if ( answer?.answer?.trim() && [ 'image', 'descriptiveImage', 'multipleImage', 'image/video', 'video' ].includes( question.answerType ) ) {
|
|
4772
|
-
answer.answer =
|
|
4774
|
+
answer.answer = JSON.parse( process.env.CDNURL )?.TraxAnswerCDN+answer.answer;
|
|
4773
4775
|
}
|
|
4774
4776
|
} );
|
|
4775
4777
|
} );
|