tango-app-api-infra 3.9.13 → 3.9.15
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
|
@@ -3898,26 +3898,6 @@ export async function ticketList( req, res ) {
|
|
|
3898
3898
|
'Issue Date': item?.dateString ? dayjs( item.dateString ).format( 'DD MMM, YYYY' ) : '',
|
|
3899
3899
|
'Ticket Type': item?.type,
|
|
3900
3900
|
'Actual FF': item?.footfallCount,
|
|
3901
|
-
|
|
3902
|
-
'Due Date (Formatted)': ( () => {
|
|
3903
|
-
if ( Array.isArray( item?.mappingInfo ) ) {
|
|
3904
|
-
// Find last mappingInfo whose type is NOT 'finalRevison'
|
|
3905
|
-
const filtered = item.mappingInfo.filter(
|
|
3906
|
-
( f ) => f.dueDate && f.type !== 'finalRevison',
|
|
3907
|
-
);
|
|
3908
|
-
if ( filtered.length > 0 ) {
|
|
3909
|
-
const lastDueDate = filtered[filtered.length - 1].dueDate;
|
|
3910
|
-
if ( lastDueDate ) {
|
|
3911
|
-
if ( dayjs( lastDueDate ).isSame( dayjs(), 'day' ) ) {
|
|
3912
|
-
return 'Due Today';
|
|
3913
|
-
}
|
|
3914
|
-
return dayjs( lastDueDate ).format( 'DD MMM, YYYY' );
|
|
3915
|
-
}
|
|
3916
|
-
}
|
|
3917
|
-
}
|
|
3918
|
-
return '';
|
|
3919
|
-
} )(),
|
|
3920
|
-
|
|
3921
3901
|
'Store (Accuracy%)': item?.mappingInfo?.find( ( f ) => f.type === 'tagging' )?.revicedPerc || '--',
|
|
3922
3902
|
'Reviewer (Accuracy%)': item?.mappingInfo?.find( ( f ) => f.type === 'review' )?.revicedPerc || '--',
|
|
3923
3903
|
'Approver (Accuracy%)': item?.mappingInfo?.find( ( f ) => f.type === 'approve' )?.revicedPerc || '--',
|
|
@@ -3938,13 +3918,6 @@ export async function ticketList( req, res ) {
|
|
|
3938
3918
|
ticketRaised: item?.createdAt,
|
|
3939
3919
|
issueDate: item?.dateString,
|
|
3940
3920
|
footfall: item?.footfallCount,
|
|
3941
|
-
dueDate: ( () => {
|
|
3942
|
-
if ( Array.isArray( item?.mappingInfo ) ) {
|
|
3943
|
-
const filtered = item.mappingInfo.filter( ( f ) => f?.dueDate && f?.type !== 'finalRevisoon' );
|
|
3944
|
-
return filtered.length > 0 ? filtered[filtered.length - 1].dueDate : '';
|
|
3945
|
-
}
|
|
3946
|
-
return '';
|
|
3947
|
-
} )(),
|
|
3948
3921
|
type: item?.type || 'store',
|
|
3949
3922
|
storeRevisedAccuracy: item?.mappingInfo?.find( ( f ) => f.type === 'tagging' )?.revicedPerc || '--',
|
|
3950
3923
|
reviewerRevisedAccuracy: item?.mappingInfo?.find( ( f ) => f.type === 'review' )?.revicedPerc || '--',
|
|
@@ -4962,6 +4935,11 @@ export async function sendSqsMessage( inputData, tempId, getStoreType, storeId )
|
|
|
4962
4935
|
process_type: 'live',
|
|
4963
4936
|
revop_type: 'footfall',
|
|
4964
4937
|
temp_id: tempId,
|
|
4938
|
+
tempId1: inputData?.log?.temp1 || '',
|
|
4939
|
+
tempIds: inputData?.log?.tempIds || '',
|
|
4940
|
+
mapping: JSON.stringify( inputData?.log?.mapping ) || '',
|
|
4941
|
+
managerEyeZoneHit: inputData?.log?.managerEyeZoneHit || '',
|
|
4942
|
+
managerEyeZoneQuery: inputData?.log?.managerEyeZoneQuery || '',
|
|
4965
4943
|
time: Date.now(),
|
|
4966
4944
|
createdAt: new Date(),
|
|
4967
4945
|
createIST: dayjs().tz( 'Asia/Kolkata' ).format( 'YYYY-MM-DD' ),
|
|
@@ -6227,6 +6205,16 @@ export async function multiCloseTicket( req, res ) {
|
|
|
6227
6205
|
|
|
6228
6206
|
// Find tempIds that exist in both revopInfo results and manager mapping
|
|
6229
6207
|
const temp = [];
|
|
6208
|
+
const temp1 = [];
|
|
6209
|
+
tempIds.filter( ( tid ) => mapping[tid] !== null ? temp1.push( { temp: mapping[tid], managerEye: tid } ) : '' );
|
|
6210
|
+
|
|
6211
|
+
inputData.log = {
|
|
6212
|
+
managerEyeZoneHit: managerEyeZoneHit || '',
|
|
6213
|
+
mapping: mapping || '',
|
|
6214
|
+
tempIds: tempIds || '',
|
|
6215
|
+
temp1: temp1 || '',
|
|
6216
|
+
managerEyeZoneQuery: managerEyeZoneQuery|| '',
|
|
6217
|
+
};
|
|
6230
6218
|
tempIds.filter( ( tid ) => mapping[tid] !== null ? temp.push( { tempId: mapping[tid] } ) : '' );
|
|
6231
6219
|
const isSendMessge = await sendSqsMessage( ticket, temp, getStoreType, storeId );
|
|
6232
6220
|
if ( isSendMessge == true ) {
|
|
@@ -824,6 +824,16 @@ export async function ticketCreation( req, res, next ) {
|
|
|
824
824
|
|
|
825
825
|
// Find tempIds that exist in both revopInfo results and manager mapping
|
|
826
826
|
const temp = [];
|
|
827
|
+
const temp1 = [];
|
|
828
|
+
tempIds.filter( ( tid ) => mapping[tid] !== null ? temp1.push( { temp: mapping[tid], managerEye: tid } ) : '' );
|
|
829
|
+
|
|
830
|
+
inputData.log = {
|
|
831
|
+
managerEyeZoneHit: managerEyeZoneHit || '',
|
|
832
|
+
mapping: mapping || '',
|
|
833
|
+
tempIds: tempIds || '',
|
|
834
|
+
temp1: temp1 || '',
|
|
835
|
+
managerEyeZoneQuery: managerEyeZoneQuery|| '',
|
|
836
|
+
};
|
|
827
837
|
tempIds.filter( ( tid ) => mapping[tid] !== null ? temp.push( { tempId: mapping[tid] } ) : '' );
|
|
828
838
|
const isSendMessge = await sendSqsMessage( inputData, temp, getStoreType, inputData.storeId );
|
|
829
839
|
if ( isSendMessge == true ) {
|
|
@@ -1821,6 +1831,16 @@ export async function ticketReview( req, res, next ) {
|
|
|
1821
1831
|
|
|
1822
1832
|
// Find tempIds that exist in both revopInfo results and manager mapping
|
|
1823
1833
|
const temp = [];
|
|
1834
|
+
const temp1 = [];
|
|
1835
|
+
tempIds.filter( ( tid ) => mapping[tid] !== null ? temp1.push( { temp: mapping[tid], managerEye: tid } ) : '' );
|
|
1836
|
+
|
|
1837
|
+
inputData.log = {
|
|
1838
|
+
managerEyeZoneHit: managerEyeZoneHit || '',
|
|
1839
|
+
mapping: mapping || '',
|
|
1840
|
+
tempIds: tempIds || '',
|
|
1841
|
+
temp1: temp1 || '',
|
|
1842
|
+
managerEyeZoneQuery: managerEyeZoneQuery|| '',
|
|
1843
|
+
};
|
|
1824
1844
|
tempIds.filter( ( tid ) => mapping[tid] !== null ? temp.push( { tempId: mapping[tid] } ) : '' );
|
|
1825
1845
|
const isSendMessge = await sendSqsMessage( inputData, temp, getStoreType, inputData.storeId );
|
|
1826
1846
|
if ( isSendMessge == true ) {
|
|
@@ -2609,6 +2629,16 @@ export async function ticketApprove( req, res, next ) {
|
|
|
2609
2629
|
|
|
2610
2630
|
// Find tempIds that exist in both revopInfo results and manager mapping
|
|
2611
2631
|
const temp = [];
|
|
2632
|
+
const temp1 = [];
|
|
2633
|
+
tempIds.filter( ( tid ) => mapping[tid] !== null ? temp1.push( { temp: mapping[tid], managerEye: tid } ) : '' );
|
|
2634
|
+
|
|
2635
|
+
inputData.log = {
|
|
2636
|
+
managerEyeZoneHit: managerEyeZoneHit || '',
|
|
2637
|
+
mapping: mapping || '',
|
|
2638
|
+
tempIds: tempIds || '',
|
|
2639
|
+
temp1: temp1 || '',
|
|
2640
|
+
managerEyeZoneQuery: managerEyeZoneQuery|| '',
|
|
2641
|
+
};
|
|
2612
2642
|
tempIds.filter( ( tid ) => mapping[tid] !== null ? temp.push( { tempId: mapping[tid] } ) : '' );
|
|
2613
2643
|
const isSendMessge = await sendSqsMessage( inputData, temp, getStoreType, inputData.storeId );
|
|
2614
2644
|
if ( isSendMessge == true ) {
|