tango-app-api-task 3.4.1-activitylog-10 → 3.4.1-activitylog-12

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-10",
3
+ "version": "3.4.1-activitylog-12",
4
4
  "description": "Task",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -25,7 +25,7 @@
25
25
  "mongodb": "^6.10.0",
26
26
  "nodemon": "^3.1.7",
27
27
  "npm": "^10.9.2",
28
- "tango-api-schema": "^2.2.73",
28
+ "tango-api-schema": "^2.2.108",
29
29
  "tango-app-api-middleware": "^3.1.58",
30
30
  "winston": "^3.17.0",
31
31
  "winston-daily-rotate-file": "^5.0.0"
@@ -1220,7 +1220,8 @@ function findObjectDifference( oldObj, newObj ) {
1220
1220
  return difference;
1221
1221
  }
1222
1222
 
1223
- export async function insertSingleProcessData( checklistId ) {
1223
+
1224
+ export async function insertSingleProcessData( checklistId, answerTypechange, inputBody ) {
1224
1225
  try {
1225
1226
  let currentdate = new Date();
1226
1227
  let date = dayjs( currentdate ).format();
@@ -1332,7 +1333,7 @@ export async function insertSingleProcessData( checklistId ) {
1332
1333
  updatedchecklist = checklistDetails;
1333
1334
  }
1334
1335
  if ( updatedchecklist ) {
1335
- await insertPCBulkV3( getCLconfig, checklistId, updatedchecklist, dateVal, startTimeIso, endTimeIso, insertdata );
1336
+ await insertPCBulkV3( getCLconfig, checklistId, updatedchecklist, dateVal, startTimeIso, endTimeIso, insertdata, answerTypechange, inputBody );
1336
1337
  }
1337
1338
  }
1338
1339
  }
@@ -1344,7 +1345,7 @@ export async function insertSingleProcessData( checklistId ) {
1344
1345
  }
1345
1346
  };
1346
1347
 
1347
- async function insertPCBulkV3( getCLconfig, checklistId, updatedchecklist, date, startTimeIso, endTimeIso, insertdata ) {
1348
+ async function insertPCBulkV3( getCLconfig, checklistId, updatedchecklist, date, startTimeIso, endTimeIso, insertdata, answerTypechange, inputBody ) {
1348
1349
  let getquestionQuery = [];
1349
1350
 
1350
1351
  if ( dayjs( getCLconfig.publishDate ).format( 'YYYY-MM-DD' ) != dayjs( date ).format( 'YYYY-MM-DD' ) ) {
@@ -1512,6 +1513,13 @@ async function insertPCBulkV3( getCLconfig, checklistId, updatedchecklist, date,
1512
1513
  element4.remainder = getCLconfig?.remainder || [];
1513
1514
  element4.restrictAttendance = getCLconfig?.restrictAttendance;
1514
1515
  element4.coverage = getCLconfig?.coverage;
1516
+ if ( inputBody&&inputBody?.streamId ) {
1517
+ element4.streamId = inputBody?.streamId;
1518
+ }
1519
+ if ( answerTypechange ) {
1520
+ element4.planotype = 'qrScan';
1521
+ }
1522
+ element4.coverage = getCLconfig?.coverage;
1515
1523
  assignUserList.push( element4 );
1516
1524
  }
1517
1525
  } ) );
@@ -3822,7 +3830,7 @@ export async function eyeTesttask( req, res ) {
3822
3830
  userId: userId,
3823
3831
  };
3824
3832
  await taskAssignService.create( userDetails );
3825
- await insertSingleProcessData( response?._id );
3833
+ await insertSingleProcessData( response?._id, true, inputBody );
3826
3834
  return res.sendSuccess( 'Task created successfully' );
3827
3835
  }
3828
3836
  } catch ( e ) {
@@ -32,6 +32,7 @@ export const eyeTesttaskSchema = Joi.object().keys( {
32
32
  answerType: Joi.string().required(),
33
33
  scheduleDate: Joi.string().required(),
34
34
  scheduleEndTime: Joi.string().required(),
35
+ streamId: Joi.string().required(),
35
36
  referenceImage: Joi.any().optional(),
36
37
  } );
37
38
  export const commonAiTaskSchema = Joi.object().keys( {