tango-app-api-analysis-traffic 3.3.1-alpha.22 → 3.3.1-alpha.23
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
|
@@ -43,6 +43,7 @@ export async function revoptagging( req, res ) {
|
|
|
43
43
|
},
|
|
44
44
|
},
|
|
45
45
|
};
|
|
46
|
+
|
|
46
47
|
let respo= await getOpenSearchData( openSearch.revops, searchQuery );
|
|
47
48
|
const revopData = respo?.body?.hits?.hits;
|
|
48
49
|
console.log( '====>', revopData );
|
|
@@ -76,11 +77,11 @@ export async function getrevoptagging( req, res ) {
|
|
|
76
77
|
'storeId.keyword': req.body.storeId,
|
|
77
78
|
},
|
|
78
79
|
},
|
|
79
|
-
{
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
},
|
|
80
|
+
// {
|
|
81
|
+
// 'term': {
|
|
82
|
+
// 'processType': req.body.processType,
|
|
83
|
+
// },
|
|
84
|
+
// },
|
|
84
85
|
{
|
|
85
86
|
'term': {
|
|
86
87
|
'dateString': req.body.dateString,
|
|
@@ -791,47 +791,27 @@ export const performanceMatrixV3 = async ( req, res ) => {
|
|
|
791
791
|
if ( resultData ) {
|
|
792
792
|
if ( resultData.status_code == '200' ) {
|
|
793
793
|
let data = [];
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
794
|
+
resultData.performanceData.forEach( ( item, index ) => {
|
|
795
|
+
let findprevIndex = data.findLastIndex( ( ele ) => ele.position == item.position );
|
|
796
|
+
if ( findprevIndex != -1 ) {
|
|
797
|
+
item.top = data[findprevIndex].top + 7;
|
|
798
|
+
item.left = data[findprevIndex].left + 5;
|
|
798
799
|
} else {
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
let num = index < 5 ? 0 : index < 10 ? 10 : 20;
|
|
809
|
-
let left = data[findLastIndex].left;
|
|
810
|
-
let leftNum = 8;
|
|
811
|
-
if ( [ 0, 5, 10 ].includes( index ) ) {
|
|
812
|
-
left = data[findprevIndex].left;
|
|
813
|
-
leftNum = 0;
|
|
814
|
-
}
|
|
815
|
-
console.log( leftNum );
|
|
816
|
-
item.top = data[findprevIndex].top + num;
|
|
817
|
-
item.left = left + leftNum;
|
|
800
|
+
if ( item.position == 'High_Low' ) {
|
|
801
|
+
item.left = 5;
|
|
802
|
+
item.top = 10;
|
|
803
|
+
} else if ( item.position == 'High_High' ) {
|
|
804
|
+
item.left = 50;
|
|
805
|
+
item.top = 10;
|
|
806
|
+
} else if ( item.position == 'Low_Low' ) {
|
|
807
|
+
item.left = 5;
|
|
808
|
+
item.top = 55;
|
|
818
809
|
} else {
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
item.top = 10;
|
|
822
|
-
} else if ( item.position == 'High_High' ) {
|
|
823
|
-
item.left = 55;
|
|
824
|
-
item.top = 10;
|
|
825
|
-
} else if ( item.position == 'Low_Low' ) {
|
|
826
|
-
item.left = 3;
|
|
827
|
-
item.top = 55;
|
|
828
|
-
} else {
|
|
829
|
-
item.left = 55;
|
|
830
|
-
item.top = 55;
|
|
831
|
-
}
|
|
810
|
+
item.left = 50;
|
|
811
|
+
item.top = 55;
|
|
832
812
|
}
|
|
833
|
-
|
|
834
|
-
|
|
813
|
+
}
|
|
814
|
+
data.push( item );
|
|
835
815
|
} );
|
|
836
816
|
resultData.performanceData = data;
|
|
837
817
|
return res.sendSuccess( resultData );
|
|
@@ -194,7 +194,6 @@ export const validateperformanceMatrixSchema = joi.object( {
|
|
|
194
194
|
...baseSchema,
|
|
195
195
|
processtype1: joi.string().required(),
|
|
196
196
|
processtype2: joi.string().required(),
|
|
197
|
-
topStores: joi.number().optional().allow( '' ),
|
|
198
197
|
} );
|
|
199
198
|
|
|
200
199
|
export const validateperformanceMatrixParams = {
|