Commit e8a947fc by NGUYEN HOANG SON

fix pickup batch count

parent 8fe64e8a
......@@ -573,13 +573,21 @@ CHK.initPushMessageList = function() {
CHK.loadDashboardBatch = function(operationList) {
if (!operationList) return;
CHK.dashboardBatch.newReport = operationList.length;
CHK.dashboardBatch.newReport = 0;
CHK.dashboardBatch.continousWork = 0;
CHK.dashboardBatch.reportWarning = 0;
for (var i = 0; i < operationList.length; i++) {
if (operationList[i].enableAddReport == 1) {
CHK.dashboardBatch.newReport += 1;
}
if (operationList[i].reportType == 3) {
if (operationList[i].processList && operationList[i].processList.length > 0) {
CHK.dashboardBatch.continousWork += 1;
for (var j = 0; j < operationList[i].processList.length; j++) {
if (operationList[i].processList[j].processStatus && operationList[i].processList[j].processStatus != 999) {
//status != DONE
CHK.dashboardBatch.continousWork += 1;
}
}
}
}
if (operationList[i].warningReportList && operationList[i].warningReportList.length > 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment