tango-app-api-task 3.2.1-beta-18 → 3.2.1-beta-19
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
|
@@ -2389,14 +2389,16 @@ export async function StoreHygienetask( req, res ) {
|
|
|
2389
2389
|
inputBody.approver = inputBody.approver.replace( /,$/, '' );
|
|
2390
2390
|
|
|
2391
2391
|
|
|
2392
|
-
|
|
2392
|
+
let title = `New Task Alert ${inputBody.taskName}-${storeDetails.storeName}-${dayjs().format( 'YYYY-MM-DD' )}`;
|
|
2393
2393
|
let time = inputBody?.scheduleEndTime || '11:59 PM';
|
|
2394
2394
|
let date = inputBody?.scheduleDate || dayjs().format( 'YYYY-MM-DD' );
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2395
|
+
let description = `A new task has been assigned to ${storeDetails.storeName}. Please complete it before the due date of ${date}.`;
|
|
2396
|
+
let userDetails = await userService.findOne( { _id: new mongoose.Types.ObjectId( finduser.userId ) } );
|
|
2397
|
+
console.log( userDetails.fcmToken );
|
|
2398
|
+
if ( userDetails&&userDetails.fcmToken ) {
|
|
2399
|
+
const fcmToken = userDetails.fcmToken;
|
|
2400
|
+
await sendPushNotification( title, description, fcmToken );
|
|
2401
|
+
}
|
|
2400
2402
|
const inputDateTime = dayjs.utc( `${date} ${time}`, 'YYYY-MM-DD hh:mm A' );
|
|
2401
2403
|
const currentTime = dayjs.utc();
|
|
2402
2404
|
if ( inputDateTime.isBefore( currentTime ) ) {
|
|
@@ -2607,14 +2609,16 @@ export async function eyeTesttask( req, res ) {
|
|
|
2607
2609
|
inputBody.approver = inputBody.approver.replace( /,$/, '' );
|
|
2608
2610
|
|
|
2609
2611
|
|
|
2610
|
-
|
|
2612
|
+
let title = `New Task Alert ${inputBody.taskName}-${storeDetails.storeName}-${dayjs().format( 'YYYY-MM-DD' )}`;
|
|
2611
2613
|
let time = inputBody?.scheduleEndTime || '11:59 PM';
|
|
2612
2614
|
let date = inputBody?.scheduleDate || dayjs().format( 'YYYY-MM-DD' );
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2615
|
+
let description = `A new task has been assigned to ${storeDetails.storeName}. Please complete it before the due date of ${date}.`;
|
|
2616
|
+
let userDetails = await userService.findOne( { _id: new mongoose.Types.ObjectId( finduser.userId ) } );
|
|
2617
|
+
console.log( userDetails.fcmToken );
|
|
2618
|
+
if ( userDetails&&userDetails.fcmToken ) {
|
|
2619
|
+
const fcmToken = userDetails.fcmToken;
|
|
2620
|
+
await sendPushNotification( title, description, fcmToken );
|
|
2621
|
+
}
|
|
2618
2622
|
const inputDateTime = dayjs.utc( `${date} ${time}`, 'YYYY-MM-DD hh:mm A' );
|
|
2619
2623
|
const currentTime = dayjs.utc();
|
|
2620
2624
|
if ( inputDateTime.isBefore( currentTime ) ) {
|