tango-app-api-task 3.7.30 → 3.7.31

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.7.30",
3
+ "version": "3.7.31",
4
4
  "description": "Task",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -7252,9 +7252,8 @@ export async function AITaskCreation( req, res ) {
7252
7252
  // Send Push Notification
7253
7253
  // inputBody.approver = inputBody.approver.replace( /,$/, '' );
7254
7254
  let title = `New Task Alert ${inputBody.taskName}-${storeData.storeName}-${dayjs().format( 'YYYY-MM-DD' )}`;
7255
- let time = dayjs.utc().format( 'hh:mm A' );
7256
- let date = dayjs.utc().format( 'YYYY-MM-DD' );
7257
- console.log( date );
7255
+ let time = inputBody?.scheduleEndTime || dayjs().format( 'YYYY-MM-DD' );
7256
+ let date = inputBody?.scheduleDate || dayjs().format( 'YYYY-MM-DD' );
7258
7257
  let description = `A new task has been assigned to ${storeData.storeName}. Please complete it before the due date of ${date}.`;
7259
7258
  await Promise.all( finduser.map( async ( ele ) => {
7260
7259
  if ( ele && ele.fcmToken ) {
@@ -7276,8 +7275,6 @@ export async function AITaskCreation( req, res ) {
7276
7275
 
7277
7276
  const inputDateTime = dayjs.utc( `${date} ${time}`, 'YYYY-MM-DD hh:mm A' );
7278
7277
  const currentTime = dayjs.utc();
7279
- console.log( inputDateTime );
7280
- console.log( currentTime );
7281
7278
  if ( inputDateTime.isBefore( currentTime ) ) {
7282
7279
  return res.sendError( 'The input date-time is before the current time.', 500 );
7283
7280
  }