tango-app-api-task 1.0.0-beta.20 → 1.0.0-beta.25

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-app-api-task",
3
- "version": "1.0.0-beta.20",
3
+ "version": "1.0.0-beta.25",
4
4
  "description": "Task",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1337,16 +1337,17 @@ export async function approveTask( req, res ) {
1337
1337
  if ( !taskDetails.length ) {
1338
1338
  return res.sendError( 'No data found', 204 );
1339
1339
  }
1340
- let idList = taskDetails.filter( ( ele ) => ele.checklistStatus == 'submit' ).map( ( item ) => item._id );
1340
+ let idList = taskDetails.filter( ( ele ) => ele.checklistStatus == 'submit' ).map( ( item ) => item._id );
1341
1341
  if ( idList.length ) {
1342
1342
  let updateResponse = await taskProcessedService.updateMany( { _id: { $in: idList } }, { approvalStatus: true } );
1343
1343
  if ( updateResponse.modifiedCount || updateResponse.matchedCount ) {
1344
+ let inputstores = taskDetails.filter( ( data ) => data.checklistStatus == 'submit' );
1344
1345
  let params = {
1345
1346
  'payload': {
1346
1347
  sourceCheckList_id: req.body.sourceCheckList_id,
1347
1348
  fromDate: req.body.fromDate,
1348
1349
  toDate: req.body.toDate,
1349
- store_id: req.body.storeId,
1350
+ store_id: inputstores,
1350
1351
  },
1351
1352
  'upsert': {
1352
1353
  approvalStatus: true,