tango-app-api-trax 3.7.17 → 3.7.18
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
|
@@ -3717,6 +3717,13 @@ export async function questionList( req, res ) {
|
|
|
3717
3717
|
logger.info( `v5 => Checklist Continue => store Name: ${getchecklist[0].storeName}, User Email: ${getchecklist[0].userEmail}, Checklist Name: ${getchecklist[0].checkListName}` );
|
|
3718
3718
|
let bucket = JSON.parse( process.env.BUCKET );
|
|
3719
3719
|
let cdnurl = JSON.parse( process.env.CDNURL );
|
|
3720
|
+
if ( req?.query?.sectionIndex ) {
|
|
3721
|
+
if ( getchecklist[0].questionAnswers.length <= req?.query?.sectionIndex ) {
|
|
3722
|
+
return res.sendError( 'Check List Got Edited Please Fill Again', 422 );
|
|
3723
|
+
}
|
|
3724
|
+
getchecklist[0]['sectionLength'] = getchecklist[0].questionAnswers.length;
|
|
3725
|
+
getchecklist[0].questionAnswers = [ getchecklist[0].questionAnswers[req?.query?.sectionIndex] ];
|
|
3726
|
+
}
|
|
3720
3727
|
for ( let [ secIndex, section ] of getchecklist[0].questionAnswers.entries() ) {
|
|
3721
3728
|
for ( let [ questionIndex, question ] of section.questions.entries() ) {
|
|
3722
3729
|
let Multianswer = [];
|