Skip to content

Commit

Permalink
Time limit added #64
Browse files Browse the repository at this point in the history
  • Loading branch information
Csutorás Robin committed Feb 22, 2017
1 parent b81a445 commit 9063f6e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/deliverable.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export default DS.Model.extend({
return !this.get('isOver') || // this deadline is not over OR
(this.get('isOver') && // the deadline is over,
(this.get('lastSubmittedDate') < this.get('deadline')) && // but the last upload time is before the deadline and
!this.get('uploaded') // hasn't been uploaded yet
!this.get('uploaded') && // hasn't been uploaded yet and
((new Date()) - this.get('deadline')) < 13 * 60 * 60 * 1000 // the deadline is over at most 13 hours
);
}),
isDelayed: Ember.computed('deadline', 'uploaded', function () {
Expand Down

0 comments on commit 9063f6e

Please sign in to comment.