tango-app-api-task 1.1.0 → 1.1.1
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": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Task",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"mongodb": "^6.10.0",
|
|
25
25
|
"nodemon": "^3.1.7",
|
|
26
26
|
"npm": "^10.9.2",
|
|
27
|
-
"tango-api-schema": "^2.2.
|
|
27
|
+
"tango-api-schema": "^2.2.10",
|
|
28
28
|
"tango-app-api-middleware": "^3.1.43-alpha.10",
|
|
29
29
|
"winston": "^3.17.0",
|
|
30
30
|
"winston-daily-rotate-file": "^5.0.0"
|
|
@@ -1216,6 +1216,7 @@ export async function createChecklistTask( req, res ) {
|
|
|
1216
1216
|
checkListId: response._id,
|
|
1217
1217
|
type: 'task',
|
|
1218
1218
|
client_id: inputBody.clientId,
|
|
1219
|
+
checkListName: inputBody?.checkListName || '',
|
|
1219
1220
|
} );
|
|
1220
1221
|
} );
|
|
1221
1222
|
await traxApprover.insertMany( data );
|
|
@@ -1333,11 +1334,11 @@ export async function approveTask( req, res ) {
|
|
|
1333
1334
|
if ( req.body?.storeId?.length ) {
|
|
1334
1335
|
query['store_id'] = { $in: req.body.storeId };
|
|
1335
1336
|
}
|
|
1336
|
-
let taskDetails = await taskProcessedService.find( query, { _id: 1, checklistStatus: 1, storeName: 1 }
|
|
1337
|
+
let taskDetails = await taskProcessedService.find( query, { _id: 1, checklistStatus: 1, storeName: 1, store_id: 1, userEmail: 1 });
|
|
1337
1338
|
if ( !taskDetails.length ) {
|
|
1338
1339
|
return res.sendError( 'No data found', 204 );
|
|
1339
1340
|
}
|
|
1340
|
-
let idList = taskDetails.filter( ( ele ) => ele.checklistStatus == 'submit' ).map( ( item ) => item._id );
|
|
1341
|
+
let idList = taskDetails.filter( ( ele ) => ele.checklistStatus == 'submit' ).map( ( item ) => item._id );
|
|
1341
1342
|
if ( idList.length ) {
|
|
1342
1343
|
let updateResponse = await taskProcessedService.updateMany( { _id: { $in: idList } }, { approvalStatus: true } );
|
|
1343
1344
|
if ( updateResponse.modifiedCount || updateResponse.matchedCount ) {
|