tango-app-api-task 3.2.1-beta-7 → 3.2.1-beta-9

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.2.1-beta-7",
3
+ "version": "3.2.1-beta-9",
4
4
  "description": "Task",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -1389,7 +1389,7 @@ export async function createChecklistTask( req, res ) {
1389
1389
  return res.sendError( 'section is not found', 400 );
1390
1390
  }
1391
1391
  let data = { ...question[sectionIndex].questions[req.body.qno - 1], taskId: response?._id, task: true };
1392
- console.log( data );
1392
+
1393
1393
  question[sectionIndex].questions[req.body.qno - 1] = data;
1394
1394
  taskDetails.questionAnswers = question;
1395
1395
  let updateData = {
@@ -1410,7 +1410,7 @@ export async function createChecklistTask( req, res ) {
1410
1410
  taskDate: dayjs( response.scheduleDate ).format( 'YYYY-MM-DD' ),
1411
1411
  },
1412
1412
  };
1413
- console.log( params );
1413
+
1414
1414
  const requestOptions = {
1415
1415
  method: 'POST',
1416
1416
  headers: {
@@ -2320,11 +2320,13 @@ export async function createAiTask( req, res ) {
2320
2320
  return res.sendError( 'Store Not Found', 500 );
2321
2321
  }
2322
2322
  let finduser= await checklistassignconfigModel.findOne( { checkListId: new mongoose.Types.ObjectId( '66b06fe789807eafd9e9c0f9' ), store_id: storeDetails.storeId } );
2323
+ console.log( finduser );
2323
2324
  if ( !finduser ) {
2324
2325
  return res.sendError( 'No user Found For this store', 500 );
2325
2326
  }
2326
2327
  userId = finduser.userId;
2327
-
2328
+ inputBody.userName = finduser.userName;
2329
+ inputBody.userEmail = finduser.userEmail;
2328
2330
 
2329
2331
  // let title = `New Task Alert ${inputBody.taskName}-${storeDetails.storeName}-${dayjs().format( 'YYYY-MM-DD' )}`;
2330
2332
  let time = inputBody?.scheduleEndTime || '11:59 PM';
@@ -2423,7 +2425,7 @@ export async function createAiTask( req, res ) {
2423
2425
  'descriptivetype': 'text',
2424
2426
  },
2425
2427
  ];
2426
- console.log( '--=>', req.files.referenceImage.length );
2428
+
2427
2429
 
2428
2430
  if ( req.files&& req.files.referenceImage&&req.files.referenceImage.length ) {
2429
2431
  let images = [];
@@ -2439,7 +2441,6 @@ export async function createAiTask( req, res ) {
2439
2441
  }
2440
2442
  question[0].questionReferenceImage = images;
2441
2443
  }
2442
- console.log( '----->', question );
2443
2444
  if ( inputBody?.answerType === 'image'||inputBody?.answerType === 'descriptiveImage'||inputBody?.answerType === 'multipleImage' ) {
2444
2445
  answer[0].referenceImage = question[0].questionReferenceImage;
2445
2446
  }
@@ -2466,6 +2467,7 @@ export async function createAiTask( req, res ) {
2466
2467
  client_id: inputBody.clientId,
2467
2468
  userId: userId,
2468
2469
  };
2470
+ console.log( userDetails );
2469
2471
  await taskAssignService.create( userDetails );
2470
2472
  await insertSingleProcessData( response?._id );
2471
2473
  return res.sendSuccess( 'Task created successfully' );