|
|
@ -3,7 +3,7 @@ package info.bukova.isspst.ui.dashboard;
|
|
|
|
import info.bukova.isspst.data.Role;
|
|
|
|
import info.bukova.isspst.data.Role;
|
|
|
|
import info.bukova.isspst.data.User;
|
|
|
|
import info.bukova.isspst.data.User;
|
|
|
|
import info.bukova.isspst.data.Workgroup;
|
|
|
|
import info.bukova.isspst.data.Workgroup;
|
|
|
|
import info.bukova.isspst.services.orders.OrderService;
|
|
|
|
import info.bukova.isspst.services.invoicing.InvoicingService;
|
|
|
|
import info.bukova.isspst.services.users.UserService;
|
|
|
|
import info.bukova.isspst.services.users.UserService;
|
|
|
|
import info.bukova.isspst.services.workgroups.WorkgroupService;
|
|
|
|
import info.bukova.isspst.services.workgroups.WorkgroupService;
|
|
|
|
import info.bukova.isspst.ui.DocumentViewModel;
|
|
|
|
import info.bukova.isspst.ui.DocumentViewModel;
|
|
|
@ -24,7 +24,7 @@ public class DashBoardVM extends DocumentViewModel {
|
|
|
|
@WireVariable
|
|
|
|
@WireVariable
|
|
|
|
private UserService userService;
|
|
|
|
private UserService userService;
|
|
|
|
@WireVariable
|
|
|
|
@WireVariable
|
|
|
|
private OrderService orderService;
|
|
|
|
private InvoicingService invoicingService;
|
|
|
|
private User user;
|
|
|
|
private User user;
|
|
|
|
private Map<Workgroup, List<Role>> groupRoles;
|
|
|
|
private Map<Workgroup, List<Role>> groupRoles;
|
|
|
|
private Map<Workgroup, BigDecimal> workgroupSpent;
|
|
|
|
private Map<Workgroup, BigDecimal> workgroupSpent;
|
|
|
@ -47,7 +47,7 @@ public class DashBoardVM extends DocumentViewModel {
|
|
|
|
for (Workgroup w : wg) {
|
|
|
|
for (Workgroup w : wg) {
|
|
|
|
List<Role> r = workgroupService.getUserWorkgroupRoles(w, user);
|
|
|
|
List<Role> r = workgroupService.getUserWorkgroupRoles(w, user);
|
|
|
|
groupRoles.put(w, r);
|
|
|
|
groupRoles.put(w, r);
|
|
|
|
workgroupSpent.put(w, orderService.totalOrderedForWorkgroup(w));
|
|
|
|
workgroupSpent.put(w, invoicingService.totalInvoicedForWorkgroup(w));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|