tango-app-api-task 3.7.10 → 3.7.12
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
|
@@ -2022,6 +2022,8 @@ export async function createChecklistTask( req, res ) {
|
|
|
2022
2022
|
userId: userDetailList._id,
|
|
2023
2023
|
assignId: response?.coverage == 'store' ? storeDetails?._id : userDetailList._id,
|
|
2024
2024
|
coverage: response?.coverage || 'store',
|
|
2025
|
+
country: storeDetails?.storeProfile?.country ? storeDetails?.storeProfile?.country : '',
|
|
2026
|
+
state: storeDetails?.storeProfile?.state ? storeDetails?.storeProfile?.state : '',
|
|
2025
2027
|
};
|
|
2026
2028
|
await taskAssignService.create( userDetails );
|
|
2027
2029
|
|
|
@@ -2269,6 +2271,8 @@ export async function createChecklistMultiTask( req, res ) {
|
|
|
2269
2271
|
assignId: response?.coverage == 'store' ? storeDetails?._id : findUser._id,
|
|
2270
2272
|
coverage: response?.coverage || 'store',
|
|
2271
2273
|
comments: inputBody?.showcomment ? inputBody.checkListDescription : findcomment?.Comments,
|
|
2274
|
+
country: storeDetails?.storeProfile?.country ? storeDetails?.storeProfile?.country : '',
|
|
2275
|
+
state: storeDetails?.storeProfile?.state ? storeDetails?.storeProfile?.state : '',
|
|
2272
2276
|
};
|
|
2273
2277
|
await taskAssignService.create( userDetails );
|
|
2274
2278
|
// console.log( originaldata?.checklistId );
|
|
@@ -3545,6 +3549,8 @@ export async function createAiChecklist( req, res ) {
|
|
|
3545
3549
|
client_id: inputBody.clientId,
|
|
3546
3550
|
userId: userId,
|
|
3547
3551
|
assignId: storeDetails?._id,
|
|
3552
|
+
country: storeDetails?.storeProfile?.country,
|
|
3553
|
+
state: storeDetails?.storeProfile?.state,
|
|
3548
3554
|
};
|
|
3549
3555
|
await taskAssignService.create( userDetails );
|
|
3550
3556
|
await insertSingleProcessData( response?._id );
|
|
@@ -3771,6 +3777,8 @@ export async function StoreHygienetaskOld( req, res ) {
|
|
|
3771
3777
|
client_id: inputBody.clientId,
|
|
3772
3778
|
userId: userId,
|
|
3773
3779
|
assignId: storeDetails?._id,
|
|
3780
|
+
country: storeDetails?.storeProfile?.country,
|
|
3781
|
+
state: storeDetails?.storeProfile?.state,
|
|
3774
3782
|
|
|
3775
3783
|
};
|
|
3776
3784
|
await taskAssignService.create( userDetails );
|
|
@@ -3998,6 +4006,8 @@ export async function eyeTesttask( req, res ) {
|
|
|
3998
4006
|
client_id: inputBody.clientId,
|
|
3999
4007
|
userId: userId,
|
|
4000
4008
|
assignId: storeDetails?._id,
|
|
4009
|
+
country: storeDetails?.storeProfile?.country,
|
|
4010
|
+
state: storeDetails?.storeProfile?.state,
|
|
4001
4011
|
};
|
|
4002
4012
|
await taskAssignService.create( userDetails );
|
|
4003
4013
|
await insertSingleProcessData( response?._id, true, inputBody );
|
|
@@ -4197,6 +4207,8 @@ export async function createAiTask( req, res ) {
|
|
|
4197
4207
|
client_id: inputBody.clientId,
|
|
4198
4208
|
userId: userId,
|
|
4199
4209
|
assignId: storeDetails?._id,
|
|
4210
|
+
country: storeDetails?.storeProfile?.country,
|
|
4211
|
+
state: storeDetails?.storeProfile?.state,
|
|
4200
4212
|
};
|
|
4201
4213
|
|
|
4202
4214
|
await taskAssignService.create( userDetails );
|
|
@@ -4714,6 +4726,7 @@ export async function updateAssign( req, res ) {
|
|
|
4714
4726
|
},
|
|
4715
4727
|
];
|
|
4716
4728
|
let assignUserDetails = await userService.aggregate( query );
|
|
4729
|
+
let storeProfileDetails;
|
|
4717
4730
|
if ( req.body.coverage == 'store' ) {
|
|
4718
4731
|
let storeList = req.body.assignedList.map( ( ele ) => ele?.storeId );
|
|
4719
4732
|
storeProfileDetails = await storeService.find( { storeId: { $in: storeList } }, { storeId: 1, city: '$storeProfile.city', country: '$storeProfile.country', state: '$storeProfile.state' } );
|
|
@@ -4981,6 +4994,8 @@ export async function commonAiTask( req, res ) {
|
|
|
4981
4994
|
client_id: inputBody.clientId,
|
|
4982
4995
|
userId: userId,
|
|
4983
4996
|
assignId: storeDetails?._id,
|
|
4997
|
+
country: storeDetails?.storeProfile?.country,
|
|
4998
|
+
state: storeDetails?.storeProfile?.state,
|
|
4984
4999
|
};
|
|
4985
5000
|
await taskAssignService.create( userDetails );
|
|
4986
5001
|
await insertSingleProcessData( response?._id );
|
|
@@ -5181,6 +5196,8 @@ export async function taskcreation( req, res ) {
|
|
|
5181
5196
|
client_id: inputBody.clientId,
|
|
5182
5197
|
userId: userId,
|
|
5183
5198
|
assignId: storeDetails?._id,
|
|
5199
|
+
country: storeDetails?.storeProfile?.country,
|
|
5200
|
+
state: storeDetails?.storeProfile?.state,
|
|
5184
5201
|
};
|
|
5185
5202
|
await taskAssignService.create( userDetails );
|
|
5186
5203
|
await insertSingleProcessData( response?._id );
|
|
@@ -5456,6 +5473,8 @@ export async function breachedTasks( req, res ) {
|
|
|
5456
5473
|
client_id: inputBody.clientId,
|
|
5457
5474
|
userId: userId,
|
|
5458
5475
|
assignId: storeDetails._id,
|
|
5476
|
+
country: storeDetails?.storeProfile?.country,
|
|
5477
|
+
state: storeDetails?.storeProfile?.state,
|
|
5459
5478
|
};
|
|
5460
5479
|
await taskAssignService.create( userDetails );
|
|
5461
5480
|
await insertSingleProcessData( response?._id );
|
|
@@ -5705,6 +5724,8 @@ export async function StoreHygienetask( req, res ) {
|
|
|
5705
5724
|
client_id: inputBody.clientId,
|
|
5706
5725
|
userId: userId,
|
|
5707
5726
|
assignId: storeDetails?._id,
|
|
5727
|
+
country: storeDetails?.storeProfile?.country,
|
|
5728
|
+
state: storeDetails?.storeProfile?.state,
|
|
5708
5729
|
};
|
|
5709
5730
|
await taskAssignService.create( userDetails );
|
|
5710
5731
|
await insertSingleProcessData( response?._id );
|
|
@@ -5932,6 +5953,8 @@ export async function eyeTesttaskNew( req, res ) {
|
|
|
5932
5953
|
client_id: inputBody.clientId,
|
|
5933
5954
|
userId: userId,
|
|
5934
5955
|
assignId: storeDetails?._id,
|
|
5956
|
+
country: storeDetails?.storeProfile?.country,
|
|
5957
|
+
state: storeDetails?.storeProfile?.state,
|
|
5935
5958
|
};
|
|
5936
5959
|
await taskAssignService.create( userDetails );
|
|
5937
5960
|
await insertSingleProcessData( response?._id, true, inputBody );
|
|
@@ -6460,6 +6483,8 @@ export async function createTaskGroup( req, res ) {
|
|
|
6460
6483
|
client_id: inputBody.clientId,
|
|
6461
6484
|
userId: userId,
|
|
6462
6485
|
assignId: storeData?._id,
|
|
6486
|
+
country: storeData?.storeProfile?.country,
|
|
6487
|
+
state: storeData?.storeProfile?.state,
|
|
6463
6488
|
};
|
|
6464
6489
|
await taskAssignService.create( userDetails );
|
|
6465
6490
|
await insertSingleProcessData( response?._id );
|
|
@@ -6925,6 +6950,8 @@ export async function createAITaskGroup( req, res ) {
|
|
|
6925
6950
|
client_id: inputBody.clientId,
|
|
6926
6951
|
userId: userId,
|
|
6927
6952
|
assignId: storeData?._id,
|
|
6953
|
+
country: storeData?.storeProfile?.country,
|
|
6954
|
+
state: storeData?.storeProfile?.state,
|
|
6928
6955
|
};
|
|
6929
6956
|
await taskAssignService.create( userDetails );
|
|
6930
6957
|
await insertSingleProcessData( response?._id, false, { aiTask: true } );
|