tango-app-api-infra 3.8.1-beta.32 → 3.8.1-beta.34

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.8.1-beta.32",
3
+ "version": "3.8.1-beta.34",
4
4
  "description": "infra",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -27,7 +27,7 @@
27
27
  "mongodb": "^6.4.0",
28
28
  "nodemon": "^3.1.0",
29
29
  "swagger-ui-express": "^5.0.0",
30
- "tango-api-schema": "^2.3.1",
30
+ "tango-api-schema": "^2.3.8",
31
31
  "tango-app-api-middleware": "^3.1.93",
32
32
  "winston": "^3.12.0",
33
33
  "winston-daily-rotate-file": "^5.0.0"
@@ -381,10 +381,10 @@ export async function ticketList( req, res ) {
381
381
  'Ticket raised on': dayjs( item._source.createdAt ).format( 'DD MMM, YYYY' ),
382
382
  'Issue Date': dayjs( item._source.dateString ).format( 'DD MMM, YYYY' ),
383
383
  'Total Footfalls': item._source.footfallCount,
384
- 'Duplicates': item._source.duplicateCount,
385
- 'Employee/Staff': item._source.employeeCount,
386
- 'HouseKeeping': item._source.houseKeepingCount,
387
- 'Revised Footfalls': item._source.footfallCount - ( item._source.duplicateCount + item._source.employeeCount + item._source.houseKeepingCount ),
384
+ 'Duplicates': item?._source?.status === 'closed'? item._source.duplicateACCount : item._source.duplicateCount,
385
+ 'Employee/Staff': item?._source?.status === 'closed'? item._source.employeeACCount : item._source.employeeCount,
386
+ 'HouseKeeping': item?._source?.status === 'closed'? item._source.houseKeepingACCount : item._source.houseKeepingCount,
387
+ 'Revised Footfall': item?._source?.status === 'closed'? item._source.footfallCount - ( item._source.duplicateACCount + item._source.employeeACCount + item._source.houseKeepingACCount ) : item._source.footfallCount - ( item._source.duplicateCount + item._source.employeeCount + item._source.houseKeepingCount ),
388
388
  'Status': item._source.status,
389
389
  'Ticket%': item?._source?.status === 'closed'?`${Math.round( ( ( item._source.duplicateACCount + item._source.employeeACCount + item._source.houseKeepingACCount )/ item._source.footfallCount )*100 ).toFixed( 0 )} %` : 'NA',
390
390
  } );
@@ -452,11 +452,11 @@ export async function getTickets( req, res ) {
452
452
  if (
453
453
  inputData.revopsType
454
454
  ) {
455
- filter.push( {
456
- exists: {
457
- field: inputData.revopsType,
458
- },
459
- } );
455
+ // filter.push( {
456
+ // exists: {
457
+ // field: inputData.revopsType,
458
+ // },
459
+ // } );
460
460
  inputData.revopsType === 'employee' ?
461
461
  filter.push( {
462
462
  range: {
@@ -465,10 +465,10 @@ export async function getTickets( req, res ) {
465
465
  },
466
466
  },
467
467
  } ) :
468
- inputData.revopsType === 'housekeeping' ?
468
+ inputData.revopsType === 'houseKeeping' ?
469
469
  filter.push( {
470
470
  range: {
471
- housekeepingCount: {
471
+ houseKeepingCount: {
472
472
  gt: 0,
473
473
  },
474
474
  },
@@ -773,7 +773,8 @@ export async function updateTicketStatus( data, openSearch, temp, user ) {
773
773
  isVideoStream: true,
774
774
  };
775
775
  const getStoreType = await countDocumnetsCamera( query );
776
- const tempIdList = await extractCheckedTempIds( getExistingOne?.body );
776
+ let getUpdateExistingOne = await getOpenSearchById( openSearch.footfallDirectory, _id );
777
+ const tempIdList = await extractCheckedTempIds( getUpdateExistingOne?.body );
777
778
  logger.info( { tempIdList: tempIdList } );
778
779
  const isSendMessge = await sendSqsMessage( data, tempIdList, getStoreType, storeId );
779
780
  if ( isSendMessge ==true ) {
@@ -1100,11 +1101,11 @@ export async function downloadTickets( req, res ) {
1100
1101
  if (
1101
1102
  inputData.revopsType
1102
1103
  ) {
1103
- filter.push( {
1104
- exists: {
1105
- field: inputData.revopsType,
1106
- },
1107
- } );
1104
+ // filter.push( {
1105
+ // exists: {
1106
+ // field: inputData.revopsType,
1107
+ // },
1108
+ // } );
1108
1109
  inputData.revopsType === 'employee' ?
1109
1110
  filter.push( {
1110
1111
  range: {
@@ -1113,10 +1114,10 @@ export async function downloadTickets( req, res ) {
1113
1114
  },
1114
1115
  },
1115
1116
  } ) :
1116
- inputData.revopsType === 'housekeeping' ?
1117
+ inputData.revopsType === 'houseKeeping' ?
1117
1118
  filter.push( {
1118
1119
  range: {
1119
- housekeepingCount: {
1120
+ houseKeepingCount: {
1120
1121
  gt: 0,
1121
1122
  },
1122
1123
  },