tango-app-api-task 3.4.1-activitylog-19 → 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-19",
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 = {
@@ -3830,6 +3834,7 @@ export async function eyeTesttask( req, res ) {
3830
3834
  checkListName: data.checkListName,
3831
3835
  client_id: inputBody.clientId,
3832
3836
  userId: userId,
3837
+ assignId:storeDetails?._id
3833
3838
  };
3834
3839
  await taskAssignService.create( userDetails );
3835
3840
  await insertSingleProcessData( response?._id, true, inputBody );