use of com.axelor.apps.talent.db.TrainingSession in project axelor-open-suite by axelor.
the class TrainingRegisterController method massTrainingRegisterCreation.
@SuppressWarnings("unchecked")
public void massTrainingRegisterCreation(ActionRequest request, ActionResponse response) {
Context context = request.getContext();
ArrayList<LinkedHashMap<String, Object>> employeeList = (ArrayList<LinkedHashMap<String, Object>>) context.get("employeeList");
TrainingSession trainingSession = Beans.get(TrainingSessionRepository.class).find(Long.parseLong(context.get("_trainingSessionId").toString()));
String eventList = Beans.get(TrainingRegisterService.class).massTrainingRegisterCreation(employeeList, trainingSession);
response.setCanClose(true);
if (!eventList.equals("()")) {
response.setView(ActionView.define("Meeting").model(Event.class.getCanonicalName()).add("grid", "event-grid").add("form", "event-form").param("search-filters", "event-filters").domain("self.id in " + eventList).map());
} else {
response.setAlert(IExceptionMessage.NO_EVENT_GENERATED);
}
}
use of com.axelor.apps.talent.db.TrainingSession in project axelor-open-suite by axelor.
the class TrainingSessionController method completeSession.
public void completeSession(ActionRequest request, ActionResponse response) {
TrainingSession trainingSession = request.getContext().asType(TrainingSession.class);
trainingSession = Beans.get(TrainingSessionRepository.class).find(trainingSession.getId());
Beans.get(TrainingSessionService.class).closeSession(trainingSession);
response.setReload(true);
}
use of com.axelor.apps.talent.db.TrainingSession in project axelor-open-suite by axelor.
the class TrainingSessionController method updateAllRating.
public void updateAllRating(ActionRequest request, ActionResponse response) {
TrainingSession trainingSession = request.getContext().asType(TrainingSession.class);
trainingSession = Beans.get(TrainingSessionRepository.class).find(trainingSession.getId());
Beans.get(TrainingSessionService.class).updateAllRating(trainingSession);
response.setReload(true);
}
Aggregations