tango-app-api-trax 3.3.1-hotfix-11 → 3.3.1-hotfix-13

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-trax",
3
- "version": "3.3.1-hotfix-11",
3
+ "version": "3.3.1-hotfix-13",
4
4
  "description": "Trax",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -18,7 +18,7 @@ import timeZone from 'dayjs/plugin/timezone.js';
18
18
  import utc from 'dayjs/plugin/utc.js';
19
19
  import { logger } from 'tango-app-api-middleware';
20
20
  import mongoose from 'mongoose';
21
- import { sendPushNotification } from 'tango-app-api-middleware';
21
+ import { sendPushNotification, sendAiPushNotification } from 'tango-app-api-middleware';
22
22
  // import * as planoService from '../services/planogram.service.js';
23
23
  import * as clusterServices from '../services/cluster.service.js';
24
24
  import * as teamsServices from '../services/teams.service.js';
@@ -1676,11 +1676,13 @@ export async function internalAISendPushNotification( req, res ) {
1676
1676
  return res.sendSuccess( 'Notification Send Successfully' );
1677
1677
  }
1678
1678
  let custom = {
1679
+ title: requestData.title,
1680
+ description: requestData.description,
1679
1681
  type: req.body?.type,
1680
1682
  storeId: req.body?.storeId,
1681
1683
  date: req.body?.date,
1682
1684
  };
1683
- let responseData = await sendPushNotification( requestData.title, requestData.description, fcmToken, custom );
1685
+ let responseData = await sendAiPushNotification( fcmToken, custom );
1684
1686
  if ( responseData ) {
1685
1687
  return res.sendSuccess( 'Notification Send Successfully' );
1686
1688
  } else {
@@ -1469,8 +1469,9 @@ export const updateConfigurev1 =async ( req, res ) => {
1469
1469
  if ( inputBody.timeZone ) {
1470
1470
  currentDate = dayjs().tz( inputBody.timeZone ).format();
1471
1471
  } else {
1472
- currentDate = dayjs().format();
1472
+ currentDate = dayjs().format( 'HH:mm:ss' );
1473
1473
  }
1474
+ currentDate = dayjs.utc( currentDate, 'HH:mm:ss' ).format();
1474
1475
  let updatedscheduleEndTimeISO = dayjs.utc( inputBody?.checkListDetails?.scheduleEndTime, 'hh:mm A' ).format( 'HH:mm:ss' );
1475
1476
  let newUpdatedDate = dayjs.utc( updatedscheduleEndTimeISO, 'HH:mm:ss' ).format();
1476
1477