tango-app-api-infra 3.9.21 → 3.9.22

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.21",
3
+ "version": "3.9.22",
4
4
  "description": "infra",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -2611,7 +2611,7 @@ export async function ticketList( req, res ) {
2611
2611
  if ( inputData.sortBy ) {
2612
2612
  let sortOrder = inputData.sortOrder === 1 ? 'asc' : 'desc';
2613
2613
  const stringKeywordFields = [ 'storeName', 'storeId', 'ticketId', 'status', 'type', 'clientId' ];
2614
- let sortField = inputData.sortBy == 'footfall' ? 'footfallCount' : inputData.sortBy == 'issueDate' ? 'dateString': inputData.sortBy == 'tangoStatus'? 'status' : inputData.sortBy;
2614
+ let sortField = inputData.sortBy == 'footfall' ? 'footfallCount' :inputData.sortBy == 'revisedFF' ? 'revicedFootfall' : inputData.sortBy == 'issueDate' ? 'dateString': inputData.sortBy == 'tangoStatus'? 'status' : inputData.sortBy;
2615
2615
  if ( stringKeywordFields.includes( sortField ) ) {
2616
2616
  sortField = `${sortField}.keyword`;
2617
2617
  }
@@ -2645,6 +2645,9 @@ export async function ticketList( req, res ) {
2645
2645
  } else if ( inputData.sortBy === 'ticketBy' ) {
2646
2646
  sortKey = 'createdByEmail';
2647
2647
  requestedSortType = 'tangoreview';
2648
+ } else if ( inputData.sortBy === 'ticketCreatedBy' ) {
2649
+ sortKey = 'createdByEmail';
2650
+ requestedSortType = 'tagging';
2648
2651
  } else if ( inputData.sortBy === 'status' ) {
2649
2652
  sortKey = 'status';
2650
2653
  requestedSortType =( req.user.userType === 'tango' && inputData.tangoType === 'store' )? 'tangoreview' : inputData?.permissionType === 'review' ? 'review' : ( ticketsFeature && !ticketsApproveFeature )? 'review':'approve';
@@ -4167,7 +4170,7 @@ export async function ticketList( req, res ) {
4167
4170
  storeRevisedAccuracy: item?.mappingInfo?.find( ( f ) => f.type === 'tagging' )?.revicedPerc || '--',
4168
4171
  reviewerRevisedAccuracy: item?.mappingInfo?.find( ( f ) => f.type === 'review' )?.revicedPerc || '--',
4169
4172
  ...( isApprover !== true? item?.mappingInfo?.find( ( f ) => f.type === 'tangoreview' )?.revicedPerc : '' ),
4170
- revicedFF: item.status === 'Closed' || item.status === 'Tango Review Done' ?item?.revicedFootfall : '--',
4173
+ revisedFF: item.status === 'Closed' || item.status === 'Tango Review Done' ?item?.revicedFootfall : '--',
4171
4174
 
4172
4175
  status: item?.mappingInfo?.find( ( f ) => f.type === 'review' )?.status || '--',
4173
4176
  closedDate: item.status === 'Closed' || item.status === 'Tango Review Done' ? item?.mappingInfo?.find( ( f ) => f.type === 'review' )?.updatedAt : '--',
@@ -4285,7 +4288,7 @@ export async function ticketList( req, res ) {
4285
4288
  storeRevisedAccuracy: item?.mappingInfo?.find( ( f ) => f.type === 'tagging' )?.revicedPerc || '--',
4286
4289
  reviewerRevisedAccuracy: item?.mappingInfo?.find( ( f ) => f.type === 'review' )?.revicedPerc || '--',
4287
4290
  ...( isApprover !== true? tangoRevisedAccuracy: item?.mappingInfo?.find( ( f ) => f.type === 'tangoreview' )?.revicedPerc || '' ),
4288
- revicedFF: item.status === 'Closed' || item.status === 'Tango Review Done' ?item?.revicedFootfall : '--',
4291
+ revisedFF: item.status === 'Closed' || item.status === 'Tango Review Done' ?item?.revicedFootfall : '--',
4289
4292
 
4290
4293
  status: item?.mappingInfo?.find( ( f ) => f.type === 'review' )?.status || '--',
4291
4294
  closedDate: item.status === 'Closed' || item.status === 'Tango Review Done' ? item?.mappingInfo?.find( ( f ) => f.type === 'review' )?.updatedAt : '--',