Compare commits
4 Commits
25448fff44
...
cf06837224
Author | SHA1 | Date | |
---|---|---|---|
cf06837224 | |||
5690879792 | |||
76d2a99758 | |||
e9d46848c7 |
@ -22,8 +22,8 @@
|
|||||||
private String lastName;
|
private String lastName;
|
||||||
private LocalDate birthday;
|
private LocalDate birthday;
|
||||||
private String birthCity;
|
private String birthCity;
|
||||||
@Enumerated(EnumType.STRING)
|
private String age;
|
||||||
private MaritalStatus maritalStatus;
|
|
||||||
private String residenceAddress;
|
private String residenceAddress;
|
||||||
private String phoneNumber;
|
private String phoneNumber;
|
||||||
private String personalEmail;
|
private String personalEmail;
|
||||||
@ -33,6 +33,49 @@
|
|||||||
private String emergencyCAddress;
|
private String emergencyCAddress;
|
||||||
private String emergencyCPhone;
|
private String emergencyCPhone;
|
||||||
private String emergencyCEmail;
|
private String emergencyCEmail;
|
||||||
|
private String numberOfChildren;
|
||||||
|
private String departmentAndProvinceResidence;
|
||||||
|
|
||||||
|
private String ci;
|
||||||
|
private String issuedIn;
|
||||||
|
|
||||||
|
private String pTitle1;
|
||||||
|
private String pTitle2;
|
||||||
|
private String pTitle3;
|
||||||
|
|
||||||
|
private String pStudy1;
|
||||||
|
private String pStudy2;
|
||||||
|
private String pStudy3;
|
||||||
|
|
||||||
|
private String certification1;
|
||||||
|
private String certification2;
|
||||||
|
private String certification3;
|
||||||
|
private String certification4;
|
||||||
|
|
||||||
|
private String recognition;
|
||||||
|
private String achievements;
|
||||||
|
|
||||||
|
private String language;
|
||||||
|
private String languageLevel;
|
||||||
|
|
||||||
|
private String cod;
|
||||||
|
private String leadManager;
|
||||||
|
private String project;
|
||||||
|
|
||||||
|
private LocalDate dateOfEntry;
|
||||||
|
private LocalDate dateOfExit;
|
||||||
|
|
||||||
|
private String contractType;
|
||||||
|
private Integer seniority;
|
||||||
|
private Double salary;
|
||||||
|
|
||||||
|
private String bankName;
|
||||||
|
private String accountNumber;
|
||||||
|
|
||||||
|
private String gpss;
|
||||||
|
private String sss;
|
||||||
|
private String beneficiaries;
|
||||||
|
|
||||||
@Column(columnDefinition = "TEXT")
|
@Column(columnDefinition = "TEXT")
|
||||||
private String profileImage;
|
private String profileImage;
|
||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
@ -77,12 +120,21 @@
|
|||||||
ACTIVE,
|
ACTIVE,
|
||||||
INACTIVE
|
INACTIVE
|
||||||
}
|
}
|
||||||
|
@Enumerated(EnumType.STRING)
|
||||||
|
private MaritalStatus maritalStatus;
|
||||||
public enum MaritalStatus {
|
public enum MaritalStatus {
|
||||||
SINGLE,
|
SINGLE,
|
||||||
MARRIED,
|
MARRIED,
|
||||||
WIDOWED,
|
WIDOWED,
|
||||||
DIVORCED
|
DIVORCED
|
||||||
}
|
}
|
||||||
|
@Enumerated(EnumType.STRING)
|
||||||
|
private Gender gender;
|
||||||
|
public enum Gender {
|
||||||
|
MALE,
|
||||||
|
FEMALE
|
||||||
|
}
|
||||||
|
|
||||||
public Status getStatus() {
|
public Status getStatus() {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
package com.primefactorsolutions.views;
|
||||||
|
|
||||||
|
import com.vaadin.flow.component.html.Main;
|
||||||
|
import com.vaadin.flow.router.PageTitle;
|
||||||
|
import com.vaadin.flow.router.Route;
|
||||||
|
import com.vaadin.flow.spring.annotation.SpringComponent;
|
||||||
|
import jakarta.annotation.security.PermitAll;
|
||||||
|
import org.springframework.context.annotation.Scope;
|
||||||
|
|
||||||
|
@SpringComponent
|
||||||
|
@PermitAll
|
||||||
|
@Scope("prototype")
|
||||||
|
@PageTitle("CorporateDocuments")
|
||||||
|
@Route(value = "/corporate-documents/me", layout = MainLayout.class)
|
||||||
|
public class CorporateDocumentsView extends Main {
|
||||||
|
}
|
@ -36,44 +36,94 @@ import java.util.UUID;
|
|||||||
@PageTitle("Employee")
|
@PageTitle("Employee")
|
||||||
@Route(value = "/employees/:employeeId?/:action?", layout = MainLayout.class)
|
@Route(value = "/employees/:employeeId?/:action?", layout = MainLayout.class)
|
||||||
public class EmployeeView extends BeanValidationForm<Employee> implements HasUrlParameter<String> {
|
public class EmployeeView extends BeanValidationForm<Employee> implements HasUrlParameter<String> {
|
||||||
|
|
||||||
private static final String SAVE_BUTTON_TEXT = "Save";
|
|
||||||
private static final String EDIT_BUTTON_TEXT = "Edit";
|
|
||||||
private static final String NOTIFICATION_SAVE_SUCCESS = "Employee saved successfully.";
|
|
||||||
private static final String NOTIFICATION_VALIDATE_ERROR = "Please complete the required fields correctly.";
|
|
||||||
private static final String PHONE_NUMBER_ERROR_MESSAGE = "El teléfono debe contener solo números.";
|
|
||||||
|
|
||||||
private final EmployeeService employeeService;
|
private final EmployeeService employeeService;
|
||||||
|
|
||||||
// TODO: campo usado para registrar al empleado en LDAP. Este campo podria estar en otro form eventualmente.
|
// TODO: campo usado para registrar al empleado en LDAP. Este campo podria estar en otro form eventualmente.
|
||||||
|
// INFORMACION PERSONAL
|
||||||
private final TextField username = createTextField("Username: ", 30, true);
|
private final TextField username = createTextField("Username: ", 30, true);
|
||||||
private final TextField firstName = createTextField("Nombres: ", 30, true);
|
private final TextField firstName = createTextField("Nombres: ", 30, true);
|
||||||
private final TextField lastName = createTextField("Apellidos", 30, true);
|
private final TextField lastName = createTextField("Apellidos", 30, true);
|
||||||
private final ComboBox<Employee.Status> status = createStatusComboBox();
|
private final ComboBox<Employee.Status> status = createStatusComboBox();
|
||||||
|
private final ComboBox<Employee.Gender> gender = createGenderComboBox();
|
||||||
private final VDatePicker birthday = new VDatePicker("Fecha de Nacimiento");
|
private final VDatePicker birthday = new VDatePicker("Fecha de Nacimiento");
|
||||||
|
private final TextField age = createTextField("Edad", 3, false);
|
||||||
private final TextField birthCity = createTextField("Ciudad y País de Nacimiento", 20, false);
|
private final TextField birthCity = createTextField("Ciudad y País de Nacimiento", 20, false);
|
||||||
|
private final TextField residenceAddress = createTextField("Dirección de Domicilio Actual", 50, false);
|
||||||
|
private final TextField localAddress = createTextField("Dep/Provincia de Residencia", 10, false);
|
||||||
private final ComboBox<Employee.MaritalStatus> maritalStatus = createMaritalStatusComboBox();
|
private final ComboBox<Employee.MaritalStatus> maritalStatus = createMaritalStatusComboBox();
|
||||||
private final TextField residenceAddress = createTextField("Dirección de Residencia", 50, false);
|
private final TextField numberOfChildren = createTextField("Numero de Hijos", 3, false);
|
||||||
|
private final TextField ci = createTextField("CI", 30, false);
|
||||||
|
private final TextField issuedIn = createTextField("Expedido en ", 30, false);
|
||||||
private final TextField phoneNumber = createTextField("Teléfono", 8, false);
|
private final TextField phoneNumber = createTextField("Teléfono", 8, false);
|
||||||
private final EmailField personalEmail = createEmailField("E-mail");
|
private final EmailField personalEmail = createEmailField("E-mail");
|
||||||
|
private final TextField cod = createTextField("Codigo de Empleado", 30, false);
|
||||||
private final TextField position = createTextField("Cargo", 30, false);
|
private final TextField position = createTextField("Cargo", 30, false);
|
||||||
private final TextField team = createTextField("Equipo", 30, false);
|
private final TextField team = createTextField("Equipo", 30, false);
|
||||||
|
private final TextField leadManager = createTextField("Lead/Manager", 30, false);
|
||||||
|
private final TextField project = createTextField("Proyecto", 30, false);
|
||||||
private final TextField emergencyCName = createTextField("Nombres y Apellidos de Contacto", 50, false);
|
private final TextField emergencyCName = createTextField("Nombres y Apellidos de Contacto", 50, false);
|
||||||
private final TextField emergencyCAddress = createTextField("Dirección de Contacto", 50, false);
|
private final TextField emergencyCAddress = createTextField("Dirección de Contacto", 50, false);
|
||||||
private final TextField emergencyCPhone = createTextField("Teléfono de Contacto", 8, false);
|
private final TextField emergencyCPhone = createTextField("Teléfono de Contacto", 8, false);
|
||||||
private final EmailField emergencyCEmail = createEmailField("Email de Contacto");
|
private final EmailField emergencyCEmail = createEmailField("Email de Contacto");
|
||||||
|
|
||||||
private final MemoryBuffer buffer = new MemoryBuffer();
|
private final MemoryBuffer buffer = new MemoryBuffer();
|
||||||
private final Upload upload = new Upload(buffer);
|
private final Upload upload = new Upload(buffer);
|
||||||
private final Image profileImagePreview = new Image();
|
private final Image profileImagePreview = new Image();
|
||||||
|
|
||||||
|
//INFORMACION PROFESIONAL
|
||||||
|
private final TextField pTitle1 = createTextField("Título 1", 30, false);
|
||||||
|
private final TextField pTitle2 = createTextField("Título 2", 30, false);
|
||||||
|
private final TextField pTitle3 = createTextField("Título 3", 30, false);
|
||||||
|
private final TextField pStudy1 = createTextField("Estudio 1", 30, false);
|
||||||
|
private final TextField pStudy2 = createTextField("Estudio 2", 30, false);
|
||||||
|
private final TextField pStudy3 = createTextField("Estudio 3", 30, false);
|
||||||
|
private final TextField certification1 = createTextField("Certificación 1", 30, false);
|
||||||
|
private final TextField certification2 = createTextField("Certificación 2", 30, false);
|
||||||
|
private final TextField certification3 = createTextField("Certificación 3", 30, false);
|
||||||
|
private final TextField certification4 = createTextField("Certificación 4", 30, false);
|
||||||
|
private final TextField recognition = createTextField("Reconocimientos", 30, false);
|
||||||
|
private final TextField achievements = createTextField("Logros Profesionales", 30, false);
|
||||||
|
private final TextField language = createTextField("Idioma", 30, false);
|
||||||
|
private final TextField languageLevel = createTextField("Nivel de Idioma", 30, false);
|
||||||
|
|
||||||
|
//INFORMACION DE CONTRATACION
|
||||||
|
private final VDatePicker dateOfEntry = new VDatePicker("Fecha de Ingreso");
|
||||||
|
private final VDatePicker dateOfExit = new VDatePicker("Fecha de Retiro");
|
||||||
|
private final TextField contractType = createTextField("Tipo de Contratación", 30, false);
|
||||||
|
private final TextField seniority = createTextField("Antiguedad", 30, false);
|
||||||
|
private final TextField salary = createTextField("Salario", 30, false);
|
||||||
|
private final TextField bankName = createTextField("Banco", 30, false);
|
||||||
|
private final TextField accountNumber = createTextField("Nro. de Cuenta", 30, false);
|
||||||
|
private final TextField gpss = createTextField("Código Único de Asegurado (GPSS)", 30, false);
|
||||||
|
private final TextField sss = createTextField("Matricula de Asegurado (SSS)", 30, false);
|
||||||
|
private final TextField beneficiaries = createTextField("Derechohabientes", 30, false);
|
||||||
|
|
||||||
|
//TITULOS PARA INFORMACION PERSONAL
|
||||||
|
private final H2 infoPer = new H2("Información Personal");
|
||||||
|
private final H3 infoGenr = new H3("Información General");
|
||||||
|
private final H3 contEmerg = new H3("Contacto de Emergencia");
|
||||||
|
//TITULOS PARA INFORMACIÓN PROFESIONAL
|
||||||
|
private final H2 infProf = new H2("Información Profesional");
|
||||||
|
private final H3 titulos = new H3("Titulos Profesionales y Estudios Realizados");
|
||||||
|
private final H3 certif = new H3("Certificaciones Profesionales");
|
||||||
|
private final H3 logros = new H3("Otros Logros y Reconocimientos");
|
||||||
|
private final H3 idioma = new H3("Dominio de Idiomas");
|
||||||
|
//TITULOS PARA INFORMACIÓN ADMINISTRATIVA
|
||||||
|
private final H2 infoAdm = new H2("Información Administrativa");
|
||||||
|
private final H3 infoCont = new H3("Información de Contratación");
|
||||||
|
private final H3 datBanc = new H3("Datos Bancados");
|
||||||
|
private final H3 datGest = new H3("Datos Gestora Pública y Seguro Social");
|
||||||
|
|
||||||
|
//BOTONES
|
||||||
|
private static final String SAVE_BUTTON_TEXT = "Save";
|
||||||
|
private static final String EDIT_BUTTON_TEXT = "Edit";
|
||||||
private final Button saveButton = new Button(SAVE_BUTTON_TEXT, e -> saveEmployee());
|
private final Button saveButton = new Button(SAVE_BUTTON_TEXT, e -> saveEmployee());
|
||||||
private final Button editButton = new Button(EDIT_BUTTON_TEXT, e -> enableEditMode());
|
private final Button editButton = new Button(EDIT_BUTTON_TEXT, e -> enableEditMode());
|
||||||
|
|
||||||
private final H2 mt = new H2("Información General del Empleado");
|
//ALERTAS
|
||||||
private final H3 fs = new H3("Información Personal");
|
private static final String NOTIFICATION_SAVE_SUCCESS = "Employee saved successfully.";
|
||||||
private final H3 ss = new H3("Datos de Contacto de Emergencia");
|
private static final String NOTIFICATION_VALIDATE_ERROR = "Please complete the required fields correctly.";
|
||||||
private final H3 si = new H3("Foto del Empleado");
|
private static final String PHONE_NUMBER_ERROR_MESSAGE = "El teléfono debe contener solo números.";
|
||||||
|
|
||||||
|
|
||||||
public EmployeeView(final EmployeeService employeeService) {
|
public EmployeeView(final EmployeeService employeeService) {
|
||||||
super(Employee.class);
|
super(Employee.class);
|
||||||
@ -92,6 +142,18 @@ public class EmployeeView extends BeanValidationForm<Employee> implements HasUrl
|
|||||||
configureUpload();
|
configureUpload();
|
||||||
saveButton.setVisible(true);
|
saveButton.setVisible(true);
|
||||||
editButton.setVisible(true);
|
editButton.setVisible(true);
|
||||||
|
|
||||||
|
birthday.addValueChangeListener(event -> calculateAge());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void calculateAge() {
|
||||||
|
if (birthday.getValue() != null) {
|
||||||
|
int currentYear = java.time.LocalDate.now().getYear();
|
||||||
|
int birthYear = birthday.getValue().getYear();
|
||||||
|
int ages = currentYear - birthYear;
|
||||||
|
age.setValue(String.valueOf(ages));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void configureUpload() {
|
private void configureUpload() {
|
||||||
@ -124,27 +186,62 @@ public class EmployeeView extends BeanValidationForm<Employee> implements HasUrl
|
|||||||
HorizontalLayout mainLayout = new HorizontalLayout();
|
HorizontalLayout mainLayout = new HorizontalLayout();
|
||||||
VerticalLayout contentLayout1 = createContentLayout();
|
VerticalLayout contentLayout1 = createContentLayout();
|
||||||
VerticalLayout contentLayout2 = createContentLayout();
|
VerticalLayout contentLayout2 = createContentLayout();
|
||||||
|
VerticalLayout contentLayout3 = createContentLayout();
|
||||||
|
|
||||||
contentLayout1.add(
|
contentLayout1.add(
|
||||||
mt,
|
infoPer,
|
||||||
fs,
|
infoGenr,
|
||||||
firstName,
|
upload, profileImagePreview,
|
||||||
lastName,
|
firstName, lastName,
|
||||||
status,
|
gender, status,
|
||||||
birthday,
|
birthday, age,
|
||||||
birthCity,
|
birthCity, residenceAddress, localAddress,
|
||||||
maritalStatus,
|
maritalStatus, ci, issuedIn, numberOfChildren,
|
||||||
residenceAddress,
|
phoneNumber, personalEmail,
|
||||||
phoneNumber,
|
cod, position, team, leadManager, project,
|
||||||
personalEmail,
|
contEmerg,
|
||||||
position,
|
emergencyCName, emergencyCAddress, emergencyCPhone, emergencyCEmail);
|
||||||
team);
|
|
||||||
contentLayout2.add(
|
contentLayout2.add(
|
||||||
ss, emergencyCName, emergencyCAddress,
|
infProf,
|
||||||
emergencyCPhone, emergencyCEmail, si, upload,
|
titulos,
|
||||||
profileImagePreview, saveButton, editButton);
|
pTitle1, pTitle2, pTitle3,
|
||||||
|
pStudy1, pStudy2, pStudy3,
|
||||||
|
certif,
|
||||||
|
certification1, certification2, certification3, certification4,
|
||||||
|
logros,
|
||||||
|
recognition, achievements,
|
||||||
|
idioma,
|
||||||
|
language, languageLevel
|
||||||
|
);
|
||||||
|
contentLayout3.add(
|
||||||
|
infoAdm,
|
||||||
|
infoCont,
|
||||||
|
dateOfEntry, dateOfExit,
|
||||||
|
contractType, seniority, salary,
|
||||||
|
datBanc,
|
||||||
|
bankName, accountNumber,
|
||||||
|
datGest,
|
||||||
|
gpss, sss, beneficiaries
|
||||||
|
);
|
||||||
|
|
||||||
mainLayout.add(contentLayout1, contentLayout2);
|
mainLayout.add(contentLayout1, infProf,
|
||||||
|
titulos,
|
||||||
|
pTitle1, pTitle2, pTitle3,
|
||||||
|
pStudy1, pStudy2, pStudy3,
|
||||||
|
certif,
|
||||||
|
certification1, certification2, certification3, certification4,
|
||||||
|
logros,
|
||||||
|
recognition, achievements,
|
||||||
|
idioma,
|
||||||
|
language, languageLevel,
|
||||||
|
infoAdm,
|
||||||
|
infoCont,
|
||||||
|
dateOfEntry, dateOfExit,
|
||||||
|
contractType, seniority, salary,
|
||||||
|
datBanc,
|
||||||
|
bankName, accountNumber,
|
||||||
|
datGest,
|
||||||
|
gpss, sss, beneficiaries, saveButton, editButton);
|
||||||
addClassName("main-layout");
|
addClassName("main-layout");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,7 +256,15 @@ public class EmployeeView extends BeanValidationForm<Employee> implements HasUrl
|
|||||||
ComboBox<Employee.Status> comboBox = new ComboBox<>("Estado");
|
ComboBox<Employee.Status> comboBox = new ComboBox<>("Estado");
|
||||||
comboBox.setItems(Employee.Status.values());
|
comboBox.setItems(Employee.Status.values());
|
||||||
comboBox.setItemLabelGenerator(Employee.Status::name);
|
comboBox.setItemLabelGenerator(Employee.Status::name);
|
||||||
comboBox.setRequiredIndicatorVisible(true); // Indicador de campo requerido
|
comboBox.setRequiredIndicatorVisible(true);
|
||||||
|
return comboBox;
|
||||||
|
}
|
||||||
|
|
||||||
|
private ComboBox<Employee.Gender> createGenderComboBox() {
|
||||||
|
ComboBox<Employee.Gender> comboBox = new ComboBox<>("Genero");
|
||||||
|
comboBox.setItems(Employee.Gender.values());
|
||||||
|
comboBox.setItemLabelGenerator(Employee.Gender::name);
|
||||||
|
comboBox.setRequiredIndicatorVisible(true);
|
||||||
return comboBox;
|
return comboBox;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -277,6 +382,38 @@ public class EmployeeView extends BeanValidationForm<Employee> implements HasUrl
|
|||||||
emergencyCEmail.setReadOnly(true);
|
emergencyCEmail.setReadOnly(true);
|
||||||
upload.setVisible(true);
|
upload.setVisible(true);
|
||||||
profileImagePreview.setVisible(true);
|
profileImagePreview.setVisible(true);
|
||||||
|
age.setReadOnly(true);
|
||||||
|
gender.setReadOnly(true);
|
||||||
|
status.setReadOnly(true);
|
||||||
|
ci.setReadOnly(true);
|
||||||
|
issuedIn.setReadOnly(true);
|
||||||
|
pTitle1.setReadOnly(true);
|
||||||
|
pTitle2.setReadOnly(true);
|
||||||
|
pTitle3.setReadOnly(true);
|
||||||
|
pStudy1.setReadOnly(true);
|
||||||
|
pStudy2.setReadOnly(true);
|
||||||
|
pStudy3.setReadOnly(true);
|
||||||
|
certification1.setReadOnly(true);
|
||||||
|
certification2.setReadOnly(true);
|
||||||
|
certification3.setReadOnly(true);
|
||||||
|
certification4.setReadOnly(true);
|
||||||
|
recognition.setReadOnly(true);
|
||||||
|
achievements.setReadOnly(true);
|
||||||
|
language.setReadOnly(true);
|
||||||
|
languageLevel.setReadOnly(true);
|
||||||
|
cod.setReadOnly(true);
|
||||||
|
leadManager.setReadOnly(true);
|
||||||
|
project.setReadOnly(true);
|
||||||
|
dateOfEntry.setReadOnly(true);
|
||||||
|
dateOfExit.setReadOnly(true);
|
||||||
|
contractType.setReadOnly(true);
|
||||||
|
seniority.setReadOnly(true);
|
||||||
|
salary.setReadOnly(true);
|
||||||
|
bankName.setReadOnly(true);
|
||||||
|
accountNumber.setReadOnly(true);
|
||||||
|
gpss.setReadOnly(true);
|
||||||
|
sss.setReadOnly(true);
|
||||||
|
beneficiaries.setReadOnly(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setFieldsEditable() {
|
private void setFieldsEditable() {
|
||||||
@ -296,14 +433,64 @@ public class EmployeeView extends BeanValidationForm<Employee> implements HasUrl
|
|||||||
emergencyCPhone.setReadOnly(false);
|
emergencyCPhone.setReadOnly(false);
|
||||||
emergencyCEmail.setReadOnly(false);
|
emergencyCEmail.setReadOnly(false);
|
||||||
upload.setVisible(true);
|
upload.setVisible(true);
|
||||||
|
age.setReadOnly(false);
|
||||||
|
gender.setReadOnly(false);
|
||||||
|
status.setReadOnly(false);
|
||||||
|
ci.setReadOnly(false);
|
||||||
|
issuedIn.setReadOnly(false);
|
||||||
|
pTitle1.setReadOnly(false);
|
||||||
|
pTitle2.setReadOnly(false);
|
||||||
|
pTitle3.setReadOnly(false);
|
||||||
|
pStudy1.setReadOnly(false);
|
||||||
|
pStudy2.setReadOnly(false);
|
||||||
|
pStudy3.setReadOnly(false);
|
||||||
|
certification1.setReadOnly(false);
|
||||||
|
certification2.setReadOnly(false);
|
||||||
|
certification3.setReadOnly(false);
|
||||||
|
certification4.setReadOnly(false);
|
||||||
|
recognition.setReadOnly(false);
|
||||||
|
achievements.setReadOnly(false);
|
||||||
|
language.setReadOnly(false);
|
||||||
|
languageLevel.setReadOnly(false);
|
||||||
|
cod.setReadOnly(false);
|
||||||
|
leadManager.setReadOnly(false);
|
||||||
|
project.setReadOnly(false);
|
||||||
|
dateOfEntry.setReadOnly(false);
|
||||||
|
dateOfExit.setReadOnly(false);
|
||||||
|
contractType.setReadOnly(false);
|
||||||
|
seniority.setReadOnly(false);
|
||||||
|
salary.setReadOnly(false);
|
||||||
|
bankName.setReadOnly(false);
|
||||||
|
accountNumber.setReadOnly(false);
|
||||||
|
gpss.setReadOnly(false);
|
||||||
|
sss.setReadOnly(false);
|
||||||
|
beneficiaries.setReadOnly(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected List<Component> getFormComponents() {
|
protected List<Component> getFormComponents() {
|
||||||
return List.of(
|
return List.of(
|
||||||
mt, fs, username, firstName, lastName, status, birthday, birthCity, maritalStatus,
|
username,
|
||||||
residenceAddress, phoneNumber, personalEmail, position, team, ss, emergencyCName,
|
infoPer,
|
||||||
emergencyCAddress, emergencyCPhone, emergencyCEmail, si, upload, profileImagePreview,
|
infoGenr,
|
||||||
|
upload, profileImagePreview,
|
||||||
|
firstName, lastName,
|
||||||
|
gender, status,
|
||||||
|
birthday, age,
|
||||||
|
birthCity, residenceAddress, localAddress,
|
||||||
|
maritalStatus, ci, issuedIn, numberOfChildren,
|
||||||
|
phoneNumber, personalEmail,
|
||||||
|
cod, position, team, leadManager, project,
|
||||||
|
contEmerg, emergencyCName, emergencyCAddress, emergencyCPhone, emergencyCEmail,
|
||||||
|
infProf,
|
||||||
|
titulos, pTitle1, pTitle2, pTitle3, pStudy1, pStudy2, pStudy3,
|
||||||
|
certif, certification1, certification2, certification3, certification4,
|
||||||
|
logros, recognition, achievements,
|
||||||
|
idioma, language, languageLevel,
|
||||||
|
infoAdm,
|
||||||
|
infoCont, dateOfEntry, dateOfExit, contractType, seniority, salary,
|
||||||
|
datBanc, bankName, accountNumber,
|
||||||
|
datGest, gpss, sss, beneficiaries,
|
||||||
saveButton, editButton
|
saveButton, editButton
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
package com.primefactorsolutions.views;
|
||||||
|
|
||||||
|
import com.vaadin.flow.component.html.Main;
|
||||||
|
import com.vaadin.flow.router.PageTitle;
|
||||||
|
import com.vaadin.flow.router.Route;
|
||||||
|
import com.vaadin.flow.spring.annotation.SpringComponent;
|
||||||
|
import jakarta.annotation.security.PermitAll;
|
||||||
|
import org.springframework.context.annotation.Scope;
|
||||||
|
|
||||||
|
@SpringComponent
|
||||||
|
@PermitAll
|
||||||
|
@Scope("prototype")
|
||||||
|
@PageTitle("GovernmentDocumentsView")
|
||||||
|
@Route(value = "/government-documents/me", layout = MainLayout.class)
|
||||||
|
public class GovernmentDocumentsView extends Main {
|
||||||
|
}
|
@ -107,17 +107,29 @@ public class MainLayout extends AppLayout {
|
|||||||
admin.addItem(new SideNavItem("Employees", EmployeesListView.class,
|
admin.addItem(new SideNavItem("Employees", EmployeesListView.class,
|
||||||
LineAwesomeIcon.USER_EDIT_SOLID.create()));
|
LineAwesomeIcon.USER_EDIT_SOLID.create()));
|
||||||
|
|
||||||
|
SideNavItem documents = new SideNavItem("Documents", MainView.class,
|
||||||
|
LineAwesomeIcon.FILE_ALT_SOLID.create());
|
||||||
|
documents.addItem(new SideNavItem("Personal Documents", PersonalDocumentsView.class,
|
||||||
|
LineAwesomeIcon.ID_CARD_SOLID.create()));
|
||||||
|
documents.addItem(new SideNavItem("Professional Documents", ProfessionalDocumentsView.class,
|
||||||
|
LineAwesomeIcon.BRIEFCASE_SOLID.create()));
|
||||||
|
documents.addItem(new SideNavItem("Work Documents", WorkDocumentsView.class,
|
||||||
|
LineAwesomeIcon.FOLDER_OPEN_SOLID.create()));
|
||||||
|
documents.addItem(new SideNavItem("Corporate Documents", CorporateDocumentsView.class,
|
||||||
|
LineAwesomeIcon.BUILDING_SOLID.create()));
|
||||||
|
documents.addItem(new SideNavItem("Government Documents", GovernmentDocumentsView.class,
|
||||||
|
LineAwesomeIcon.BALANCE_SCALE_SOLID.create()));
|
||||||
|
|
||||||
SideNavItem timeOff = new SideNavItem("My Time-off", TimeoffView.class,
|
SideNavItem timeOff = new SideNavItem("My Time-off", TimeoffView.class,
|
||||||
LineAwesomeIcon.PLANE_DEPARTURE_SOLID.create());
|
LineAwesomeIcon.PLANE_DEPARTURE_SOLID.create());
|
||||||
SideNavItem timesheet = new SideNavItem("My Timesheet", TimesheetView.class,
|
SideNavItem timesheet = new SideNavItem("My Timesheet", TimesheetView.class,
|
||||||
LineAwesomeIcon.HOURGLASS_START_SOLID.create());
|
LineAwesomeIcon.HOURGLASS_START_SOLID.create());
|
||||||
SideNavItem profile = new SideNavItem("My Profile", ProfileView.class,
|
SideNavItem profile = new SideNavItem("My Profile", ProfileView.class,
|
||||||
LineAwesomeIcon.USER_EDIT_SOLID.create());
|
LineAwesomeIcon.USER_EDIT_SOLID.create());
|
||||||
SideNavItem documents = new SideNavItem("My Documents", DocumentsView.class,
|
|
||||||
LineAwesomeIcon.SUITCASE_SOLID.create());
|
|
||||||
|
|
||||||
nav.addItem(new SideNavItem("Home", MainView.class, LineAwesomeIcon.HOME_SOLID.create()));
|
nav.addItem(new SideNavItem("Home", MainView.class, LineAwesomeIcon.HOME_SOLID.create()));
|
||||||
nav.addItem(admin);
|
nav.addItem(admin);
|
||||||
|
nav.addItem(documents);
|
||||||
nav.addItem(recruiting);
|
nav.addItem(recruiting);
|
||||||
nav.addItem(profile);
|
nav.addItem(profile);
|
||||||
nav.addItem(timesheet);
|
nav.addItem(timesheet);
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
package com.primefactorsolutions.views;
|
||||||
|
|
||||||
|
import com.vaadin.flow.component.html.Main;
|
||||||
|
import com.vaadin.flow.router.PageTitle;
|
||||||
|
import com.vaadin.flow.router.Route;
|
||||||
|
import com.vaadin.flow.spring.annotation.SpringComponent;
|
||||||
|
import jakarta.annotation.security.PermitAll;
|
||||||
|
import org.springframework.context.annotation.Scope;
|
||||||
|
|
||||||
|
@SpringComponent
|
||||||
|
@PermitAll
|
||||||
|
@Scope("prototype")
|
||||||
|
@PageTitle("PersonalDocuments")
|
||||||
|
@Route(value = "/personal-documents/me", layout = MainLayout.class)
|
||||||
|
public class PersonalDocumentsView extends Main {
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
package com.primefactorsolutions.views;
|
||||||
|
|
||||||
|
import com.vaadin.flow.component.html.Main;
|
||||||
|
import com.vaadin.flow.router.PageTitle;
|
||||||
|
import com.vaadin.flow.router.Route;
|
||||||
|
import com.vaadin.flow.spring.annotation.SpringComponent;
|
||||||
|
import jakarta.annotation.security.PermitAll;
|
||||||
|
import org.springframework.context.annotation.Scope;
|
||||||
|
|
||||||
|
@SpringComponent
|
||||||
|
@PermitAll
|
||||||
|
@Scope("prototype")
|
||||||
|
@PageTitle("ProfessionalDocuments")
|
||||||
|
@Route(value = "/professional-documents/me", layout = MainLayout.class)
|
||||||
|
public class ProfessionalDocumentsView extends Main {
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
package com.primefactorsolutions.views;
|
||||||
|
|
||||||
|
import com.vaadin.flow.component.html.Main;
|
||||||
|
import com.vaadin.flow.router.PageTitle;
|
||||||
|
import com.vaadin.flow.router.Route;
|
||||||
|
import com.vaadin.flow.spring.annotation.SpringComponent;
|
||||||
|
import jakarta.annotation.security.PermitAll;
|
||||||
|
import org.springframework.context.annotation.Scope;
|
||||||
|
|
||||||
|
@SpringComponent
|
||||||
|
@PermitAll
|
||||||
|
@Scope("prototype")
|
||||||
|
@PageTitle("WorkDocuments")
|
||||||
|
@Route(value = "/work-documents/me", layout = MainLayout.class)
|
||||||
|
public class WorkDocumentsView extends Main {
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user