valid calendar warning level

master
yixian 4 years ago
parent 320ca01d45
commit ed7b8b75a2

@ -170,6 +170,11 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider
JSONObject item = new JSONObject();
item.put("date", DateFormatUtils.format(report.getDate("valid_date"), "yyyy/MM/dd"));
JSONObject result = JSON.parseObject(report.getString("result"));
int warningLevel = result.getBooleanValue("valid") ? 0 : 1;
if (!result.getJSONArray("not_exists").isEmpty()) {
warningLevel = 2;
}
item.put("warning_level", warningLevel);
item.put("success", result.getBooleanValue("valid"));
topReports.add(item);
}

@ -11,8 +11,10 @@
<div class="box">
<div class="box-body">
<div royal-calendar month-change="loadValidatedDates($month)">
<a class="rc-full" role="button" ui-sref=".report({date:(day|date:'yyyyMMdd')})" style="font-size: 40px" ng-if="day<=today">
<i class="fa" ng-class="{'fa-check-circle text-green':findReport((day|date:'yyyy/MM/dd')).success,'fa-warning text-red':!findReport((day|date:'yyyy/MM/dd')).success}"
<a class="rc-full" role="button" ui-sref=".report({date:(day|date:'yyyyMMdd')})"
style="font-size: 40px" ng-if="day<=today">
<i class="fa"
ng-class="{'fa-check-circle text-green':findReport((day|date:'yyyy/MM/dd')).success,'fa-warning':!findReport((day|date:'yyyy/MM/dd')).success,'text-red':findReport((day|date:'yyyy/MM/dd')).warning_level==2,'text-yellow':findReport((day|date:'yyyy/MM/dd')).warning_level==1}"
ng-if="findReport((day|date:'yyyy/MM/dd'))!=null"></i>
</a>
</div>

Loading…
Cancel
Save