tango-app-api-trax 3.2.1-beta-5 → 3.2.1-beta-7
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
|
@@ -1474,7 +1474,7 @@ export async function internalSendPushNotification( req, res ) {
|
|
|
1474
1474
|
async function getUserToken( clientId, userEmail ) {
|
|
1475
1475
|
try {
|
|
1476
1476
|
if ( clientId && clientId !='' && userEmail && userEmail !='' ) {
|
|
1477
|
-
let userData = await userService.findOne( { clientId:
|
|
1477
|
+
let userData = await userService.findOne( { clientId: clientId, email: userEmail }, { fcmToken: 1 } );
|
|
1478
1478
|
if ( userData && userData.fcmToken && userData.fcmToken !='' ) {
|
|
1479
1479
|
return userData.fcmToken;
|
|
1480
1480
|
} else {
|
|
@@ -2177,18 +2177,17 @@ async function insertPCBulkV3( getCLconfig, checklistId, currentdate, updatedche
|
|
|
2177
2177
|
getsubmitDetails[0].date_iso = new Date( date );
|
|
2178
2178
|
getsubmitDetails[0].redoStatus = false;
|
|
2179
2179
|
getsubmitDetails[0].approvalStatus = false;
|
|
2180
|
-
} else {
|
|
2181
|
-
if ( editSubmit && getsubmitDetails[0].checklistStatus == 'submit' ) {
|
|
2182
|
-
console.log( editSubmit );
|
|
2183
|
-
let user = {
|
|
2184
|
-
_id: getsubmitDetails[0].userId,
|
|
2185
|
-
clientId: getsubmitDetails[0].client_id,
|
|
2186
|
-
};
|
|
2187
|
-
updateOpenSearch( user, { processedcheckListId: getsubmitDetails[0]._id, date: getsubmitDetails[0].date_string } );
|
|
2188
|
-
}
|
|
2189
2180
|
}
|
|
2190
2181
|
let data = { ...getsubmitDetails[0]._doc };
|
|
2191
2182
|
await processedchecklist.updateOne( { _id: getsubmitDetails[0]._id }, data );
|
|
2183
|
+
if ( editSubmit && getsubmitDetails[0].checklistStatus == 'submit' ) {
|
|
2184
|
+
console.log( editSubmit );
|
|
2185
|
+
let user = {
|
|
2186
|
+
_id: getsubmitDetails[0].userId,
|
|
2187
|
+
clientId: getsubmitDetails[0].client_id,
|
|
2188
|
+
};
|
|
2189
|
+
updateOpenSearch( user, { processedcheckListId: getsubmitDetails[0]._id, date: getsubmitDetails[0].date_string } );
|
|
2190
|
+
}
|
|
2192
2191
|
}
|
|
2193
2192
|
if ( getsubmitDetails[0]?.checklistStatus == 'submit' ) {
|
|
2194
2193
|
userIdList.push( element4._id );
|