tango-app-api-task 3.5.0-alpha-0 → 3.5.0-alpha-2

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.5.0-alpha-0",
3
+ "version": "3.5.0-alpha-2",
4
4
  "description": "Task",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -2203,10 +2203,10 @@ export async function createChecklistMultiTask( req, res ) {
2203
2203
  coverage: response?.coverage || 'store',
2204
2204
  };
2205
2205
  await taskAssignService.create( userDetails );
2206
- console.log( originaldata?.checklistId );
2206
+ // console.log( originaldata?.checklistId );
2207
2207
  if ( inputBody.checkListType == 'checklistTask' ) {
2208
2208
  let taskDetails = await processedChecklist.findOne( { _id: originaldata?.checklistId }, { questionAnswers: 1, taskStatus: 1, checklistStatus: 1, client_id: 1, store_id: 1, storeName: 1, checkListType: 1, sourceCheckList_id: 1, checkListName: 1 } );
2209
- console.log( taskDetails );
2209
+ // console.log( taskDetails );
2210
2210
  if ( !taskDetails ) {
2211
2211
  return res.sendError( 'No data found', 204 );
2212
2212
  }
@@ -2251,7 +2251,7 @@ export async function createChecklistMultiTask( req, res ) {
2251
2251
  let url = JSON.parse( process.env.LAMBDAURL );
2252
2252
 
2253
2253
  let searchResponse = await fetch( url.redoChecklist, requestOptions );
2254
- console.log( searchResponse.ok );
2254
+ // console.log( searchResponse.ok );
2255
2255
 
2256
2256
 
2257
2257
  if ( !searchResponse.ok ) {
@@ -2308,11 +2308,11 @@ export async function approveTask( req, res ) {
2308
2308
  let approvalUpdateData = {
2309
2309
  approvalStatus: true,
2310
2310
  approvalTime: new Date(),
2311
- approvalTime_string: dayjs().format( 'hh:mm A, DD MMM YYYY' ),
2311
+ approvalTime_string: dayjs().tz( 'Asia/Kolkata' ).format( 'hh:mm A, DD MMM YYYY' ),
2312
2312
  approvalByName: req.user.userName,
2313
2313
  approvalByEmail: req.user.email,
2314
2314
  };
2315
- let updateResponse = await taskProcessedService.updateMany( { _id: { $in: idList } }, approvalUpdateData );
2315
+ let updateResponse = await taskProcessedService.updateMany( { _id: { $in: idList }, approvalStatus: false }, approvalUpdateData );
2316
2316
  if ( updateResponse.modifiedCount || updateResponse.matchedCount ) {
2317
2317
  let inputstores = taskDetails.filter( ( data ) => data.checklistStatus == 'submit' );
2318
2318
  let storeNames = inputstores.map( ( data ) => data.storeName );
@@ -2327,7 +2327,7 @@ export async function approveTask( req, res ) {
2327
2327
  'upsert': {
2328
2328
  approvalStatus: true,
2329
2329
  approvalTime: new Date(),
2330
- approvalTime_string: dayjs().format( 'hh:mm A, DD MMM YYYY' ),
2330
+ approvalTime_string: dayjs().tz( 'Asia/Kolkata' ).format( 'hh:mm A, DD MMM YYYY' ),
2331
2331
  approvalByName: req.user.userName,
2332
2332
  approvalByEmail: req.user.email,
2333
2333
  },