Skip to content

Commit

Permalink
fix: Registration deadline not working (#5695)
Browse files Browse the repository at this point in the history
  • Loading branch information
DIVYAM TAYAL authored Nov 19, 2020
1 parent 816de6a commit c874482
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/components/forms/orders/order-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@ export default Component.extend(FormMixin, {
run.later(() => {
const currentTime = moment();
const diff = moment.duration(willExpireAt.diff(currentTime));
this.set('getRemainingTime', moment.utc(diff.asMilliseconds()).format('mm:ss'));
if (diff > 0) {
this.set('getRemainingTime', moment.utc(diff.asMilliseconds()).format('mm:ss'));
this.timer(willExpireAt, orderIdentifier);
} else {
this.set('getRemainingTime', '00:00');
this.data.set('status', 'expired');
this.data.reload();
this.router.transitionTo('orders.expired', orderIdentifier);
}
Expand Down

1 comment on commit c874482

@vercel
Copy link

@vercel vercel bot commented on c874482 Nov 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.