tango-app-api-task 3.7.28 → 3.7.30
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
|
@@ -7252,8 +7252,9 @@ 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().format( 'hh:mm A' );
|
|
7256
|
-
let date =
|
|
7255
|
+
let time = dayjs.utc().format( 'hh:mm A' );
|
|
7256
|
+
let date = dayjs.utc().format( 'YYYY-MM-DD' );
|
|
7257
|
+
console.log( date );
|
|
7257
7258
|
let description = `A new task has been assigned to ${storeData.storeName}. Please complete it before the due date of ${date}.`;
|
|
7258
7259
|
await Promise.all( finduser.map( async ( ele ) => {
|
|
7259
7260
|
if ( ele && ele.fcmToken ) {
|
|
@@ -7275,6 +7276,8 @@ export async function AITaskCreation( req, res ) {
|
|
|
7275
7276
|
|
|
7276
7277
|
const inputDateTime = dayjs.utc( `${date} ${time}`, 'YYYY-MM-DD hh:mm A' );
|
|
7277
7278
|
const currentTime = dayjs.utc();
|
|
7279
|
+
console.log( inputDateTime );
|
|
7280
|
+
console.log( currentTime );
|
|
7278
7281
|
if ( inputDateTime.isBefore( currentTime ) ) {
|
|
7279
7282
|
return res.sendError( 'The input date-time is before the current time.', 500 );
|
|
7280
7283
|
}
|