tango-app-api-infra 3.9.8 → 3.9.9

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.8",
3
+ "version": "3.9.9",
4
4
  "description": "infra",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -2570,13 +2570,11 @@ export async function ticketList( req, res ) {
2570
2570
  if ( inputData.sortBy ) {
2571
2571
  let sortOrder = inputData.sortOrder === 1 ? 'asc' : 'desc';
2572
2572
  const stringKeywordFields = [ 'storeName', 'storeId', 'ticketId', 'status', 'type', 'clientId' ];
2573
- let sortField = inputData.sortBy == 'footfall' ? 'footfallCount' : inputData.sortBy == 'issueDate' ? 'dateString' : inputData.sortBy;
2573
+ let sortField = inputData.sortBy == 'footfall' ? 'footfallCount' : inputData.sortBy == 'issueDate' ? 'dateString': inputData.sortBy == 'tangoStatus'? 'status' : inputData.sortBy;
2574
2574
  if ( stringKeywordFields.includes( sortField ) ) {
2575
2575
  sortField = `${sortField}.keyword`;
2576
2576
  }
2577
- // sortBy mappingInfo.createdAt for types "review", "approve", "tagging" based on user permission
2578
- // If sortBy is 'reviewedOn', 'approvedOn', or 'taggedOn', sort by mappingInfo[?].createdAt where type matches the right value
2579
- // fallback: newest item with correct mappingInfo.type for each ticket
2577
+
2580
2578
  let requestedSortType = null;
2581
2579
  let sortKey = null;
2582
2580
  if ( inputData.sortBy === 'ticketRaised' ) {