tango-app-api-task 3.7.9 → 3.7.11
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-task",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.11",
|
|
4
4
|
"description": "Task",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"mongodb": "^6.10.0",
|
|
26
26
|
"nodemon": "^3.1.7",
|
|
27
27
|
"npm": "^10.9.2",
|
|
28
|
-
"tango-api-schema": "^2.
|
|
28
|
+
"tango-api-schema": "^2.5.32",
|
|
29
29
|
"tango-app-api-middleware": "^3.6.8",
|
|
30
30
|
"winston": "^3.17.0",
|
|
31
31
|
"winston-daily-rotate-file": "^5.0.0"
|
|
@@ -4714,6 +4714,11 @@ export async function updateAssign( req, res ) {
|
|
|
4714
4714
|
},
|
|
4715
4715
|
];
|
|
4716
4716
|
let assignUserDetails = await userService.aggregate( query );
|
|
4717
|
+
let storeProfileDetails;
|
|
4718
|
+
if ( req.body.coverage == 'store' ) {
|
|
4719
|
+
let storeList = req.body.assignedList.map( ( ele ) => ele?.storeId );
|
|
4720
|
+
storeProfileDetails = await storeService.find( { storeId: { $in: storeList } }, { storeId: 1, city: '$storeProfile.city', country: '$storeProfile.country', state: '$storeProfile.state' } );
|
|
4721
|
+
}
|
|
4717
4722
|
for ( let assign of req.body.assignedList ) {
|
|
4718
4723
|
let userDetails = assignUserDetails.find( ( ele ) => ele.email.toLowerCase() == assign.userEmail.toLowerCase() );
|
|
4719
4724
|
if ( !userDetails ) {
|
|
@@ -4736,6 +4741,14 @@ export async function updateAssign( req, res ) {
|
|
|
4736
4741
|
userId: userDetails?._id,
|
|
4737
4742
|
checkListName: taskDetails.checkListName,
|
|
4738
4743
|
};
|
|
4744
|
+
if ( assign?.storeId ) {
|
|
4745
|
+
let findStore = storeProfileDetails.find( ( ele ) => ele.storeId == assign?.storeId )?.toObject();
|
|
4746
|
+
if ( findStore ) {
|
|
4747
|
+
data.city = findStore.city;
|
|
4748
|
+
data.country = findStore.country;
|
|
4749
|
+
data.state = findStore.state;
|
|
4750
|
+
}
|
|
4751
|
+
}
|
|
4739
4752
|
delete data._id;
|
|
4740
4753
|
assignedUserList.push( data );
|
|
4741
4754
|
}
|
|
@@ -5057,6 +5070,7 @@ export async function taskcreation( req, res ) {
|
|
|
5057
5070
|
let clientDetails = await clientService.findOne( { clientId: inputBody?.clientId }, { traxVideoUploadTimeLimit: 1 } );
|
|
5058
5071
|
data['videoUploadTimeLimit'] = clientDetails?.traxVideoUploadTimeLimit || 0;
|
|
5059
5072
|
data['approver'] = userAdmin;
|
|
5073
|
+
data['allowUploadFromGallery'] = true;
|
|
5060
5074
|
|
|
5061
5075
|
let response = await taskService.create( data );
|
|
5062
5076
|
if ( response?.approver.length ) {
|