From 842f90f7aa03fefd19ea443077eb76ba2418bbb0 Mon Sep 17 00:00:00 2001 From: ricardo051199 Date: Tue, 10 Sep 2024 13:02:08 -0400 Subject: [PATCH] Crear views para el modulo de documentos --- .../views/CorporateDocumentsView.java | 16 ++++++++++++++++ .../views/GovernmentDocumentsView.java | 16 ++++++++++++++++ .../primefactorsolutions/views/MainLayout.java | 16 ++++++++++++++-- .../views/PersonalDocumentsView.java | 16 ++++++++++++++++ .../views/ProfessionalDocumentsView.java | 16 ++++++++++++++++ .../views/WorkDocumentsView.java | 16 ++++++++++++++++ 6 files changed, 94 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/primefactorsolutions/views/CorporateDocumentsView.java create mode 100644 src/main/java/com/primefactorsolutions/views/GovernmentDocumentsView.java create mode 100644 src/main/java/com/primefactorsolutions/views/PersonalDocumentsView.java create mode 100644 src/main/java/com/primefactorsolutions/views/ProfessionalDocumentsView.java create 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 new file mode 100644 index 0000000..7806438 --- /dev/null +++ b/src/main/java/com/primefactorsolutions/views/CorporateDocumentsView.java @@ -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 { +} diff --git a/src/main/java/com/primefactorsolutions/views/GovernmentDocumentsView.java b/src/main/java/com/primefactorsolutions/views/GovernmentDocumentsView.java new file mode 100644 index 0000000..a06e4bf --- /dev/null +++ b/src/main/java/com/primefactorsolutions/views/GovernmentDocumentsView.java @@ -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 { +} diff --git a/src/main/java/com/primefactorsolutions/views/MainLayout.java b/src/main/java/com/primefactorsolutions/views/MainLayout.java index d96d150..78e3e50 100644 --- a/src/main/java/com/primefactorsolutions/views/MainLayout.java +++ b/src/main/java/com/primefactorsolutions/views/MainLayout.java @@ -88,17 +88,29 @@ public class MainLayout extends AppLayout { admin.addItem(new SideNavItem("Employees", EmployeesListView.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())); + SideNavItem timeOff = new SideNavItem("My Time-off", TimeoffView.class, LineAwesomeIcon.PLANE_DEPARTURE_SOLID.create()); SideNavItem timesheet = new SideNavItem("My Timesheet", TimesheetView.class, LineAwesomeIcon.HOURGLASS_START_SOLID.create()); SideNavItem profile = new SideNavItem("My Profile", ProfileView.class, 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(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 new file mode 100644 index 0000000..433b5c5 --- /dev/null +++ b/src/main/java/com/primefactorsolutions/views/PersonalDocumentsView.java @@ -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 { +} diff --git a/src/main/java/com/primefactorsolutions/views/ProfessionalDocumentsView.java b/src/main/java/com/primefactorsolutions/views/ProfessionalDocumentsView.java new file mode 100644 index 0000000..2b2badd --- /dev/null +++ b/src/main/java/com/primefactorsolutions/views/ProfessionalDocumentsView.java @@ -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 { +} diff --git a/src/main/java/com/primefactorsolutions/views/WorkDocumentsView.java b/src/main/java/com/primefactorsolutions/views/WorkDocumentsView.java new file mode 100644 index 0000000..de23e08 --- /dev/null +++ b/src/main/java/com/primefactorsolutions/views/WorkDocumentsView.java @@ -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 { +}