Commit 690badfe by NGUYEN HOANG SON

fix dashboard item batch

parent 856c042c
......@@ -577,21 +577,27 @@ CHK.loadDashboardBatch = function(operationList) {
CHK.dashboardBatch.continousWork = 0;
CHK.dashboardBatch.reportWarning = 0;
for (var i = 0; i < operationList.length; i++) {
if (operationList[i].enableAddReport == 1) {
let operation = operationList[i];
if (operation.enableAddReport == 1) {
CHK.dashboardBatch.newReport += 1;
}
if (operationList[i].reportType == 3) {
if (operationList[i].processList && operationList[i].processList.length > 0) {
for (var j = 0; j < operationList[i].processList.length; j++) {
if (operationList[i].processList[j].processStatus && operationList[i].processList[j].processStatus != 999) {
//status != DONE
if (operation.reportType == 3) {
if (operation.processList && operation.processList.length > 0) {
for (var j = 0; j < operation.processList.length; j++) {
let process = operationList[i].processList[j];
if (process.phaseList && process.phaseList.length > 0) {
for (var k = 0; k < process.phaseList.length; k++) {
let phase = process.phaseList[k];
if (phase.phaseStatus && phase.phaseStatus != 99) {
CHK.dashboardBatch.continousWork += 1;
}
}
}
}
if (operationList[i].warningReportList && operationList[i].warningReportList.length > 0) {
CHK.dashboardBatch.reportWarning += operationList[i].warningReportList.length;
}
}
if (operation.warningReportList && operation.warningReportList.length > 0) {
CHK.dashboardBatch.reportWarning += operation.warningReportList.length;
}
}
if (typeof CHK_Dashboard !== 'undefined') {
......
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