tango-app-api-task 3.4.1-activitylog-6 → 3.4.1-activitylog-8

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-6",
3
+ "version": "3.4.1-activitylog-8",
4
4
  "description": "Task",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -220,7 +220,7 @@ export async function createUpdateTask( req, res ) {
220
220
  } );
221
221
  } );
222
222
 
223
- if ( questionList.questionAdd.length || questionList.questionEdit.length || questionList.questionDelete.length || inputBody.checklistName.toLowerCase() != checkListDetails.checkListName.toLowerCase() || inputBody.checklistDescription.toLowerCase() != checkListDetails.checkListDescription.toLowerCase() ) {
223
+ if ( questionList.questionAdd.length || questionList.questionEdit.length || questionList.questionDelete.length || inputBody.checklistName.toLowerCase() != taskDetails.checkListName.toLowerCase() || inputBody.checklistDescription.toLowerCase() != taskDetails.checkListDescription.toLowerCase() ) {
224
224
  let insertLogData = {
225
225
  client_id: req.body.clientId,
226
226
  createAt: new Date(),
@@ -235,12 +235,12 @@ export async function createUpdateTask( req, res ) {
235
235
  createdBy: req.user.userName,
236
236
  coverage: taskDetails?.coverage,
237
237
  logDetails: {
238
- ...( inputBody.checklistName.toLowerCase() == checkListDetails.checkListName.toLowerCase() ) ? { updatedChecklistName: {} } :{ updatedChecklistName: {
239
- previous: checkListDetails.checkListName,
238
+ ...( inputBody.checklistName.toLowerCase() == taskDetails.checkListName.toLowerCase() ) ? { updatedChecklistName: {} } :{ updatedChecklistName: {
239
+ previous: taskDetails.checkListName,
240
240
  new: inputBody.checklistName,
241
241
  } },
242
- ...( inputBody.checklistDescription.toLowerCase() == checkListDetails.checkListDescription.toLowerCase() ) ? { updatedChecklistDescription: {} } :{ updatedChecklistDescription: {
243
- previous: checkListDetails.checkListDescription,
242
+ ...( inputBody.checklistDescription.toLowerCase() == taskDetails.checkListDescription.toLowerCase() ) ? { updatedChecklistDescription: {} } :{ updatedChecklistDescription: {
243
+ previous: taskDetails.checkListDescription,
244
244
  new: inputBody.checklistDescription,
245
245
  } },
246
246
  updatedSectionName: [],
@@ -988,6 +988,7 @@ export const taskDeleteV1 = async ( req, res ) => {
988
988
  createdBy: req.user.userName,
989
989
  coverage: taskConfig.coverage,
990
990
  logDetails: {},
991
+ userType: req?.user?.userType || '',
991
992
  };
992
993
  insertOpenSearchData( JSON.parse( process.env.OPENSEARCH ).traxActivityLog, logObj );
993
994
  // console.log( 'Update result:', resultData );