use of com.axelor.apps.talent.db.JobApplication in project axelor-open-suite by axelor.
the class JobApplicationController method showResume.
public void showResume(ActionRequest request, ActionResponse response) {
try {
JobApplication application = request.getContext().asType(JobApplication.class);
application = Beans.get(JobApplicationRepository.class).find(application.getId());
if (application.getResumeId() != null) {
response.setView(ActionView.define(I18n.get("JobApplication.resume")).model(DMSFile.class.getName()).add("form", "dms-file-form").context("_showRecord", application.getResumeId().toString()).map());
} else {
response.setAlert(I18n.get("No resume found"));
}
} catch (Exception e) {
TraceBackService.trace(response, e);
}
}
use of com.axelor.apps.talent.db.JobApplication in project axelor-open-suite by axelor.
the class JobApplicationController method hire.
public void hire(ActionRequest request, ActionResponse response) {
JobApplication jobApplication = request.getContext().asType(JobApplication.class);
jobApplication = Beans.get(JobApplicationRepository.class).find(jobApplication.getId());
Employee employee = Beans.get(JobApplicationService.class).hire(jobApplication);
response.setReload(true);
response.setView(ActionView.define(I18n.get("Employee")).model(Employee.class.getName()).add("grid", "employee-grid").add("form", "employee-form").param("search-filters", "employee-filters").context("_showRecord", employee.getId()).map());
}
use of com.axelor.apps.talent.db.JobApplication in project axelor-open-suite by axelor.
the class JobPositionServiceImpl method createApplication.
private void createApplication(JobPosition position, Message message) {
JobApplication application = new JobApplication();
if (position != null) {
application.setJobPosition(position);
application.setResponsible(position.getEmployee());
}
application.setEmailAddress(message.getFromEmailAddress());
application.setDescription(message.getContent());
application = saveApplication(application);
try {
copyAttachments(application, message);
} catch (IOException e) {
e.printStackTrace();
}
}
use of com.axelor.apps.talent.db.JobApplication in project axelor-open-suite by axelor.
the class JobApplicationController method setSocialNetworkUrl.
public void setSocialNetworkUrl(ActionRequest request, ActionResponse response) {
JobApplication application = request.getContext().asType(JobApplication.class);
Map<String, String> urlMap = Beans.get(PartnerService.class).getSocialNetworkUrl(application.getFirstName(), application.getLastName(), 2);
response.setAttr("linkedinLabel", "title", urlMap.get("linkedin"));
}
use of com.axelor.apps.talent.db.JobApplication in project axelor-open-suite by axelor.
the class JobApplicationController method setDMSFile.
public void setDMSFile(ActionRequest request, ActionResponse response) {
try {
JobApplication application = request.getContext().asType(JobApplication.class);
application = Beans.get(JobApplicationRepository.class).find(application.getId());
Beans.get(JobApplicationService.class).setDMSFile(application);
response.setReload(true);
} catch (Exception e) {
TraceBackService.trace(response, e);
}
}
Aggregations