tango-app-api-infra 3.9.10 → 3.9.12
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
|
@@ -2579,10 +2579,10 @@ export async function ticketList( req, res ) {
|
|
|
2579
2579
|
let sortKey = null;
|
|
2580
2580
|
if ( inputData.sortBy === 'ticketRaised' ) {
|
|
2581
2581
|
sortKey = 'createdAt';
|
|
2582
|
-
requestedSortType =( req.user.userType === 'tango' && inputData.tangoType === 'store' )? '
|
|
2582
|
+
requestedSortType =( req.user.userType === 'tango' && inputData.tangoType === 'store' )? 'tangoreview' : inputData?.permissionType === 'review' ? 'review' : ( ticketsFeature && !ticketsApproveFeature )? 'review':'approve';
|
|
2583
2583
|
} else if ( inputData.sortBy === 'dueDate' ) {
|
|
2584
2584
|
sortKey = 'dueDate';
|
|
2585
|
-
requestedSortType =( req.user.userType === 'tango' && inputData.tangoType === 'store' )? '
|
|
2585
|
+
requestedSortType =( req.user.userType === 'tango' && inputData.tangoType === 'store' )? 'tangoreview' : inputData?.permissionType === 'review' ? 'review' : ( ticketsFeature && !ticketsApproveFeature )? 'review':'approve';
|
|
2586
2586
|
} else if ( inputData.sortBy === 'storeRevisedAccuracy' ) {
|
|
2587
2587
|
sortKey = 'revicedPerc';
|
|
2588
2588
|
requestedSortType = 'tagging';
|
|
@@ -3845,13 +3845,7 @@ export async function ticketList( req, res ) {
|
|
|
3845
3845
|
'storeName': item?.storeName,
|
|
3846
3846
|
'ticketRaised': item?.mappingInfo?.find( ( f ) => f?.type === 'tangoreview' )?.createdAt,
|
|
3847
3847
|
'issueDate': item?.dateString,
|
|
3848
|
-
'dueDate': ( () =>
|
|
3849
|
-
if ( Array.isArray( item?.mappingInfo ) ) {
|
|
3850
|
-
const filtered = item.mappingInfo.filter( ( f ) => f?.dueDate && f?.type !== 'tangoreview' );
|
|
3851
|
-
return filtered.length > 0 ? filtered[filtered.length - 1].dueDate : '';
|
|
3852
|
-
}
|
|
3853
|
-
return '';
|
|
3854
|
-
} )(),
|
|
3848
|
+
'dueDate': item?.mappingInfo?.find( ( f ) => f.type === 'tangoreview' )?.dueDate,
|
|
3855
3849
|
'footfall': item?.footfallCount,
|
|
3856
3850
|
'storeRevisedAccuracy': item?.mappingInfo?.find( ( f ) => f.type === 'tagging' )?.revicedPerc || '--',
|
|
3857
3851
|
'reviewerRevisedAccuracy': item?.mappingInfo?.find( ( f ) => f.type === 'review' )?.revicedPerc || '--',
|