tango-app-api-client 3.3.3-beta.13 → 3.3.3-beta.14
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
|
@@ -999,20 +999,23 @@ export async function updateFeatureConfiguration( req, res ) {
|
|
|
999
999
|
}
|
|
1000
1000
|
|
|
1001
1001
|
await postApi( `${url.oldapidomain}/oldBrandUpdate/${data?._id}`, { brandConfigs: data.brandConfigs } );
|
|
1002
|
-
|
|
1003
|
-
|
|
1002
|
+
const keysArray = [
|
|
1003
|
+
'isExcludedArea', 'isPasserByData', 'isNormalized', 'isbillingDisabled',
|
|
1004
|
+
'isCameraDisabled', 'isFootfallDirectory', 'isNOB', 'isNewTraffic',
|
|
1005
|
+
'isTrax', 'isNewZone', 'isNewReports', 'isNewDashboard', 'streamBy',
|
|
1006
|
+
];
|
|
1004
1007
|
const logObj = {
|
|
1005
1008
|
clientId: req.params?.id,
|
|
1006
1009
|
userName: user?.userName,
|
|
1007
1010
|
email: user?.email,
|
|
1008
1011
|
date: new Date(),
|
|
1009
1012
|
logType: 'configuration',
|
|
1010
|
-
logSubType:
|
|
1013
|
+
logSubType: Object.keys( inputData ).some( ( key ) => keysArray.includes( key ) ) ? 'dashboardConfig' : 'featureConfig',
|
|
1011
1014
|
changes: updateKeys,
|
|
1012
1015
|
eventType: 'update',
|
|
1013
1016
|
showTo: [ 'client', 'tango' ],
|
|
1014
|
-
|
|
1015
|
-
current: postData,
|
|
1017
|
+
previous: previousData.featureConfigs,
|
|
1018
|
+
current: postData.featureConfigs,
|
|
1016
1019
|
};
|
|
1017
1020
|
if ( updateKeys.length ) {
|
|
1018
1021
|
await insertOpenSearchData( openSearch.activityLog, logObj );
|
|
@@ -2089,16 +2092,18 @@ export async function getActivityLogs( req, res ) {
|
|
|
2089
2092
|
|
|
2090
2093
|
const hits = logs?.body?.hits?.hits;
|
|
2091
2094
|
const totalDocuments = logs?.body?.hits?.total?.value;
|
|
2095
|
+
|
|
2092
2096
|
let temp = [];
|
|
2093
2097
|
if ( totalDocuments ) {
|
|
2094
2098
|
hits.map( ( hit, i ) => {
|
|
2095
2099
|
let respo ={};
|
|
2096
|
-
|
|
2100
|
+
hit._source.logSubType = hit._source.logSubType === 'documentUpload'? 'documentsUpload': hit?._source?.logSubType;
|
|
2097
2101
|
if ( ( ( hit?._source?.eventType ).match( /update/ ) || ( hit?._source?.eventType ).match( /edit/ ) )&& hit?._source?.previous ) {
|
|
2098
2102
|
const previous = hit?._source?.previous;
|
|
2099
2103
|
const current=hit?._source?.current;
|
|
2100
2104
|
const logType =hit?._source?.logType;
|
|
2101
|
-
|
|
2105
|
+
|
|
2106
|
+
const logSubType =hit?._source?.logSubType;
|
|
2102
2107
|
respo = findDifferences( previous, current, logType, logSubType );
|
|
2103
2108
|
hit._source.updatedValue = respo;
|
|
2104
2109
|
temp.push( hit?._source );
|