mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-24 10:34:17 +00:00
Set end date field as N.a. if the job is not completed.
This commit is contained in:
parent
dfb7f96d2d
commit
e1225c95bf
@ -31,6 +31,8 @@
|
||||
this.job = jobs[this.jobId];
|
||||
}
|
||||
|
||||
// End date
|
||||
this.setEndDate(this.job.end_date);
|
||||
// Status
|
||||
this.setStatus(this.job.status);
|
||||
// End date
|
||||
@ -73,7 +75,13 @@
|
||||
}
|
||||
|
||||
setEndDate(timestamp) {
|
||||
document.getElementById("end-date").value = new Date(timestamp * 1000).toLocaleString();
|
||||
var end_date;
|
||||
if (timestamp === null) {
|
||||
end_date = "N.a.";
|
||||
} else {
|
||||
end_date = new Date(timestamp * 1000).toLocaleString();
|
||||
}
|
||||
document.getElementById("end-date").value = end_date;
|
||||
M.updateTextFields();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user