tango-app-api-trax 3.7.79 → 3.7.81
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
|
@@ -3384,15 +3384,16 @@ export async function runAIFlag( req, res ) {
|
|
|
3384
3384
|
let runAIFlag = 0;
|
|
3385
3385
|
store.questionAnswers.forEach( ( section ) => {
|
|
3386
3386
|
section.questions.forEach( ( question ) => {
|
|
3387
|
-
if ( question.answerType == 'image' && ( question?.userAnswer?.[0]?.runAIData.value == '
|
|
3387
|
+
if ( question.answerType == 'image' && ( question?.userAnswer?.[0]?.runAIData.value == 'False' || !question?.userAnswer?.[0]?.runAIData.value ) ) {
|
|
3388
3388
|
runAIFlag++;
|
|
3389
3389
|
}
|
|
3390
3390
|
} );
|
|
3391
3391
|
} );
|
|
3392
|
-
|
|
3392
|
+
console.log( runAIFlag );
|
|
3393
3393
|
if ( runAIFlag ) {
|
|
3394
3394
|
let emailList = ele?.notifyFlags?.notifyType.includes( 'approver' ) ? ele.approver.map( ( approver ) => approver?.value ): [];
|
|
3395
3395
|
emailList = [ ...emailList, ...ele?.notifyFlags?.users?.map( ( user ) => user?.value ) ];
|
|
3396
|
+
console.log( emailList );
|
|
3396
3397
|
let data = {
|
|
3397
3398
|
storeName: store.storeName,
|
|
3398
3399
|
flagCount: 1,
|
|
@@ -3420,6 +3421,7 @@ export async function runAIFlag( req, res ) {
|
|
|
3420
3421
|
} ) );
|
|
3421
3422
|
} ) );
|
|
3422
3423
|
}
|
|
3424
|
+
return res.sendSuccess( 'Message send successfully' );
|
|
3423
3425
|
} catch ( e ) {
|
|
3424
3426
|
logger.error( { functionName: 'runAIFlag', error: e } );
|
|
3425
3427
|
return res.sendError( e, 500 );
|