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

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.34",
3
+ "version": "3.8.1-beta.36",
4
4
  "description": "infra",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -22,6 +22,9 @@ export async function createTicket( req, res ) {
22
22
  inputData.duplicateACCount = 0;
23
23
  inputData.employeeACCount = 0;
24
24
  inputData.houseKeepingACCount = 0;
25
+ inputData.houseKeepingCount = inputData.houseKeepingCount || 0;
26
+ inputData.duplicateCount = inputData.duplicateCount || 0;
27
+ inputData.employeeCount = inputData.employeeCount || 0;
25
28
  if ( inputData.houseKeepingCount > 0 ) {
26
29
  inputData.houseKeepingStatus = 'pending';
27
30
  }
@@ -385,8 +388,8 @@ export async function ticketList( req, res ) {
385
388
  'Employee/Staff': item?._source?.status === 'closed'? item._source.employeeACCount : item._source.employeeCount,
386
389
  'HouseKeeping': item?._source?.status === 'closed'? item._source.houseKeepingACCount : item._source.houseKeepingCount,
387
390
  '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 ),
391
+ 'Ticket%': item?._source?.status === 'closed'?`${Math.round( ( ( item._source.duplicateACCount + item._source.employeeACCount + item._source.houseKeepingACCount )/ item._source.footfallCount )*100 ).toFixed( 0 )} %` : `${Math.round( ( ( item?._source?.duplicateCount + item?._source?.employeeCount + item?._source?.houseKeepingCount )/ item?._source?.footfallCount )*100 ).toFixed( 0 )} %`,
388
392
  'Status': item._source.status,
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
393
  } );
391
394
  }
392
395
  return await download( exportData, res );