tango-app-api-trax 3.7.21 → 3.7.23

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.7.21",
3
+ "version": "3.7.23",
4
4
  "description": "Trax",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -169,7 +169,9 @@ export async function startChecklist( req, res ) {
169
169
  currentDateTime = dayjs();
170
170
  }
171
171
  }
172
- if ( getBeforeChecklist[0]?.client_id == '458' && currentDateTime < dayjs( getBeforeChecklist?.[0]?.scheduleStartTime, 'hh:MM A' ) ) {
172
+ let currentDate = currentDateTime.format( 'hh:mm A' );
173
+ let updatedscheduleEndTimeISO = dayjs( getBeforeChecklist?.[0]?.scheduleStartTime_iso ).format( 'hh:mm A' );
174
+ if ( getBeforeChecklist[0]?.client_id == '458' && dayjs.utc( currentDate, 'hh:mm A' ).isBefore( dayjs.utc( updatedscheduleEndTimeISO, 'hh:mm A' ) ) ) {
173
175
  return res.sendError( `Checklist will be start ${getBeforeChecklist?.[0]?.scheduleStartTime}`, 422 );
174
176
  }
175
177
  updateData.checklistStatus = 'inprogress';