tango-app-api-trax 3.3.1-beta-42 → 3.3.1-beta-44
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
|
@@ -399,7 +399,7 @@ export async function redoChecklist( req, res ) {
|
|
|
399
399
|
};
|
|
400
400
|
|
|
401
401
|
let response = await processedChecklist.updateOne( { _id: req.body.payload._id }, updateData );
|
|
402
|
-
|
|
402
|
+
console.log( response );
|
|
403
403
|
if ( response.modifiedCount || response.matchedCount ) {
|
|
404
404
|
let storeTimeZone = await storeService.findOne( { storeName: checklistDetails.storeName }, { 'storeProfile.timeZone': 1 } );
|
|
405
405
|
let currentDateTime;
|
|
@@ -428,8 +428,6 @@ export async function redoChecklist( req, res ) {
|
|
|
428
428
|
submitedBy: checklistDetails.userName,
|
|
429
429
|
submitTime: checklistDetails.submitTime,
|
|
430
430
|
};
|
|
431
|
-
|
|
432
|
-
// return;
|
|
433
431
|
await checklistLogs.create( data );
|
|
434
432
|
|
|
435
433
|
const requestOptions = {
|
|
@@ -3762,8 +3762,10 @@ export async function checklistAssign( req, res ) {
|
|
|
3762
3762
|
}
|
|
3763
3763
|
} ) );
|
|
3764
3764
|
|
|
3765
|
-
|
|
3766
|
-
|
|
3765
|
+
let uniqueArr = userData.filter( ( obj, index, self ) =>
|
|
3766
|
+
index === self.findIndex( ( o ) => o.storeId === obj.storeId && o.userEmail === obj.userEmail ),
|
|
3767
|
+
);
|
|
3768
|
+
return res.sendSuccess( { count: uniqueArr.length, uniqueArr } );
|
|
3767
3769
|
} catch ( e ) {
|
|
3768
3770
|
logger.error( { functionName: 'checklistAssign', error: e } );
|
|
3769
3771
|
return res.sendError( e, 500 );
|