tango-app-api-task 1.0.0-beta.26 → 1.0.0-beta.28
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.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.28",
|
|
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"
|
|
@@ -921,7 +921,7 @@ async function insertPCBulkV3( getCLconfig, checklistId, updatedchecklist, date,
|
|
|
921
921
|
for ( let element4 of allQuestion ) {
|
|
922
922
|
let query;
|
|
923
923
|
query = {
|
|
924
|
-
date_string: date,
|
|
924
|
+
date_string: dayjs( date ).format( 'YYYY-MM-DD' ),
|
|
925
925
|
sourceCheckList_id: getCLconfig._id,
|
|
926
926
|
$or: [ {
|
|
927
927
|
checklistStatus: { $in: [ 'submit' ] },
|
|
@@ -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 );
|
|
@@ -1309,7 +1310,8 @@ export async function createChecklistTask( req, res ) {
|
|
|
1309
1310
|
},
|
|
1310
1311
|
body: JSON.stringify( params ),
|
|
1311
1312
|
};
|
|
1312
|
-
let
|
|
1313
|
+
let url = JSON.parse( process.env.LAMBDAURL );
|
|
1314
|
+
let searchResponse = await fetch(url.redoChecklist, requestOptions );
|
|
1313
1315
|
if ( !searchResponse.ok ) {
|
|
1314
1316
|
return res.sendError( 'Something went wrong', 500 );
|
|
1315
1317
|
}
|
|
@@ -1333,11 +1335,11 @@ export async function approveTask( req, res ) {
|
|
|
1333
1335
|
if ( req.body?.storeId?.length ) {
|
|
1334
1336
|
query['store_id'] = { $in: req.body.storeId };
|
|
1335
1337
|
}
|
|
1336
|
-
let taskDetails = await taskProcessedService.find( query, { _id: 1, checklistStatus: 1, storeName: 1 } );
|
|
1338
|
+
let taskDetails = await taskProcessedService.find( query, { _id: 1, checklistStatus: 1, storeName: 1, store_id: 1, userEmail: 1 } );
|
|
1337
1339
|
if ( !taskDetails.length ) {
|
|
1338
1340
|
return res.sendError( 'No data found', 204 );
|
|
1339
1341
|
}
|
|
1340
|
-
let idList = taskDetails.filter( ( ele ) => ele.checklistStatus == 'submit' ).map( ( item ) => item._id );
|
|
1342
|
+
let idList = taskDetails.filter( ( ele ) => ele.checklistStatus == 'submit' ).map( ( item ) => item._id );
|
|
1341
1343
|
if ( idList.length ) {
|
|
1342
1344
|
let updateResponse = await taskProcessedService.updateMany( { _id: { $in: idList } }, { approvalStatus: true } );
|
|
1343
1345
|
if ( updateResponse.modifiedCount || updateResponse.matchedCount ) {
|