From e349503fb48890d3e0c29fe3b8088843a9bcee7a Mon Sep 17 00:00:00 2001 From: ricardo051199 Date: Mon, 23 Sep 2024 13:50:27 -0400 Subject: [PATCH] Change menu --- .../views/CorporateDocumentsView.java | 31 --------------- .../views/GovernmentDocumentsView.java | 39 ------------------- .../views/MainLayout.java | 22 ++--------- .../views/PersonalDocumentsView.java | 30 -------------- .../views/ProfessionalDocumentsView.java | 31 --------------- .../views/WorkDocumentsView.java | 31 --------------- 6 files changed, 3 insertions(+), 181 deletions(-) delete mode 100644 src/main/java/com/primefactorsolutions/views/CorporateDocumentsView.java delete mode 100644 src/main/java/com/primefactorsolutions/views/GovernmentDocumentsView.java delete mode 100644 src/main/java/com/primefactorsolutions/views/PersonalDocumentsView.java delete mode 100644 src/main/java/com/primefactorsolutions/views/ProfessionalDocumentsView.java delete mode 100644 src/main/java/com/primefactorsolutions/views/WorkDocumentsView.java diff --git a/src/main/java/com/primefactorsolutions/views/CorporateDocumentsView.java b/src/main/java/com/primefactorsolutions/views/CorporateDocumentsView.java deleted file mode 100644 index 9810e85..0000000 --- a/src/main/java/com/primefactorsolutions/views/CorporateDocumentsView.java +++ /dev/null @@ -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)); - } -} diff --git a/src/main/java/com/primefactorsolutions/views/GovernmentDocumentsView.java b/src/main/java/com/primefactorsolutions/views/GovernmentDocumentsView.java deleted file mode 100644 index 826be3d..0000000 --- a/src/main/java/com/primefactorsolutions/views/GovernmentDocumentsView.java +++ /dev/null @@ -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 - )); - } -} diff --git a/src/main/java/com/primefactorsolutions/views/MainLayout.java b/src/main/java/com/primefactorsolutions/views/MainLayout.java index 78e3e50..b5bbcf6 100644 --- a/src/main/java/com/primefactorsolutions/views/MainLayout.java +++ b/src/main/java/com/primefactorsolutions/views/MainLayout.java @@ -81,25 +81,10 @@ public class MainLayout extends AppLayout { SideNavItem admin = new SideNavItem("Admin", MainView.class, LineAwesomeIcon.SUPERSCRIPT_SOLID.create()); - admin.addItem(new SideNavItem("Requests", RequestsListView.class, - LineAwesomeIcon.TASKS_SOLID.create())); - admin.addItem(new SideNavItem("Timesheets", TimesheestReportView.class, - LineAwesomeIcon.HOURGLASS_END_SOLID.create())); - admin.addItem(new SideNavItem("Employees", EmployeesListView.class, + admin.addItem(new SideNavItem("Employees", EmployeeView.class, 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())); + admin.addItem(new SideNavItem("Documents", DocumentsView.class, + LineAwesomeIcon.FILE_ALT_SOLID.create())); SideNavItem timeOff = new SideNavItem("My Time-off", TimeoffView.class, 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(admin); - nav.addItem(documents); nav.addItem(recruiting); nav.addItem(profile); nav.addItem(timesheet); diff --git a/src/main/java/com/primefactorsolutions/views/PersonalDocumentsView.java b/src/main/java/com/primefactorsolutions/views/PersonalDocumentsView.java deleted file mode 100644 index b56535e..0000000 --- a/src/main/java/com/primefactorsolutions/views/PersonalDocumentsView.java +++ /dev/null @@ -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)); - } -} diff --git a/src/main/java/com/primefactorsolutions/views/ProfessionalDocumentsView.java b/src/main/java/com/primefactorsolutions/views/ProfessionalDocumentsView.java deleted file mode 100644 index 9f8ec85..0000000 --- a/src/main/java/com/primefactorsolutions/views/ProfessionalDocumentsView.java +++ /dev/null @@ -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)); - } -} diff --git a/src/main/java/com/primefactorsolutions/views/WorkDocumentsView.java b/src/main/java/com/primefactorsolutions/views/WorkDocumentsView.java deleted file mode 100644 index c3b7892..0000000 --- a/src/main/java/com/primefactorsolutions/views/WorkDocumentsView.java +++ /dev/null @@ -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)); - } -}