tango-app-api-task 3.4.1-activitylog-20 → 3.4.1-approvecheck-0

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": "3.4.1-activitylog-20",
3
+ "version": "3.4.1-approvecheck-0",
4
4
  "description": "Task",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -2305,7 +2305,7 @@ export async function approveTask( req, res ) {
2305
2305
  }
2306
2306
  let idList = taskDetails.filter( ( ele ) => ele.checklistStatus == 'submit' ).map( ( item ) => item._id );
2307
2307
  if ( idList.length ) {
2308
- let updateResponse = await taskProcessedService.updateMany( { _id: { $in: idList } }, { approvalStatus: true } );
2308
+ let updateResponse = await taskProcessedService.updateMany( { _id: { $in: idList } }, { approvalStatus: true,approvalTime:new Date(), approvalTime_string:dayjs.format("hh:mm A, DD MMM YYYY"), approvalByName:req.user.name, approvalByEmail:req.user.email } );
2309
2309
  if ( updateResponse.modifiedCount || updateResponse.matchedCount ) {
2310
2310
  let inputstores = taskDetails.filter( ( data ) => data.checklistStatus == 'submit' );
2311
2311
  let storeNames = inputstores.map( ( data ) => data.storeName );
@@ -2319,6 +2319,10 @@ export async function approveTask( req, res ) {
2319
2319
  },
2320
2320
  'upsert': {
2321
2321
  approvalStatus: true,
2322
+ approvalTime:new Date(),
2323
+ approvalTime_string:dayjs.format("hh:mm A, DD MMM YYYY"),
2324
+ approvalByName:req.user.name,
2325
+ approvalByEmail:req.user.email
2322
2326
  },
2323
2327
  };
2324
2328
  const requestOptions = {