Search in sources :

Example 1 with JobApplication

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);
    }
}
Also used : JobApplication(com.axelor.apps.talent.db.JobApplication) DMSFile(com.axelor.dms.db.DMSFile)

Example 2 with JobApplication

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());
}
Also used : Employee(com.axelor.apps.hr.db.Employee) JobApplicationService(com.axelor.apps.talent.service.JobApplicationService) JobApplication(com.axelor.apps.talent.db.JobApplication)

Example 3 with JobApplication

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();
    }
}
Also used : JobApplication(com.axelor.apps.talent.db.JobApplication) IOException(java.io.IOException)

Example 4 with JobApplication

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"));
}
Also used : JobApplication(com.axelor.apps.talent.db.JobApplication) PartnerService(com.axelor.apps.base.service.PartnerService)

Example 5 with JobApplication

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);
    }
}
Also used : JobApplicationService(com.axelor.apps.talent.service.JobApplicationService) JobApplication(com.axelor.apps.talent.db.JobApplication)

Aggregations

JobApplication (com.axelor.apps.talent.db.JobApplication)5 JobApplicationService (com.axelor.apps.talent.service.JobApplicationService)2 PartnerService (com.axelor.apps.base.service.PartnerService)1 Employee (com.axelor.apps.hr.db.Employee)1 DMSFile (com.axelor.dms.db.DMSFile)1 IOException (java.io.IOException)1