tango-app-api-task 3.6.2-bulktask-4 → 3.6.2-bulktask-6
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.6.2-bulktask-
|
|
3
|
+
"version": "3.6.2-bulktask-6",
|
|
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.2.
|
|
28
|
+
"tango-api-schema": "^2.2.201",
|
|
29
29
|
"tango-app-api-middleware": "^3.1.77",
|
|
30
30
|
"winston": "^3.17.0",
|
|
31
31
|
"winston-daily-rotate-file": "^5.0.0"
|
|
@@ -2086,7 +2086,7 @@ export async function createChecklistTask( req, res ) {
|
|
|
2086
2086
|
console.log( 'logData', logData );
|
|
2087
2087
|
await insertOpenSearchData( urlopensearch.traxActivityLog, logData );
|
|
2088
2088
|
}
|
|
2089
|
-
await insertSingleProcessData( response?._id );
|
|
2089
|
+
await insertSingleProcessData( response?._id, false, inputBody, 'gallery' );
|
|
2090
2090
|
return res.sendSuccess( 'Task created successfully' );
|
|
2091
2091
|
}
|
|
2092
2092
|
} catch ( e ) {
|
|
@@ -2154,7 +2154,7 @@ export async function createChecklistMultiTask( req, res ) {
|
|
|
2154
2154
|
restrictAttendance: req.body.restrictAttendance,
|
|
2155
2155
|
allowedStoreLocation: req.body.allowedStoreLocation,
|
|
2156
2156
|
};
|
|
2157
|
-
|
|
2157
|
+
console.log( data );
|
|
2158
2158
|
if ( req.user.userType == 'tango' || ( req.user.userType == 'client' && [ 'user' ].includes( req.user.role ) ) ) {
|
|
2159
2159
|
let userList = await userService.findOne( { clientId: inputBody.clientId, role: 'superadmin' }, { userName: 1, email: 1 } );
|
|
2160
2160
|
if ( userList ) {
|
|
@@ -2190,9 +2190,9 @@ export async function createChecklistMultiTask( req, res ) {
|
|
|
2190
2190
|
let findcomment = {};
|
|
2191
2191
|
if ( !inputBody.showcomment ) {
|
|
2192
2192
|
if ( inputBody?.coverage === 'store' ) {
|
|
2193
|
-
findcomment = inputBody.excelData.find( ( ele ) => ele
|
|
2193
|
+
findcomment = inputBody.excelData.find( ( ele ) => ele['Store Name'] === originaldata.storeName );
|
|
2194
2194
|
} else if ( inputBody?.coverage === 'users' ) {
|
|
2195
|
-
findcomment = inputBody.excelData.find( ( ele ) => ele
|
|
2195
|
+
findcomment = inputBody.excelData.find( ( ele ) => ele['User Email'] === originaldata.userEmail );
|
|
2196
2196
|
}
|
|
2197
2197
|
}
|
|
2198
2198
|
console.log( '****************', findcomment );
|
|
@@ -2256,7 +2256,7 @@ export async function createChecklistMultiTask( req, res ) {
|
|
|
2256
2256
|
userId: findUser._id ? findUser._id : '',
|
|
2257
2257
|
assignId: response?.coverage == 'store' ? storeDetails?._id : findUser._id,
|
|
2258
2258
|
coverage: response?.coverage || 'store',
|
|
2259
|
-
comments: inputBody?.showcomment ? inputBody.checkListDescription : findcomment?.
|
|
2259
|
+
comments: inputBody?.showcomment ? inputBody.checkListDescription : findcomment?.Comments,
|
|
2260
2260
|
};
|
|
2261
2261
|
await taskAssignService.create( userDetails );
|
|
2262
2262
|
// console.log( originaldata?.checklistId );
|