Skip to content

Commit

Permalink
[5.x] Fix delayed until on pending jobs screen (#907)
Browse files Browse the repository at this point in the history
  • Loading branch information
paras-malhotra authored Oct 9, 2020
1 parent 8fbe705 commit d6d65a8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion resources/js/screens/recentJobs/job-row.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,12 @@
},
delayed() {
if (this.unserialized && this.unserialized.delay) {
if (this.unserialized && this.unserialized.delay && this.unserialized.delay.date) {
return moment.tz(this.unserialized.delay.date, this.unserialized.delay.timezone)
.fromNow(true);
} else if (this.unserialized && this.unserialized.delay) {
return this.formatDate(this.job.payload.pushedAt).add(this.unserialized.delay, 'seconds')
.fromNow(true);
}
return null;
Expand Down
6 changes: 5 additions & 1 deletion resources/js/screens/recentJobs/job.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,14 @@
//
}
if (unserialized && unserialized.delay) {
if (unserialized && unserialized.delay && unserialized.delay.date) {
return moment.tz(unserialized.delay.date, unserialized.delay.timezone)
.local()
.format('YYYY-MM-DD HH:mm:ss');
} else if (unserialized && unserialized.delay) {
return this.formatDate(this.job.payload.pushedAt).add(unserialized.delay, 'seconds')
.local()
.format('YYYY-MM-DD HH:mm:ss');
}
return null;
Expand Down

0 comments on commit d6d65a8

Please sign in to comment.