Skip to content

Instantly share code, notes, and snippets.

@rolandpeelen
Last active July 22, 2018 18:48
Show Gist options
  • Select an option

  • Save rolandpeelen/273b543c65d8256362d056c6424b5f85 to your computer and use it in GitHub Desktop.

Select an option

Save rolandpeelen/273b543c65d8256362d056c6424b5f85 to your computer and use it in GitHub Desktop.
_this.requestTimeOutStatus = function (row, seat) {
var currentStatus = SeatService.getStatusForSeatWith(row, seat);
var fireBaseTimeDifference = reservationTime - moment().diff(moment(JSON.parse(currentStatus.date)), 'seconds');
return fireBaseTimeDifference > 60 ? Math.round(fireBaseTimeDifference / 60) + 'm' : Math.round(fireBaseTimeDifference) + 's';
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment