use of com.axelor.apps.hr.db.Employee in project axelor-open-suite by axelor.
the class TimesheetController method historicTimesheet.
public void historicTimesheet(ActionRequest request, ActionResponse response) {
User user = AuthUtils.getUser();
Employee employee = user.getEmployee();
ActionViewBuilder actionView = ActionView.define(I18n.get("Historic colleague Timesheets")).model(Timesheet.class.getName()).add("grid", "timesheet-grid").add("form", "timesheet-form").param("search-filters", "timesheet-filters");
actionView.domain("(self.statusSelect = 3 OR self.statusSelect = 4)");
if (employee == null || !employee.getHrManager()) {
actionView.domain(actionView.get().getDomain() + " AND self.user.employee.managerUser = :_user").context("_user", user);
}
response.setView(actionView.map());
}
Aggregations