tango-app-api-trax 3.9.6 → 3.9.7
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
|
@@ -546,7 +546,7 @@ export async function redoChecklist( req, res ) {
|
|
|
546
546
|
...( !checklistConfigDetails?.redoValidity && { reinitiateStatus: true } ),
|
|
547
547
|
questionAnswers: question,
|
|
548
548
|
...( checklistDetails.checklistStatus == 'inprogress' && checklistDetails.redoStatus ) ? { redoEdit: true } : {},
|
|
549
|
-
...(
|
|
549
|
+
...( !checklistDetails.redoStatus && checklistConfigDetails.redoValidity ) ? { scheduleEndTime_iso: dayjs( checklistDetails.scheduleEndTime_iso ).add( checklistConfigDetails.redoValidity, 'day' ).format() } :{},
|
|
550
550
|
};
|
|
551
551
|
|
|
552
552
|
let response = await processedChecklist.updateOne( { _id: req.body.payload._id }, updateData );
|
|
@@ -660,7 +660,7 @@ export async function sopMobilechecklistQuestionValidatorv1( req, res, next ) {
|
|
|
660
660
|
requestSection.forEach( ( item ) => item.section_id = section.section_id );
|
|
661
661
|
section.questions.forEach( ( question ) => {
|
|
662
662
|
// question.answers.forEach( ( answer ) => {
|
|
663
|
-
let sectionQuestion = requestSection.filter( ( secQuestion ) => secQuestion.qname == question.oldQname || secQuestion.qname == question.qname );
|
|
663
|
+
let sectionQuestion = requestSection.filter( ( secQuestion ) => ( secQuestion.qname == question.oldQname || secQuestion.qname == question.qname ) && ( secQuestion.answerType == question.answerType ) );
|
|
664
664
|
if ( sectionQuestion.length ) {
|
|
665
665
|
if ( requestData.submittype == 'submit' ) {
|
|
666
666
|
if ( ( [ 'multipleImage', 'multiplechoicemultiple', 'image/video' ].includes( question.answerType ) || ( question.answerType =='dropdown' && question.allowMultiple ) ) ) {
|