tango-app-api-infra 3.9.5-vms.85 → 3.9.5-vms.87

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-infra",
3
- "version": "3.9.5-vms.85",
3
+ "version": "3.9.5-vms.87",
4
4
  "description": "infra",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -26,7 +26,7 @@ export async function createTicket( req, res ) {
26
26
  inputData.userName = req?.user?.userName;
27
27
  inputData.email = req?.user?.email;
28
28
  inputData.role = req?.user?.role;
29
- inputData.status = 'open';
29
+ inputData.status = 'Open';
30
30
  inputData.duplicateACCount = 0;
31
31
  inputData.employeeACCount = 0;
32
32
  inputData.houseKeepingACCount = 0;
@@ -78,7 +78,7 @@ export async function createinternalTicket( req, res ) {
78
78
  ticketId: 'TE_FDT_' + new Date().valueOf(),
79
79
  createdAt: new Date(),
80
80
  updatedAt: new Date(),
81
- status: 'open',
81
+ status: 'Open',
82
82
  comments: inputData?.comments || '',
83
83
  createdByEmail: req?.user?.email,
84
84
  createdByUserName: req?.user?.userName,
@@ -259,6 +259,7 @@ export async function tangoReviewTicket( req, res ) {
259
259
  createdByEmail: req?.user?.email,
260
260
  createdByUserName: req?.user?.userName,
261
261
  createdByRole: req?.user?.role,
262
+ createdAt: new Date(),
262
263
  } ) );
263
264
 
264
265
  record.mappingInfo = [ ...ticketData?.[0]?._source?.mappingInfo.slice( 0, -1 ),
@@ -308,6 +309,7 @@ export async function tangoReviewTicket( req, res ) {
308
309
  createdByEmail: req?.user?.email,
309
310
  createdByUserName: req?.user?.userName,
310
311
  createdByRole: req?.user?.role,
312
+ createdAt: new Date(),
311
313
  } ) );
312
314
 
313
315
  record.mappingInfo = [ ...ticketData?.[0]?._source?.mappingInfo.slice( 0, -1 ),
@@ -908,7 +910,7 @@ export async function ticketSummary( req, res ) {
908
910
  }
909
911
  inputData.clientId = inputData?.clientId?.split( ',' );
910
912
  // const ticketsApproveFeature = userInfo?.rolespermission?.some( ( f ) => f.featureName === 'FootfallDirectory' && ( f.modules.find( ( m ) => m.name == 'approver' && ( m.isAdd == true || m.isEdit == true ) ) ) );
911
- if ( req?.user?.userType !== 'tango' ) {
913
+ if ( req?.user?.userType === 'tango' ) {
912
914
  switch ( inputData?.tangoType ) {
913
915
  case 'store':
914
916
  const storeQuery = {
@@ -1340,10 +1342,8 @@ export async function ticketSummary( req, res ) {
1340
1342
  break;
1341
1343
  default: '';
1342
1344
  }
1343
- } else if ( req?.user?.userType === 'tango' ) {
1344
- logger.info( { msg: '.........1', ticketsFeature, ticketsApproveFeature } );
1345
+ } else if ( req?.user?.userType !== 'tango' ) {
1345
1346
  if ( ticketsFeature && !ticketsApproveFeature ) {
1346
- logger.info( '.........3' );
1347
1347
  const storeQuery = {
1348
1348
  size: 0,
1349
1349
  query: {
@@ -1553,7 +1553,6 @@ export async function ticketSummary( req, res ) {
1553
1553
  avgAccuracy: ticketAccuracy+'%',
1554
1554
  };
1555
1555
  } else if ( ticketsFeature && ticketsApproveFeature ) {
1556
- logger.info( '.........2' );
1557
1556
  if ( inputData?.permissionType === 'review' ) {
1558
1557
  const storeQuery = {
1559
1558
  size: 0,
@@ -4897,6 +4896,7 @@ export async function updateUserTicketStatus( req, res ) {
4897
4896
  ...lastEntry,
4898
4897
  status: 'In-Progress',
4899
4898
  updatedAt: currentTime,
4899
+ createdAt: currentTime,
4900
4900
  createdByRole: req?.user?.role || '',
4901
4901
  createdByEmail: req?.user?.email || '',
4902
4902
  createdByUserName: req?.user?.userName || '',
@@ -1891,6 +1891,7 @@ export async function ticketApprove( req, res, next ) {
1891
1891
  createdByEmail: req?.user?.email,
1892
1892
  createdByUserName: req?.user?.userName,
1893
1893
  createdByRole: req?.user?.role,
1894
+ createdAt: new Date(),
1894
1895
  } ) );
1895
1896
 
1896
1897
  record.mappingInfo = [ ...ticketData?.[0]?._source?.mappingInfo.slice( 0, -1 ),
@@ -1919,6 +1920,7 @@ export async function ticketApprove( req, res, next ) {
1919
1920
  createdByEmail: req?.user?.email,
1920
1921
  createdByUserName: req?.user?.userName,
1921
1922
  createdByRole: req?.user?.role,
1923
+ createdAt: new Date(),
1922
1924
  } );
1923
1925
  }
1924
1926
  }
@@ -1963,6 +1965,7 @@ export async function ticketApprove( req, res, next ) {
1963
1965
  createdByEmail: req?.user?.email,
1964
1966
  createdByUserName: req?.user?.userName,
1965
1967
  createdByRole: req?.user?.role,
1968
+ createdAt: new Date(),
1966
1969
  } ) );
1967
1970
 
1968
1971
  record.mappingInfo = [ ...ticketData?.[0]?._source?.mappingInfo.slice( 0, -1 ),
@@ -1982,6 +1985,7 @@ export async function ticketApprove( req, res, next ) {
1982
1985
  createdByEmail: req?.user?.email,
1983
1986
  createdByUserName: req?.user?.userName,
1984
1987
  createdByRole: req?.user?.role,
1988
+ createdAt: new Date(),
1985
1989
  } );
1986
1990
  }
1987
1991
  }
@@ -2026,6 +2030,7 @@ export async function ticketApprove( req, res, next ) {
2026
2030
  createdByEmail: req?.user?.email,
2027
2031
  createdByUserName: req?.user?.userName,
2028
2032
  createdByRole: req?.user?.role,
2033
+ createdAt: new Date(),
2029
2034
  } ) );
2030
2035
 
2031
2036
  record.mappingInfo = [ ...ticketData?.[0]?._source?.mappingInfo.slice( 0, -1 ),
@@ -2052,6 +2057,7 @@ export async function ticketApprove( req, res, next ) {
2052
2057
  createdByEmail: req?.user?.email,
2053
2058
  createdByUserName: req?.user?.userName,
2054
2059
  createdByRole: req?.user?.role,
2060
+ createdAt: new Date(),
2055
2061
  } );
2056
2062
  }
2057
2063
  }
@@ -2072,7 +2078,6 @@ export async function ticketApprove( req, res, next ) {
2072
2078
  },
2073
2079
  );
2074
2080
  }
2075
- console.log( req.body, getConfig.footfallDirectoryConfigs.revision );
2076
2081
  let checkapprove = getConfig.footfallDirectoryConfigs.revision.filter( ( data ) => data.actionType === 'approver' && data.isChecked === true );
2077
2082
 
2078
2083