|
|
@ -85,19 +85,27 @@ define(
|
|
|
|
var start = Moment(element.get('airDate'));
|
|
|
|
var start = Moment(element.get('airDate'));
|
|
|
|
var end = Moment(element.get('end'));
|
|
|
|
var end = Moment(element.get('end'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var statusLevel = 'primary';
|
|
|
|
|
|
|
|
|
|
|
|
if (currentTime.isAfter(start) && currentTime.isBefore(end)) {
|
|
|
|
if (currentTime.isAfter(start) && currentTime.isBefore(end)) {
|
|
|
|
return 'warning';
|
|
|
|
statusLevel = 'warning';
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
else if (start.isBefore(currentTime) && !hasFile) {
|
|
|
|
|
|
|
|
statusLevel = 'danger';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (start.isBefore(currentTime) && !hasFile) {
|
|
|
|
else if (hasFile) {
|
|
|
|
return 'danger';
|
|
|
|
statusLevel = 'success';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (hasFile) {
|
|
|
|
var test = currentTime.startOf('day').format('LLLL');
|
|
|
|
return 'success';
|
|
|
|
|
|
|
|
|
|
|
|
if (end.isBefore(currentTime.startOf('day'))) {
|
|
|
|
|
|
|
|
statusLevel += ' past'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return 'primary';
|
|
|
|
return statusLevel;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|