tango-app-api-trax 3.6.0-sec-6 → 3.6.0-sec-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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-app-api-trax",
3
- "version": "3.6.0-sec-6",
3
+ "version": "3.6.0-sec-7",
4
4
  "description": "Trax",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -151,8 +151,8 @@ export async function startChecklist( req, res ) {
151
151
 
152
152
  let updateData = {};
153
153
  let currentDateTime;
154
- if ( getBeforeChecklist[0].storeName && getBeforeChecklist[0].storeName!='' ) {
155
- let storeTimeZone = await storeService.findOne( { storeName: { $regex: getBeforeChecklist[0].storeName, $options: 'i' }, clientId: getBeforeChecklist[0].client_id }, { 'storeProfile.timeZone': 1 } );
154
+ if ( getBeforeChecklist[0]?.store_id && getBeforeChecklist[0]?.store_id != '' ) {
155
+ let storeTimeZone = await storeService.findOne( { storeId: getBeforeChecklist[0].store_id, clientId: getBeforeChecklist[0].client_id }, { 'storeProfile.timeZone': 1 } );
156
156
  if ( storeTimeZone?.storeProfile?.timeZone ) {
157
157
  currentDateTime = dayjs().tz( storeTimeZone?.storeProfile?.timeZone );
158
158
  } else {
@@ -1803,8 +1803,8 @@ export async function submitChecklist( req, res ) {
1803
1803
 
1804
1804
  let currentDateTime;
1805
1805
  let storeTimeZone;
1806
- if ( getchecklist[0].storeName && getchecklist[0].storeName !='' ) {
1807
- storeTimeZone = await storeService.findOne( { storeName: { $regex: getchecklist[0].storeName, $options: 'i' }, clientId: getchecklist[0].client_id }, { 'storeProfile.timeZone': 1 } );
1806
+ if ( getchecklist[0]?.store_id && getchecklist[0]?.store_id !='' ) {
1807
+ storeTimeZone = await storeService.findOne( { storeId: getchecklist[0].store_id, clientId: getchecklist[0].client_id }, { 'storeProfile.timeZone': 1 } );
1808
1808
  if ( storeTimeZone?.storeProfile?.timeZone ) {
1809
1809
  currentDateTime = dayjs().tz( storeTimeZone?.storeProfile?.timeZone );
1810
1810
  } else {