tango-app-api-task 3.7.9 → 3.7.10

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.9",
3
+ "version": "3.7.10",
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.4.30",
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,10 @@ export async function updateAssign( req, res ) {
4714
4714
  },
4715
4715
  ];
4716
4716
  let assignUserDetails = await userService.aggregate( query );
4717
+ if ( req.body.coverage == 'store' ) {
4718
+ let storeList = req.body.assignedList.map( ( ele ) => ele?.storeId );
4719
+ storeProfileDetails = await storeService.find( { storeId: { $in: storeList } }, { storeId: 1, city: '$storeProfile.city', country: '$storeProfile.country', state: '$storeProfile.state' } );
4720
+ }
4717
4721
  for ( let assign of req.body.assignedList ) {
4718
4722
  let userDetails = assignUserDetails.find( ( ele ) => ele.email.toLowerCase() == assign.userEmail.toLowerCase() );
4719
4723
  if ( !userDetails ) {
@@ -4736,6 +4740,14 @@ export async function updateAssign( req, res ) {
4736
4740
  userId: userDetails?._id,
4737
4741
  checkListName: taskDetails.checkListName,
4738
4742
  };
4743
+ if ( assign?.storeId ) {
4744
+ let findStore = storeProfileDetails.find( ( ele ) => ele.storeId == assign?.storeId )?.toObject();
4745
+ if ( findStore ) {
4746
+ data.city = findStore.city;
4747
+ data.country = findStore.country;
4748
+ data.state = findStore.state;
4749
+ }
4750
+ }
4739
4751
  delete data._id;
4740
4752
  assignedUserList.push( data );
4741
4753
  }
@@ -5057,6 +5069,7 @@ export async function taskcreation( req, res ) {
5057
5069
  let clientDetails = await clientService.findOne( { clientId: inputBody?.clientId }, { traxVideoUploadTimeLimit: 1 } );
5058
5070
  data['videoUploadTimeLimit'] = clientDetails?.traxVideoUploadTimeLimit || 0;
5059
5071
  data['approver'] = userAdmin;
5072
+ data['allowUploadFromGallery'] = true;
5060
5073
 
5061
5074
  let response = await taskService.create( data );
5062
5075
  if ( response?.approver.length ) {