tango-app-api-infra 3.9.5-vms.95 → 3.9.5-vms.97
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
|
@@ -222,7 +222,7 @@ export async function tangoReviewTicket( req, res ) {
|
|
|
222
222
|
const getFootfallticketData = await getOpenSearchData( openSearch.footfallDirectory, getTicket );
|
|
223
223
|
const ticketData = getFootfallticketData?.body?.hits?.hits;
|
|
224
224
|
logger.info( { ticketData, msg: '...........9' } );
|
|
225
|
-
if ( !ticketData || ticketData?.length == 0 ) {
|
|
225
|
+
if ( ( !ticketData || ticketData?.length == 0 ) && inputData?.ticketType !== 'internal' ) {
|
|
226
226
|
return res.sendError( 'You don’t have any tagged images right now', 400 );
|
|
227
227
|
}
|
|
228
228
|
|
|
@@ -556,7 +556,7 @@ export async function tangoReviewAccuracyClosedTicket( req, res ) {
|
|
|
556
556
|
const getFootfallticketData = await getOpenSearchData( openSearch.footfallDirectory, getTicket );
|
|
557
557
|
const ticketData = getFootfallticketData?.body?.hits?.hits;
|
|
558
558
|
|
|
559
|
-
if ( !ticketData || ticketData?.length == 0 ) {
|
|
559
|
+
if ( ( !ticketData || ticketData?.length == 0 ) && inputData?.ticketType !== 'internal' ) {
|
|
560
560
|
return res.sendError( 'You don’t have any tagged images right now', 400 );
|
|
561
561
|
}
|
|
562
562
|
|
|
@@ -3188,15 +3188,12 @@ export async function ticketList( req, res ) {
|
|
|
3188
3188
|
'ticketId': item?.ticketId,
|
|
3189
3189
|
'storeId': item?.storeId,
|
|
3190
3190
|
'storeName': item?.storeName,
|
|
3191
|
-
'
|
|
3192
|
-
'
|
|
3193
|
-
'
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
return 'Due Today';
|
|
3198
|
-
}
|
|
3199
|
-
return dayjs( dueDate ).format( 'DD MMM, YYYY' );
|
|
3191
|
+
'ticketRaised': item?.mappingInfo?.find( ( f ) => f?.type === 'tangoreview' )?.createdAt,
|
|
3192
|
+
'issueDate': item?.dateString,
|
|
3193
|
+
'dueDate': ( () => {
|
|
3194
|
+
if ( Array.isArray( item?.mappingInfo ) ) {
|
|
3195
|
+
const filtered = item.mappingInfo.filter( ( f ) => f?.dueDate && f?.type !== 'tangoreview' );
|
|
3196
|
+
return filtered.length > 0 ? filtered[filtered.length - 1].dueDate : '';
|
|
3200
3197
|
}
|
|
3201
3198
|
return '';
|
|
3202
3199
|
} )(),
|
|
@@ -3228,13 +3225,13 @@ export async function ticketList( req, res ) {
|
|
|
3228
3225
|
'Actual FF': item?.footfallCount,
|
|
3229
3226
|
// Use the dueDate from the last mappingInfo item whose type is NOT 'finalRevison'
|
|
3230
3227
|
|
|
3231
|
-
'Due Date': ( () => {
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
} )(),
|
|
3228
|
+
// 'Due Date': ( () => {
|
|
3229
|
+
// if ( Array.isArray( item?.mappingInfo ) ) {
|
|
3230
|
+
// const filtered = item.mappingInfo.filter( ( f ) => f.dueDate && f.type !== 'finalRevison' );
|
|
3231
|
+
// return filtered.length > 0 ? filtered[filtered.length - 1].dueDate : '';
|
|
3232
|
+
// }
|
|
3233
|
+
// return '';
|
|
3234
|
+
// } )(),
|
|
3238
3235
|
'Due Date (Formatted)': ( () => {
|
|
3239
3236
|
if ( Array.isArray( item?.mappingInfo ) ) {
|
|
3240
3237
|
// Find last mappingInfo whose type is NOT 'finalRevison'
|