tango-app-api-analysis-zone 3.7.1-alpha.12 → 3.7.1-alpha.13
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
|
@@ -936,7 +936,6 @@ export const getNewZoneShopperAnalysisV1 = async ( req, res ) => {
|
|
|
936
936
|
}
|
|
937
937
|
|
|
938
938
|
reqestData.featureConfigs = getClientData.featureConfigs;
|
|
939
|
-
|
|
940
939
|
const LamdaURL =
|
|
941
940
|
'https://sekueyolczfjl2ggy4hadzxxxu0zqcmt.lambda-url.ap-south-1.on.aws/';
|
|
942
941
|
|
|
@@ -948,9 +947,12 @@ export const getNewZoneShopperAnalysisV1 = async ( req, res ) => {
|
|
|
948
947
|
if ( reqestData.export && resultData.shopperJourneyExportData?.length ) {
|
|
949
948
|
const finalRow = {
|
|
950
949
|
'Overall FF': resultData['Overall FF'] ?? 0,
|
|
951
|
-
'NOB': resultData.NoB ?? 0,
|
|
952
950
|
};
|
|
953
|
-
|
|
951
|
+
if ( reqestData.featureConfigs?.isNOB ) {
|
|
952
|
+
finalRow['NOB'] = resultData.NoB ?? 0;
|
|
953
|
+
} else {
|
|
954
|
+
finalRow['Conversion'] = resultData.NoB ?? 0;
|
|
955
|
+
}
|
|
954
956
|
resultData.shopperJourneyExportData.forEach( ( zoneObj ) => {
|
|
955
957
|
Object.entries( zoneObj ).forEach( ( [ key, value ] ) => {
|
|
956
958
|
finalRow[key] = value ?? 0;
|
|
@@ -1051,7 +1053,7 @@ export const getOverallStoreCardsV1 = async ( req, res ) => {
|
|
|
1051
1053
|
|
|
1052
1054
|
async function getClientConfig( clientId ) {
|
|
1053
1055
|
try {
|
|
1054
|
-
let getClientData = await clientService.findOne( { clientId: clientId }, { 'paymentInvoice.currencyType': 1, 'averageTransactionValue': 1, 'featureConfigs.billableCalculation': 1, 'featureConfigs.missedOpportunityCalculation': 1, 'featureConfigs.conversionCalculation': 1, 'featureConfigs.open': 1, 'featureConfigs.close': 1, 'isFootfallAuditStores': 1, 'clientName': 1 } );
|
|
1056
|
+
let getClientData = await clientService.findOne( { clientId: clientId }, { 'paymentInvoice.currencyType': 1, 'averageTransactionValue': 1, 'featureConfigs.billableCalculation': 1, 'featureConfigs.missedOpportunityCalculation': 1, 'featureConfigs.conversionCalculation': 1, 'featureConfigs.open': 1, 'featureConfigs.close': 1, 'isFootfallAuditStores': 1, 'clientName': 1, 'featureConfigs.isNOB': 1 } );
|
|
1055
1057
|
if ( !getClientData ) {
|
|
1056
1058
|
return false;
|
|
1057
1059
|
}
|
|
@@ -47,6 +47,7 @@ export const validateZoneSummaryTableSchema = joi.object( {
|
|
|
47
47
|
limit: joi.number().required(),
|
|
48
48
|
offset: joi.number().required(),
|
|
49
49
|
export: joi.boolean().required(),
|
|
50
|
+
nob: joi.boolean().optional().allow( '' ),
|
|
50
51
|
} );
|
|
51
52
|
|
|
52
53
|
export const validateZoneSummaryTableParams = {
|