tango-app-api-trax 3.8.10 → 3.8.11
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
|
@@ -1250,6 +1250,21 @@ export async function sopMobilechecklistMultiSectionFormatterv1( req, res, next
|
|
|
1250
1250
|
}
|
|
1251
1251
|
}
|
|
1252
1252
|
} else {
|
|
1253
|
+
if ( qaans[k].validationType == 'Capture Multiple Image with description' ) {
|
|
1254
|
+
qaans[k]['validationImage']=[];
|
|
1255
|
+
if ( requestSection[i].validationImage.length ) {
|
|
1256
|
+
for ( let image of requestSection[i].validationImage ) {
|
|
1257
|
+
let validationAnswer = decodeURIComponent( image.split( '?' )[0] );
|
|
1258
|
+
if ( validationAnswer.length ) {
|
|
1259
|
+
let splitImgUrl = validationAnswer.split( '/' );
|
|
1260
|
+
if ( splitImgUrl.length > 1 ) {
|
|
1261
|
+
splitImgUrl.splice( 0, 3 );
|
|
1262
|
+
qaans[k].validationImage.push( splitImgUrl.join( '/' ) || '' );
|
|
1263
|
+
}
|
|
1264
|
+
};
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1253
1268
|
// qaans[k].descriptivetype = qaAnswers[j].descriptivetype || '';
|
|
1254
1269
|
qaans[k].validationAnswer = requestSection[i].validationAnswer || '';
|
|
1255
1270
|
}
|
|
@@ -2325,6 +2340,9 @@ export async function submitTask( req, res ) {
|
|
|
2325
2340
|
insertOpenSearchData( openSearch.traxActivityLog, inserttraxlogs );
|
|
2326
2341
|
if ( submittype === 'submit' ) {
|
|
2327
2342
|
const excludedChecklists = [ 'Store Hygiene Check' ];
|
|
2343
|
+
if ( checklist.checkListName.includes( 'Store Hygiene' ) ) {
|
|
2344
|
+
|
|
2345
|
+
}
|
|
2328
2346
|
if ( !excludedChecklists.includes( checklist.checkListName ) ) {
|
|
2329
2347
|
const query1 = [
|
|
2330
2348
|
{
|
|
@@ -3523,6 +3541,13 @@ export async function questionList( req, res ) {
|
|
|
3523
3541
|
if ( ( userAns.validationType == 'Capture Image' || userAns.validationType == 'Capture Video' ) && userAns.validationAnswer && userAns.validationAnswer != '' ) {
|
|
3524
3542
|
getchecklist[0].questionAnswers[secIndex].questions[questionIndex].userAnswer[userAnsIndex].validationAnswer = await signedUrl( { file_path: decodeURIComponent( userAns.validationAnswer ), Bucket: bucket.sop } );
|
|
3525
3543
|
}
|
|
3544
|
+
if ( userAns.validationType == 'Capture Multiple Image with description' ) {
|
|
3545
|
+
let imageAnswers = userAns.validationImage;
|
|
3546
|
+
userAns.validationImage = [];
|
|
3547
|
+
for ( let image of imageAnswers ) {
|
|
3548
|
+
getchecklist[0].questionAnswers[secIndex].questions[questionIndex].userAnswer[userAnsIndex].validationImage.push( await signedUrl( { file_path: decodeURIComponent( image ), Bucket: bucket.sop } ) );
|
|
3549
|
+
}
|
|
3550
|
+
}
|
|
3526
3551
|
if ( [ 'image', 'descriptiveImage', 'video' ].includes( question.answerType ) && userAns.answer != '' ) {
|
|
3527
3552
|
getchecklist[0].questionAnswers[secIndex].questions[questionIndex].userAnswer[userAnsIndex].answer = await signedUrl( { file_path: decodeURIComponent( userAns.answer ), Bucket: bucket.sop } );
|
|
3528
3553
|
}
|