tango-app-api-trax 3.7.29 → 3.7.30
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tango-app-api-trax",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.30",
|
|
4
4
|
"description": "Trax",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"mongodb": "^6.8.0",
|
|
28
28
|
"nodemon": "^3.1.4",
|
|
29
29
|
"path": "^0.12.7",
|
|
30
|
-
"tango-api-schema": "^2.
|
|
30
|
+
"tango-api-schema": "^2.5.32",
|
|
31
31
|
"tango-app-api-middleware": "^3.5.2",
|
|
32
32
|
"url": "^0.11.4",
|
|
33
33
|
"winston": "^3.13.1",
|
|
@@ -4493,11 +4493,7 @@ export async function updateAssign( req, res ) {
|
|
|
4493
4493
|
} else {
|
|
4494
4494
|
removed = { user: [], store: [] };
|
|
4495
4495
|
}
|
|
4496
|
-
|
|
4497
|
-
if ( req.body.coverage == 'store' ) {
|
|
4498
|
-
let storeList = req.body.assignedList.map( ( ele ) => ele?.storeId );
|
|
4499
|
-
storeProfileDetails = await storeService.find( { storeId: { $in: storeList } }, { storeId: 1, city: '$storeProfile.city', country: '$storeProfile.country' } );
|
|
4500
|
-
}
|
|
4496
|
+
|
|
4501
4497
|
await assignedService.deleteMany( { checkListId: req.body.checkListId } );
|
|
4502
4498
|
let assignedUserList = [];
|
|
4503
4499
|
let userEmailList = req.body.assignedList.map( ( ele ) => ele.userEmail.toLowerCase() );
|
|
@@ -4515,6 +4511,10 @@ export async function updateAssign( req, res ) {
|
|
|
4515
4511
|
},
|
|
4516
4512
|
];
|
|
4517
4513
|
let assignUserDetails = await userService.aggregate( query );
|
|
4514
|
+
if ( req.body.coverage == 'store' ) {
|
|
4515
|
+
let storeList = req.body.assignedList.map( ( ele ) => ele?.storeId );
|
|
4516
|
+
storeProfileDetails = await storeService.find( { storeId: { $in: storeList } }, { storeId: 1, city: '$storeProfile.city', country: '$storeProfile.country', state: '$storeProfile.state' } );
|
|
4517
|
+
}
|
|
4518
4518
|
for ( let assign of req.body.assignedList ) {
|
|
4519
4519
|
let userDetails = assignUserDetails.find( ( ele ) => ele.email.toLowerCase() == assign.userEmail.toLowerCase() );
|
|
4520
4520
|
if ( !userDetails ) {
|
|
@@ -4542,6 +4542,7 @@ export async function updateAssign( req, res ) {
|
|
|
4542
4542
|
if ( findStore ) {
|
|
4543
4543
|
data.city = findStore.city;
|
|
4544
4544
|
data.country = findStore.country;
|
|
4545
|
+
data.state = findStore.state;
|
|
4545
4546
|
}
|
|
4546
4547
|
}
|
|
4547
4548
|
delete data._id;
|