Change menu

This commit is contained in:
jesus.pelaez 2024-09-23 13:50:27 -04:00
parent 613221dfb6
commit e349503fb4
6 changed files with 3 additions and 181 deletions

View File

@ -1,31 +0,0 @@
package com.primefactorsolutions.views;
import com.primefactorsolutions.model.DocumentType;
import com.primefactorsolutions.service.DocumentService;
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 DocumentsView {
public CorporateDocumentsView(final DocumentService documentService) {
super(documentService);
}
@Override
protected void initializeLayout() {
add(createRow("General Labor Regulations", DocumentType.GENERAL_LABOR_REGULATIONS,
"Remote Work Guidelines", DocumentType.REMOTE_WORK_GUIDELINES));
add(createRow("Safety Regulations", DocumentType.SAFETY_REGULATIONS,
"Human Resources Guidelines", DocumentType.HUMAN_RESOURCES_GUIDELINES));
add(createRow("Administration Functions Manual", DocumentType.ADMINISTRATION_FUNCTIONS_MANUAL,
"Engineering Functions Manual", DocumentType.ENGINEERING_FUNCTIONS_MANUAL));
}
}

View File

@ -1,39 +0,0 @@
package com.primefactorsolutions.views;
import com.primefactorsolutions.model.DocumentType;
import com.primefactorsolutions.service.DocumentService;
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 DocumentsView {
public GovernmentDocumentsView(final DocumentService documentService) {
super(documentService);
}
@Override
protected void initializeLayout() {
add(createRow(
"General Labor Law", DocumentType.GENERAL_LABOR_LAW,
"Supreme Decrees", DocumentType.SUPREME_DECREE
));
add(createRow(
"Regulatory Resolutions/Provisions", DocumentType.REGULATORY_RESOLUTION,
"Complementary Regulations", DocumentType.COMPLEMENTARY_REGULATION
));
add(createRow(
"General Law on Hygiene, Health, Occupational Safety, and Well-being", DocumentType.HEALTH_SAFETY_LAW,
"Regulatory Framework for Internship Development", DocumentType.INTERNSHIP_RULES
));
}
}

View File

@ -81,25 +81,10 @@ public class MainLayout extends AppLayout {
SideNavItem admin = new SideNavItem("Admin", MainView.class, SideNavItem admin = new SideNavItem("Admin", MainView.class,
LineAwesomeIcon.SUPERSCRIPT_SOLID.create()); LineAwesomeIcon.SUPERSCRIPT_SOLID.create());
admin.addItem(new SideNavItem("Requests", RequestsListView.class, admin.addItem(new SideNavItem("Employees", EmployeeView.class,
LineAwesomeIcon.TASKS_SOLID.create()));
admin.addItem(new SideNavItem("Timesheets", TimesheestReportView.class,
LineAwesomeIcon.HOURGLASS_END_SOLID.create()));
admin.addItem(new SideNavItem("Employees", EmployeesListView.class,
LineAwesomeIcon.USER_EDIT_SOLID.create())); LineAwesomeIcon.USER_EDIT_SOLID.create()));
admin.addItem(new SideNavItem("Documents", DocumentsView.class,
SideNavItem documents = new SideNavItem("Documents", MainView.class, LineAwesomeIcon.FILE_ALT_SOLID.create()));
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());
@ -110,7 +95,6 @@ public class MainLayout extends AppLayout {
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);

View File

@ -1,30 +0,0 @@
package com.primefactorsolutions.views;
import com.primefactorsolutions.model.DocumentType;
import com.primefactorsolutions.service.DocumentService;
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 DocumentsView {
public PersonalDocumentsView(final DocumentService documentService) {
super(documentService);
}
@Override
protected void initializeLayout() {
add(createRow("Identity Card", DocumentType.ID_CARD,
"Background check certificate", DocumentType.BACKGROUND_CHECK_CERTIFICATE));
add(createRow("Pre-employment evaluation", DocumentType.PRE_EMPLOYMENT_EVALUATION,
"Insurance registration form", DocumentType.INSURANCE_REGISTRATION_FORM));
add(createRow("Insurance cancellation form", DocumentType.INSURANCE_CANCELLATION_FORM));
}
}

View File

@ -1,31 +0,0 @@
package com.primefactorsolutions.views;
import com.primefactorsolutions.model.DocumentType;
import com.primefactorsolutions.service.DocumentService;
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 DocumentsView {
public ProfessionalDocumentsView(final DocumentService documentService) {
super(documentService);
}
@Override
protected void initializeLayout() {
add(createRow("Professional Degree 1", DocumentType.PROFESSIONAL_DEGREE_1,
"Professional Certificate 1", DocumentType.PROFESSIONAL_CERTIFICATE_1));
add(createRow("Professional Degree 2", DocumentType.PROFESSIONAL_DEGREE_2,
"Professional Certificate 2", DocumentType.PROFESSIONAL_CERTIFICATE_2));
add(createRow("Professional Degree 3", DocumentType.PROFESSIONAL_DEGREE_3,
"Professional Certificate 3", DocumentType.PROFESSIONAL_CERTIFICATE_3));
}
}

View File

@ -1,31 +0,0 @@
package com.primefactorsolutions.views;
import com.primefactorsolutions.model.DocumentType;
import com.primefactorsolutions.service.DocumentService;
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 DocumentsView {
public WorkDocumentsView(final DocumentService documentService) {
super(documentService);
}
@Override
protected void initializeLayout() {
add(createRow("PaySlips", DocumentType.PAY_SLIPS,
"Employment Contract", DocumentType.EMPLOYMENT_CONTRACT));
add(createRow("Work Certificates", DocumentType.WORK_CERTIFICATES,
"NDA", DocumentType.NDA));
add(createRow("Memorandums", DocumentType.MEMORANDUMS,
"Contract Approval MTEPS", DocumentType.CONTRACT_APPROVAL_MTEPS));
}
}