" +
+ "" +
"" + userInformation[i].userName + " "+
- " | " + userInformation[i].teams +
+ " | " + userInformation[i].teams +
" | " + userInformation[i].state +
- " | " + inactiveEndDate +
- " | " + userInformation[i].remainingHours +
- " | " + userInformation[i].targetTotalHours +
- " | " + userInformation[i].totalHours +
- " | " + userInformation[i].hoursPerHalfYear +
- " | " + userInformation[i].hoursPerMonitoringPeriod +
- " | " + firstEntryDate +
- " | " + latestEntryDate +
- " | " + userInformation[i].latestEntryDescription +
+ " | " + inactiveEndDate +
+ " | " + userInformation[i].remainingHours +
+ " | " + userInformation[i].targetTotalHours +
+ " | " + userInformation[i].totalHours +
+ " | " + userInformation[i].hoursPerHalfYear +
+ " | " + userInformation[i].hoursPerMonitoringPeriod +
+ " | " + firstEntryDate +
+ " | " + latestEntryDate +
+ " | " + userInformation[i].latestEntryDescription +
enabledColumn + " |
";
-
- if (userInformation[i].state === "DONE") {
- AJS.$("#done-user-info-table-content").append(row);
- }
- else if (userInformation[i].state === "DISABLED") {
- AJS.$("#disabled-user-info-table-content").append(row);
- }
- else {
- AJS.$("#user-information-table-content").append(row);
- }
-
- var timesheetID = userInformation[i].timesheetID;
-
- setupDropdownButton(timesheetID, enabled);
+
+ AJS.$(table).append(row);
+
+ setupDropdownButton(userInformation[i].timesheetID, enabled);
}
AJS.$(".view-timesheet-button").on("click", function (e) {
@@ -144,53 +139,6 @@ AJS.toInit(function () {
window.open(AJS.params.baseURL + "/secure/ViewProfile.jspa?name=" + user_name, "_blank");
});
-
- AJS.$("#user-information-table").trigger("update");
- AJS.$("#disabled-users-table").trigger("update");
- AJS.$("#done-users-table").trigger("update");
-
- AJS.$("#timesheet-user-statistics").empty();
-
- var numberTotal = 0;
- var numberActive = 0;
- var numberInActive = 0;
- var numberAutoInActive = 0;
- var numberInActiveOffline = 0;
- var numberDisabled = 0;
- var numberDone = 0;
-
- for (var i = 0; i < userInformation.length; i++) {
-
- numberTotal++;
-
- if (userInformation[i].state === "ACTIVE")
- numberActive++;
- else if (userInformation[i].state === "INACTIVE")
- numberInActive++;
- else if (userInformation[i].state === "AUTO_INACTIVE")
- numberAutoInActive++;
- else if (userInformation[i].state === "INACTIVE_OFFLINE")
- numberInActiveOffline++;
- else if (userInformation[i].state === "DISABLED")
- numberDisabled++;
- else if (userInformation[i].state === "DONE")
- numberDone++;
-
- }
-
- var row = "" + "Total Number of Timesheets: " + numberTotal + " | " +
- "" + "Active Timesheets: " + numberActive + " | " +
- "" + "Auto Inactive Timesheets: " + numberAutoInActive + " | " +
- "" + "Inactive Timesheets: " + numberInActive + " | " +
- "
" +
-
- "