tango-app-api-infra 3.9.5-vms.86 → 3.9.5-vms.88
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
|
@@ -26,7 +26,7 @@ export async function createTicket( req, res ) {
|
|
|
26
26
|
inputData.userName = req?.user?.userName;
|
|
27
27
|
inputData.email = req?.user?.email;
|
|
28
28
|
inputData.role = req?.user?.role;
|
|
29
|
-
inputData.status = '
|
|
29
|
+
inputData.status = 'Open';
|
|
30
30
|
inputData.duplicateACCount = 0;
|
|
31
31
|
inputData.employeeACCount = 0;
|
|
32
32
|
inputData.houseKeepingACCount = 0;
|
|
@@ -78,7 +78,7 @@ export async function createinternalTicket( req, res ) {
|
|
|
78
78
|
ticketId: 'TE_FDT_' + new Date().valueOf(),
|
|
79
79
|
createdAt: new Date(),
|
|
80
80
|
updatedAt: new Date(),
|
|
81
|
-
status: '
|
|
81
|
+
status: 'Open',
|
|
82
82
|
comments: inputData?.comments || '',
|
|
83
83
|
createdByEmail: req?.user?.email,
|
|
84
84
|
createdByUserName: req?.user?.userName,
|
|
@@ -259,6 +259,7 @@ export async function tangoReviewTicket( req, res ) {
|
|
|
259
259
|
createdByEmail: req?.user?.email,
|
|
260
260
|
createdByUserName: req?.user?.userName,
|
|
261
261
|
createdByRole: req?.user?.role,
|
|
262
|
+
createdAt: new Date(),
|
|
262
263
|
} ) );
|
|
263
264
|
|
|
264
265
|
record.mappingInfo = [ ...ticketData?.[0]?._source?.mappingInfo.slice( 0, -1 ),
|
|
@@ -308,6 +309,7 @@ export async function tangoReviewTicket( req, res ) {
|
|
|
308
309
|
createdByEmail: req?.user?.email,
|
|
309
310
|
createdByUserName: req?.user?.userName,
|
|
310
311
|
createdByRole: req?.user?.role,
|
|
312
|
+
createdAt: new Date(),
|
|
311
313
|
} ) );
|
|
312
314
|
|
|
313
315
|
record.mappingInfo = [ ...ticketData?.[0]?._source?.mappingInfo.slice( 0, -1 ),
|
|
@@ -4894,6 +4896,7 @@ export async function updateUserTicketStatus( req, res ) {
|
|
|
4894
4896
|
...lastEntry,
|
|
4895
4897
|
status: 'In-Progress',
|
|
4896
4898
|
updatedAt: currentTime,
|
|
4899
|
+
createdAt: currentTime,
|
|
4897
4900
|
createdByRole: req?.user?.role || '',
|
|
4898
4901
|
createdByEmail: req?.user?.email || '',
|
|
4899
4902
|
createdByUserName: req?.user?.userName || '',
|
|
@@ -1869,10 +1869,12 @@ export async function ticketApprove( req, res, next ) {
|
|
|
1869
1869
|
const revised = Number( Math.round( ( revisedFootfall / footfallCount ) * 100 || 0 ) );
|
|
1870
1870
|
const tangoReview = Number( getConfig?.footfallDirectoryConfigs?.tangoReview?.split( '%' )[0] );
|
|
1871
1871
|
// If autoclose enabled and revisedPercentage meets/exceeds threshold, close ticket and skip revision
|
|
1872
|
+
logger.info( { revised, tangoReview } );
|
|
1872
1873
|
if (
|
|
1873
1874
|
isAutoCloseEnable === true &&
|
|
1874
1875
|
revisedPercentage >= autoCloseAccuracyValue
|
|
1875
1876
|
) {
|
|
1877
|
+
logger.info( { revisedPercentage, autoCloseAccuracyValue, isAutoCloseEnable } );
|
|
1876
1878
|
record.status = 'Approver-Closed';
|
|
1877
1879
|
// Only keep or modify mappingInfo items with type "review"
|
|
1878
1880
|
if ( Array.isArray( record.mappingInfo ) ) {
|
|
@@ -1891,6 +1893,7 @@ export async function ticketApprove( req, res, next ) {
|
|
|
1891
1893
|
createdByEmail: req?.user?.email,
|
|
1892
1894
|
createdByUserName: req?.user?.userName,
|
|
1893
1895
|
createdByRole: req?.user?.role,
|
|
1896
|
+
createdAt: new Date(),
|
|
1894
1897
|
} ) );
|
|
1895
1898
|
|
|
1896
1899
|
record.mappingInfo = [ ...ticketData?.[0]?._source?.mappingInfo.slice( 0, -1 ),
|
|
@@ -1919,6 +1922,7 @@ export async function ticketApprove( req, res, next ) {
|
|
|
1919
1922
|
createdByEmail: req?.user?.email,
|
|
1920
1923
|
createdByUserName: req?.user?.userName,
|
|
1921
1924
|
createdByRole: req?.user?.role,
|
|
1925
|
+
createdAt: new Date(),
|
|
1922
1926
|
} );
|
|
1923
1927
|
}
|
|
1924
1928
|
}
|
|
@@ -1939,6 +1943,7 @@ export async function ticketApprove( req, res, next ) {
|
|
|
1939
1943
|
},
|
|
1940
1944
|
);
|
|
1941
1945
|
} else if ( revised < tangoReview ) {
|
|
1946
|
+
logger.info( { revised, tangoReview } );
|
|
1942
1947
|
// If ticket is closed, do not proceed with revision mapping
|
|
1943
1948
|
|
|
1944
1949
|
// Default fallbacks
|
|
@@ -1963,6 +1968,7 @@ export async function ticketApprove( req, res, next ) {
|
|
|
1963
1968
|
createdByEmail: req?.user?.email,
|
|
1964
1969
|
createdByUserName: req?.user?.userName,
|
|
1965
1970
|
createdByRole: req?.user?.role,
|
|
1971
|
+
createdAt: new Date(),
|
|
1966
1972
|
} ) );
|
|
1967
1973
|
|
|
1968
1974
|
record.mappingInfo = [ ...ticketData?.[0]?._source?.mappingInfo.slice( 0, -1 ),
|
|
@@ -1978,10 +1984,11 @@ export async function ticketApprove( req, res, next ) {
|
|
|
1978
1984
|
reviced: Number( Math.round( ( revisedFootfall / footfallCount ) * 100 || 0 ) ),
|
|
1979
1985
|
count: tempAcc,
|
|
1980
1986
|
revisedDetail: formattedTaggingData,
|
|
1981
|
-
status: '
|
|
1987
|
+
status: 'Under Tango Review',
|
|
1982
1988
|
createdByEmail: req?.user?.email,
|
|
1983
1989
|
createdByUserName: req?.user?.userName,
|
|
1984
1990
|
createdByRole: req?.user?.role,
|
|
1991
|
+
createdAt: new Date(),
|
|
1985
1992
|
} );
|
|
1986
1993
|
}
|
|
1987
1994
|
}
|
|
@@ -2011,6 +2018,7 @@ export async function ticketApprove( req, res, next ) {
|
|
|
2011
2018
|
record.mappingInfo.push( tangoReviewMapping );
|
|
2012
2019
|
}
|
|
2013
2020
|
} else {
|
|
2021
|
+
logger.info( { msg: '...............1', revised, tangoReview } );
|
|
2014
2022
|
if ( Array.isArray( record.mappingInfo ) ) {
|
|
2015
2023
|
const temp = record.mappingInfo
|
|
2016
2024
|
.filter( ( item ) => item.type === 'approve' )
|
|
@@ -2026,6 +2034,7 @@ export async function ticketApprove( req, res, next ) {
|
|
|
2026
2034
|
createdByEmail: req?.user?.email,
|
|
2027
2035
|
createdByUserName: req?.user?.userName,
|
|
2028
2036
|
createdByRole: req?.user?.role,
|
|
2037
|
+
createdAt: new Date(),
|
|
2029
2038
|
} ) );
|
|
2030
2039
|
|
|
2031
2040
|
record.mappingInfo = [ ...ticketData?.[0]?._source?.mappingInfo.slice( 0, -1 ),
|
|
@@ -2052,6 +2061,7 @@ export async function ticketApprove( req, res, next ) {
|
|
|
2052
2061
|
createdByEmail: req?.user?.email,
|
|
2053
2062
|
createdByUserName: req?.user?.userName,
|
|
2054
2063
|
createdByRole: req?.user?.role,
|
|
2064
|
+
createdAt: new Date(),
|
|
2055
2065
|
} );
|
|
2056
2066
|
}
|
|
2057
2067
|
}
|
|
@@ -2072,7 +2082,6 @@ export async function ticketApprove( req, res, next ) {
|
|
|
2072
2082
|
},
|
|
2073
2083
|
);
|
|
2074
2084
|
}
|
|
2075
|
-
console.log( req.body, getConfig.footfallDirectoryConfigs.revision );
|
|
2076
2085
|
let checkapprove = getConfig.footfallDirectoryConfigs.revision.filter( ( data ) => data.actionType === 'approver' && data.isChecked === true );
|
|
2077
2086
|
|
|
2078
2087
|
|