tango-app-api-client 3.6.5-vms.20 → 3.6.5-vms.22
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
|
@@ -2946,12 +2946,76 @@ export async function getrevopconfig( req, res ) {
|
|
|
2946
2946
|
export async function updateFDConfig( req, res ) {
|
|
2947
2947
|
try {
|
|
2948
2948
|
const inputData = req.body;
|
|
2949
|
+
const { taggingLimitation, ...otherData } = inputData;
|
|
2949
2950
|
const inputQuery = req.query;
|
|
2950
2951
|
const query ={
|
|
2951
2952
|
clientId: inputQuery.clientId,
|
|
2952
2953
|
};
|
|
2954
|
+
if ( taggingLimitation ) {
|
|
2955
|
+
const newValues = taggingLimitation;
|
|
2956
|
+
const today = new Date().toISOString().split( 'T' )[0];
|
|
2957
|
+
const getUpdateData = await clientModel.updateOne(
|
|
2958
|
+
{
|
|
2959
|
+
'clientId': inputQuery.clientId,
|
|
2960
|
+
'footfallDirectoryConfigs.taggingLimitation.effectiveFrom': today,
|
|
2961
|
+
},
|
|
2962
|
+
{
|
|
2963
|
+
$set: {
|
|
2964
|
+
'footfallDirectoryConfigs.taggingLimitation.$.values': newValues,
|
|
2965
|
+
},
|
|
2966
|
+
},
|
|
2967
|
+
);
|
|
2968
|
+
|
|
2969
|
+
if ( getUpdateData?.matchedCount === 0 ) {
|
|
2970
|
+
await clientModel.updateOne(
|
|
2971
|
+
{ clientId: inputQuery.clientId },
|
|
2972
|
+
{
|
|
2973
|
+
$push: {
|
|
2974
|
+
'footfallDirectoryConfigs.taggingLimitation': {
|
|
2975
|
+
effectiveFrom: today,
|
|
2976
|
+
values: newValues,
|
|
2977
|
+
},
|
|
2978
|
+
},
|
|
2979
|
+
},
|
|
2980
|
+
);
|
|
2981
|
+
}
|
|
2982
|
+
}
|
|
2983
|
+
|
|
2953
2984
|
// update the footfall directory configuration data
|
|
2954
|
-
let
|
|
2985
|
+
let record = {};
|
|
2986
|
+
if ( otherData?.contactEmail ) {
|
|
2987
|
+
record['footfallDirectoryConfigs.contactEmail'] =otherData?.contactEmail;
|
|
2988
|
+
}
|
|
2989
|
+
|
|
2990
|
+
if ( otherData?.revision ) {
|
|
2991
|
+
record['footfallDirectoryConfigs.revision'] =otherData?.revision;
|
|
2992
|
+
}
|
|
2993
|
+
|
|
2994
|
+
if ( otherData?.allowImageView ) {
|
|
2995
|
+
record['footfallDirectoryConfigs.allowImageView'] =otherData?.allowImageView;
|
|
2996
|
+
}
|
|
2997
|
+
|
|
2998
|
+
if ( otherData?.allowTicketCreation ) {
|
|
2999
|
+
record['footfallDirectoryConfigs.allowTicketCreation'] =otherData?.allowTicketCreation;
|
|
3000
|
+
}
|
|
3001
|
+
|
|
3002
|
+
if ( otherData?.isAutoCloseEnable ) {
|
|
3003
|
+
record['footfallDirectoryConfigs.isAutoCloseEnable'] =otherData?.isAutoCloseEnable;
|
|
3004
|
+
}
|
|
3005
|
+
|
|
3006
|
+
if ( otherData?.autoCloseAccuracy ) {
|
|
3007
|
+
record['footfallDirectoryConfigs.autoCloseAccuracy'] =otherData?.autoCloseAccuracy;
|
|
3008
|
+
}
|
|
3009
|
+
|
|
3010
|
+
if ( otherData?.accuracyBreach ) {
|
|
3011
|
+
record['footfallDirectoryConfigs.accuracyBreach'] =otherData?.accuracyBreach;
|
|
3012
|
+
}
|
|
3013
|
+
|
|
3014
|
+
if ( otherData?.tangoReview ) {
|
|
3015
|
+
record['footfallDirectoryConfigs.tangoReview'] =otherData?.tangoReview;
|
|
3016
|
+
}
|
|
3017
|
+
|
|
3018
|
+
let result = await updateOneClient( query, record );
|
|
2955
3019
|
if ( result?.acknowledged === true ) {
|
|
2956
3020
|
return res.sendSuccess( result );
|
|
2957
3021
|
} else {
|
|
@@ -192,6 +192,9 @@ export async function getAuditFile( req, res ) {
|
|
|
192
192
|
terms: { EmployeeStatusFinal: [ 1, 2 ] },
|
|
193
193
|
},
|
|
194
194
|
],
|
|
195
|
+
'must_not': [
|
|
196
|
+
{ term: { outputCluster: 0 } },
|
|
197
|
+
],
|
|
195
198
|
'should': [
|
|
196
199
|
{ 'term': { 'isJunk': false } },
|
|
197
200
|
{ 'bool': { 'must_not': { 'exists': { 'field': 'isJunk' } } } },
|
|
@@ -439,7 +442,7 @@ export async function reAssignAudit( req, res ) {
|
|
|
439
442
|
const openSearch = JSON.parse( process.env.OPENSEARCH );
|
|
440
443
|
let inputData = req.body;
|
|
441
444
|
let docId = `${inputData.storeId}_${inputData.dateString}_internal_footfall-directory-tagging`;
|
|
442
|
-
if ( inputData.tickettype ==='store' ) {
|
|
445
|
+
if ( inputData.tickettype === 'store' ) {
|
|
443
446
|
docId = `${inputData.storeId}_${inputData.dateString}_footfall-directory-tagging`;
|
|
444
447
|
}
|
|
445
448
|
console.log( '🚀 ~ getAuditFile ~ docId:draft', docId );
|
package/src/dtos/client.dtos.js
CHANGED