tango-app-api-trax 3.9.36 → 3.9.37
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
|
@@ -2768,16 +2768,16 @@ export async function countUpdateRunAI( req, res ) {
|
|
|
2768
2768
|
if ( !req.body.id ) {
|
|
2769
2769
|
return res.sendError( 'Checklist id is required', 400 );
|
|
2770
2770
|
}
|
|
2771
|
-
if ( !req.body.runAICount ) {
|
|
2772
|
-
|
|
2773
|
-
}
|
|
2771
|
+
// if ( !req.body.runAICount ) {
|
|
2772
|
+
// return res.sendError( 'runAICount is required', 400 );
|
|
2773
|
+
// }
|
|
2774
2774
|
let getDetails = await processedchecklist.findOne( { _id: req.body.id } );
|
|
2775
2775
|
if ( !getDetails ) {
|
|
2776
2776
|
return res.sendError( 'No data found', 204 );
|
|
2777
2777
|
}
|
|
2778
2778
|
|
|
2779
2779
|
let updateData = {
|
|
2780
|
-
runAIFlag: req.body
|
|
2780
|
+
runAIFlag: req.body?.runAICount ?? 0,
|
|
2781
2781
|
};
|
|
2782
2782
|
|
|
2783
2783
|
// complianceCount is already populated for the other answer types; add the image/video scores on top.
|
|
@@ -4044,7 +4044,7 @@ async function insertPCBulkV4( getCLconfig, checklistId, currentdate, updatedche
|
|
|
4044
4044
|
}, { userId: 1, store_id: 1 } );
|
|
4045
4045
|
|
|
4046
4046
|
if ( inprogressData.length ) {
|
|
4047
|
-
await processedchecklist.updateMany( { _id: { $in: inprogressData.map( ( ele ) => new ObjectId( ele._id ) ) } }, { scheduleEndTime: getCLconfig.scheduleEndTime, scheduleEndTime_iso: endTimeIso.format() } );
|
|
4047
|
+
await processedchecklist.updateMany( { _id: { $in: inprogressData.map( ( ele ) => new ObjectId( ele._id ) ) } }, { scheduleEndTime: getCLconfig.scheduleEndTime, scheduleEndTime_iso: endTimeIso.format(), complianceCount: getCLconfig.complianceCount, allowedOverTime: getCLconfig.allowedOverTime, allowedStoreLocation: getCLconfig.allowedStoreLocation, userVerification: getCLconfig.userVerification } );
|
|
4048
4048
|
inprogressData.forEach( ( item ) => {
|
|
4049
4049
|
let checkData = assignUserList.find( ( ele ) => ele.userId.toString() == item.userId.toString() && ele.store_id == item.store_id );
|
|
4050
4050
|
if ( !checkData ) {
|