| @ -0,0 +1,113 @@ | |||
| { | |||
| "name": "no-name", | |||
| "license": "UNLICENSED", | |||
| "type": "module", | |||
| "dependencies": { | |||
| "@polymer/polymer": "3.5.2", | |||
| "@vaadin/bundles": "24.5.3", | |||
| "@vaadin/common-frontend": "0.0.19", | |||
| "@vaadin/polymer-legacy-adapter": "24.5.3", | |||
| "@vaadin/react-components": "24.5.3", | |||
| "@vaadin/react-components-pro": "24.5.3", | |||
| "@vaadin/router": "2.0.0", | |||
| "@vaadin/vaadin-development-mode-detector": "2.0.7", | |||
| "@vaadin/vaadin-lumo-styles": "24.5.3", | |||
| "@vaadin/vaadin-material-styles": "24.5.3", | |||
| "@vaadin/vaadin-themable-mixin": "24.5.3", | |||
| "@vaadin/vaadin-usage-statistics": "2.1.3", | |||
| "construct-style-sheets-polyfill": "3.1.0", | |||
| "date-fns": "2.29.3", | |||
| "lit": "3.2.1", | |||
| "proj4": "2.12.1", | |||
| "react": "18.3.1", | |||
| "react-dom": "18.3.1", | |||
| "react-router-dom": "6.28.0" | |||
| }, | |||
| "devDependencies": { | |||
| "@babel/preset-react": "7.25.9", | |||
| "@preact/signals-react-transform": "0.4.0", | |||
| "@rollup/plugin-replace": "6.0.1", | |||
| "@rollup/pluginutils": "5.1.3", | |||
| "@types/react": "18.3.12", | |||
| "@types/react-dom": "18.3.1", | |||
| "@vitejs/plugin-react": "4.3.3", | |||
| "async": "3.2.6", | |||
| "glob": "10.4.5", | |||
| "rollup-plugin-brotli": "3.1.0", | |||
| "rollup-plugin-visualizer": "5.12.0", | |||
| "strip-css-comments": "5.0.0", | |||
| "transform-ast": "2.4.4", | |||
| "typescript": "5.6.3", | |||
| "vite": "5.4.11", | |||
| "vite-plugin-checker": "0.8.0", | |||
| "workbox-build": "7.3.0", | |||
| "workbox-core": "7.3.0", | |||
| "workbox-precaching": "7.3.0" | |||
| }, | |||
| "vaadin": { | |||
| "dependencies": { | |||
| "@polymer/polymer": "3.5.2", | |||
| "@vaadin/bundles": "24.5.3", | |||
| "@vaadin/common-frontend": "0.0.19", | |||
| "@vaadin/polymer-legacy-adapter": "24.5.3", | |||
| "@vaadin/react-components": "24.5.3", | |||
| "@vaadin/react-components-pro": "24.5.3", | |||
| "@vaadin/router": "2.0.0", | |||
| "@vaadin/vaadin-development-mode-detector": "2.0.7", | |||
| "@vaadin/vaadin-lumo-styles": "24.5.3", | |||
| "@vaadin/vaadin-material-styles": "24.5.3", | |||
| "@vaadin/vaadin-themable-mixin": "24.5.3", | |||
| "@vaadin/vaadin-usage-statistics": "2.1.3", | |||
| "construct-style-sheets-polyfill": "3.1.0", | |||
| "date-fns": "2.29.3", | |||
| "lit": "3.2.1", | |||
| "proj4": "2.12.1", | |||
| "react": "18.3.1", | |||
| "react-dom": "18.3.1", | |||
| "react-router-dom": "6.28.0" | |||
| }, | |||
| "devDependencies": { | |||
| "@babel/preset-react": "7.25.9", | |||
| "@preact/signals-react-transform": "0.4.0", | |||
| "@rollup/plugin-replace": "6.0.1", | |||
| "@rollup/pluginutils": "5.1.3", | |||
| "@types/react": "18.3.12", | |||
| "@types/react-dom": "18.3.1", | |||
| "@vitejs/plugin-react": "4.3.3", | |||
| "async": "3.2.6", | |||
| "glob": "10.4.5", | |||
| "rollup-plugin-brotli": "3.1.0", | |||
| "rollup-plugin-visualizer": "5.12.0", | |||
| "strip-css-comments": "5.0.0", | |||
| "transform-ast": "2.4.4", | |||
| "typescript": "5.6.3", | |||
| "vite": "5.4.11", | |||
| "vite-plugin-checker": "0.8.0", | |||
| "workbox-build": "7.3.0", | |||
| "workbox-core": "7.3.0", | |||
| "workbox-precaching": "7.3.0" | |||
| }, | |||
| "hash": "b703e8b30695e5aa2dd6a2c751333d353dc584ea2f57e50b662830b0ee70c459" | |||
| }, | |||
| "overrides": { | |||
| "@vaadin/bundles": "$@vaadin/bundles", | |||
| "@vaadin/polymer-legacy-adapter": "$@vaadin/polymer-legacy-adapter", | |||
| "@vaadin/vaadin-development-mode-detector": "$@vaadin/vaadin-development-mode-detector", | |||
| "@vaadin/router": "$@vaadin/router", | |||
| "@vaadin/vaadin-usage-statistics": "$@vaadin/vaadin-usage-statistics", | |||
| "@vaadin/react-components": "$@vaadin/react-components", | |||
| "@vaadin/react-components-pro": "$@vaadin/react-components-pro", | |||
| "@vaadin/common-frontend": "$@vaadin/common-frontend", | |||
| "react-dom": "$react-dom", | |||
| "construct-style-sheets-polyfill": "$construct-style-sheets-polyfill", | |||
| "react-router-dom": "$react-router-dom", | |||
| "lit": "$lit", | |||
| "@polymer/polymer": "$@polymer/polymer", | |||
| "react": "$react", | |||
| "date-fns": "$date-fns", | |||
| "proj4": "$proj4", | |||
| "@vaadin/vaadin-themable-mixin": "$@vaadin/vaadin-themable-mixin", | |||
| "@vaadin/vaadin-lumo-styles": "$@vaadin/vaadin-lumo-styles", | |||
| "@vaadin/vaadin-material-styles": "$@vaadin/vaadin-material-styles" | |||
| } | |||
| } | |||
| @ -0,0 +1,23 @@ | |||
| <!DOCTYPE html> | |||
| <!-- | |||
| This file is auto-generated by Vaadin. | |||
| --> | |||
| <html> | |||
| <head> | |||
| <meta charset="UTF-8" /> | |||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | |||
| <style> | |||
| body, #outlet { | |||
| height: 100vh; | |||
| width: 100%; | |||
| margin: 0; | |||
| } | |||
| </style> | |||
| <!-- index.ts is included here automatically (either by the dev server or during the build) --> | |||
| </head> | |||
| <body> | |||
| <!-- This outlet div is where the views are rendered --> | |||
| <div id="outlet"></div> | |||
| </body> | |||
| </html> | |||
| @ -1 +1,31 @@ | |||
| @import url('./main-layout.css'); | |||
| @import url('./main-layout.css'); | |||
| /*°º¤ø,¸¸,ø¤º°`°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°`°º¤ø,¸ ESTILOS PARA LAS TARJETAS °º¤ø,¸¸,ø¤º°`°º¤ø,¸,ø¤°º¤ø,¸¸,ø¤º°`°º¤ø,¸ */ | |||
| .card { | |||
| width: 250px; | |||
| border: 1px solid #ccc; | |||
| border-radius: 8px; | |||
| padding: 16px; | |||
| text-align: center; | |||
| box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); | |||
| background-color: #fff; | |||
| margin: 10px; | |||
| transition: transform 0.2s; | |||
| } | |||
| .card:hover { | |||
| transform: scale(1.05); | |||
| } | |||
| .card-title { | |||
| font-size: 1.5em; | |||
| margin-bottom: 8px; | |||
| } | |||
| .card-description { | |||
| font-size: 1em; | |||
| color: #666; | |||
| } | |||
| @ -0,0 +1,39 @@ | |||
| package mx.gob.jumapacelaya.Services; | |||
| import mx.gob.jumapacelaya.models.Usuario; | |||
| import org.springframework.jdbc.core.JdbcTemplate; | |||
| import org.springframework.jdbc.core.RowMapper; | |||
| import org.springframework.stereotype.Service; | |||
| import java.sql.*; | |||
| import java.util.ArrayList; | |||
| import java.util.List; | |||
| @Service | |||
| public class UserService { | |||
| private final JdbcTemplate jdbcTemplate; | |||
| public UserService(JdbcTemplate jdbcTemplate) { | |||
| this.jdbcTemplate = jdbcTemplate; | |||
| } | |||
| public List<Usuario> getUsusarios() { | |||
| List<Usuario> usuarios = new ArrayList<>(); | |||
| String query = "SELECT usuarioid, empleadoid, nombrecompleto " + | |||
| "FROM usuarios " + | |||
| "INNER JOIN empleados USING (usuarioid) " + | |||
| "WHERE uniorgid=12 AND fechabaja IS NULL AND fechabaj IS NULL AND regexp_like(puestoid, 'EJVEN') " + | |||
| "ORDER BY nombrecompleto"; | |||
| return jdbcTemplate.query(query, usuarioRowMapper()); | |||
| } | |||
| private RowMapper<Usuario> usuarioRowMapper() { | |||
| return (rs, rowNum) -> new Usuario( | |||
| rs.getString("nombrecompleto"), | |||
| rs.getString("usuarioid"), | |||
| rs.getInt("empleadoid") | |||
| ); | |||
| } | |||
| } | |||
| @ -0,0 +1,43 @@ | |||
| package mx.gob.jumapacelaya.models; | |||
| public class Usuario { | |||
| private String nombre; | |||
| private String usuarioId; | |||
| private int empleadoId; | |||
| public Usuario(String nombre, String usuarioId, int empleadoId) { | |||
| this.nombre = nombre; | |||
| this.usuarioId = usuarioId; | |||
| this.empleadoId = empleadoId; | |||
| } | |||
| public String getNombre() { | |||
| return nombre; | |||
| } | |||
| public void setNombre(String nombre) { | |||
| this.nombre = nombre; | |||
| } | |||
| public int getEmpleadoId() { | |||
| return empleadoId; | |||
| } | |||
| public void setEmpleadoId(int empleadoId) { | |||
| this.empleadoId = empleadoId; | |||
| } | |||
| public String getUsuarioId() { | |||
| return usuarioId; | |||
| } | |||
| public void setUsuarioId(String usuarioId) { | |||
| this.usuarioId = usuarioId; | |||
| } | |||
| @Override | |||
| public String toString() { | |||
| return nombre; | |||
| } | |||
| } | |||
| @ -0,0 +1,20 @@ | |||
| package mx.gob.jumapacelaya.views; | |||
| import com.vaadin.flow.component.html.H1; | |||
| import com.vaadin.flow.component.orderedlayout.HorizontalLayout; | |||
| import com.vaadin.flow.component.orderedlayout.VerticalLayout; | |||
| import com.vaadin.flow.router.PageTitle; | |||
| import com.vaadin.flow.router.Route; | |||
| @PageTitle("Descuento Especial") | |||
| @Route(value = "descesp", layout = MainLayout.class) | |||
| public class DescEspView extends VerticalLayout { | |||
| public DescEspView() { | |||
| HorizontalLayout encabezadoLayout = new HorizontalLayout(); | |||
| encabezadoLayout.getStyle().set("background-color", "red"); | |||
| this.add(encabezadoLayout); | |||
| } | |||
| } | |||
| @ -0,0 +1,137 @@ | |||
| package mx.gob.jumapacelaya.views; | |||
| import com.vaadin.flow.component.UI; | |||
| import com.vaadin.flow.component.combobox.ComboBox; | |||
| import com.vaadin.flow.component.html.H1; | |||
| import com.vaadin.flow.component.html.H3; | |||
| import com.vaadin.flow.component.html.Paragraph; | |||
| import com.vaadin.flow.component.notification.Notification; | |||
| import com.vaadin.flow.component.orderedlayout.HorizontalLayout; | |||
| import com.vaadin.flow.component.orderedlayout.VerticalLayout; | |||
| import com.vaadin.flow.router.*; | |||
| import java.time.LocalDate; | |||
| import java.time.format.TextStyle; | |||
| import java.util.Locale; | |||
| import mx.gob.jumapacelaya.Services.UserService; | |||
| import mx.gob.jumapacelaya.models.Usuario; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.vaadin.lineawesome.LineAwesomeIconUrl; | |||
| @PageTitle("Home") | |||
| @Route(value = "", layout = MainLayout.class) | |||
| @Menu(order = 0, icon = LineAwesomeIconUrl.FILE) | |||
| public class HomeView extends VerticalLayout { | |||
| private final UserService userService; | |||
| private Usuario usuarioSeleccionado = null; | |||
| @Autowired | |||
| public HomeView(UserService userService) { | |||
| // Inyecion del servicio UserService | |||
| this.userService = userService; | |||
| // Llamada a los metodos encapsulados | |||
| cabezera(); | |||
| formularios(); | |||
| } | |||
| // Encapsulacion de los componentes de titulos y subtitulos | |||
| private void cabezera() { | |||
| LocalDate sysDate = LocalDate.now(); // Obtiene la fecha del sistema | |||
| // Formateo a la fecha | |||
| String fechaFormat = sysDate.getDayOfWeek().getDisplayName(TextStyle.FULL, new Locale("es")) + " " + | |||
| sysDate.getDayOfMonth() + " de " + | |||
| sysDate.getMonth().getDisplayName(TextStyle.FULL, new Locale("es")) + " " + | |||
| sysDate.getYear(); | |||
| // Subtitulo | |||
| VerticalLayout subTitleLayout = new VerticalLayout(); | |||
| H3 lblSubTitle = new H3(fechaFormat); | |||
| subTitleLayout.setAlignItems(Alignment.END); | |||
| subTitleLayout.setPadding(false); | |||
| subTitleLayout.setMargin(false); | |||
| subTitleLayout.add(lblSubTitle); | |||
| // Titulo Principal | |||
| VerticalLayout titleLayout = new VerticalLayout(); | |||
| H1 lblTitle = new H1("App para firma de formatos digitales"); | |||
| titleLayout.setAlignItems(Alignment.CENTER); | |||
| titleLayout.setMargin(false); | |||
| titleLayout.add(lblTitle, subTitleLayout); | |||
| this.setSizeFull(); | |||
| this.setPadding(false); | |||
| add(titleLayout); | |||
| } | |||
| // Metodo que contiene los formularios | |||
| private void formularios() { | |||
| VerticalLayout menuLayout = new VerticalLayout(); | |||
| menuLayout.setSizeFull(); | |||
| ComboBox<Usuario> cmbUsuario = new ComboBox<>("Selecciona tu usuario"); | |||
| cmbUsuario.setWidth("20em"); | |||
| cmbUsuario.setItems(userService.getUsusarios()); // Llenar el combo con los usuarios | |||
| cmbUsuario.setItemLabelGenerator(Usuario::getNombre); | |||
| cmbUsuario.addValueChangeListener(event -> usuarioSeleccionado = event.getValue()); | |||
| String[][] opciones = { | |||
| {"Solicitud de descuento", "solidesc"}, | |||
| {"Recibo digital por email", "recibodigital"}, | |||
| {"Verificación", "verificacion"}, | |||
| {"PGO y Tomas independientes", "pgotomasindep"}, | |||
| {"Descuento especial", "descesp"} | |||
| }; | |||
| HorizontalLayout cardLayout = new HorizontalLayout(); | |||
| cardLayout.setWidthFull(); | |||
| cardLayout.setSpacing(true); | |||
| cardLayout.getStyle().set("flex-wrap", "wrap"); | |||
| cardLayout.getStyle().set("justify-content", "center"); | |||
| for(String[] opcion : opciones) { | |||
| VerticalLayout card = createCard(opcion[0], opcion[1]); | |||
| cardLayout.add(card); | |||
| } | |||
| menuLayout.add(cmbUsuario, cardLayout); | |||
| add(menuLayout); | |||
| } | |||
| private VerticalLayout createCard(String title, String route) { | |||
| VerticalLayout card = new VerticalLayout(); | |||
| card.setWidth("250px"); | |||
| card.setSpacing(false); | |||
| card.setPadding(true); | |||
| card.setAlignItems(Alignment.CENTER); | |||
| card.getStyle().set("border", "1px solid #ccc"); | |||
| card.getStyle().set("border-radius", "8px"); | |||
| card.getStyle().set("box-shadow", "0 4px 8px rgba(0, 0, 0, 0.1)"); | |||
| card.getStyle().set("background-color", "#fff"); | |||
| card.getStyle().set("margin", "10px"); | |||
| H3 cardTitle = new H3(title); | |||
| Paragraph description = new Paragraph(""); | |||
| card.addClickListener(event -> UI.getCurrent().navigate(route)); | |||
| card.add(cardTitle, description); | |||
| return card; | |||
| } | |||
| } | |||
| @ -0,0 +1,18 @@ | |||
| package mx.gob.jumapacelaya.views; | |||
| import com.vaadin.flow.component.html.H1; | |||
| import com.vaadin.flow.component.orderedlayout.VerticalLayout; | |||
| import com.vaadin.flow.router.PageTitle; | |||
| import com.vaadin.flow.router.Route; | |||
| @PageTitle("PGO y Tomas Indep") | |||
| @Route(value = "pgotomasindep", layout = MainLayout.class) | |||
| public class PgoTomasView extends VerticalLayout { | |||
| public PgoTomasView() { | |||
| VerticalLayout layout = new VerticalLayout(); | |||
| H1 titulo = new H1("Solicitud Desc"); | |||
| add(titulo); | |||
| } | |||
| } | |||
| @ -0,0 +1,19 @@ | |||
| package mx.gob.jumapacelaya.views; | |||
| import com.vaadin.flow.component.html.H1; | |||
| import com.vaadin.flow.component.orderedlayout.VerticalLayout; | |||
| import com.vaadin.flow.router.PageTitle; | |||
| import com.vaadin.flow.router.Route; | |||
| @PageTitle("Solicitud de Recibo Digital") | |||
| @Route(value = "recibodigital", layout = MainLayout.class) | |||
| public class ReciboDgtalView extends VerticalLayout { | |||
| public ReciboDgtalView() { | |||
| VerticalLayout layout = new VerticalLayout(); | |||
| H1 titulo = new H1("Solicitud Desc"); | |||
| add(titulo); | |||
| } | |||
| } | |||
| @ -0,0 +1,129 @@ | |||
| package mx.gob.jumapacelaya.views; | |||
| import com.vaadin.flow.component.button.Button; | |||
| import com.vaadin.flow.component.button.ButtonVariant; | |||
| import com.vaadin.flow.component.checkbox.CheckboxGroup; | |||
| import com.vaadin.flow.component.combobox.ComboBox; | |||
| import com.vaadin.flow.component.html.H1; | |||
| import com.vaadin.flow.component.html.H2; | |||
| import com.vaadin.flow.component.html.H3; | |||
| import com.vaadin.flow.component.html.Span; | |||
| import com.vaadin.flow.component.orderedlayout.HorizontalLayout; | |||
| import com.vaadin.flow.component.orderedlayout.VerticalLayout; | |||
| import com.vaadin.flow.component.textfield.NumberField; | |||
| import com.vaadin.flow.component.textfield.TextField; | |||
| import com.vaadin.flow.router.BeforeEnterEvent; | |||
| import com.vaadin.flow.router.BeforeEnterObserver; | |||
| import com.vaadin.flow.router.PageTitle; | |||
| import com.vaadin.flow.router.Route; | |||
| import org.hibernate.annotations.DialectOverride; | |||
| import java.time.LocalDate; | |||
| import java.time.format.DateTimeFormatter; | |||
| import java.util.Date; | |||
| @PageTitle("Solicitud de Descuento") | |||
| @Route(value = "solidesc", layout = MainLayout.class) | |||
| public class SolicitudDescView extends VerticalLayout { | |||
| private H3 label; | |||
| public SolicitudDescView() { | |||
| this.setSizeFull(); | |||
| cabezera(); | |||
| titulo(); | |||
| formulario(); | |||
| } | |||
| private void cabezera() { | |||
| HorizontalLayout encabezadoLayout = new HorizontalLayout(); | |||
| encabezadoLayout.setWidthFull(); | |||
| encabezadoLayout.setPadding(true); | |||
| // Obtener la fecha actual del sistema | |||
| LocalDate fechaSistema = LocalDate.now(); | |||
| DateTimeFormatter formatter = DateTimeFormatter.ofPattern("EEEE d 'de' MMMM 'del' yyyy"); | |||
| String fechaFormateada = fechaSistema.format(formatter); | |||
| Span fecha = new Span(); | |||
| fecha.setText("Celaya, Guanajuato a " + fechaFormateada); | |||
| H2 presolicitud = new H2(); | |||
| presolicitud.setText("PreSolicitud"); | |||
| encabezadoLayout.add(fecha); | |||
| encabezadoLayout.addAndExpand(new HorizontalLayout()); | |||
| encabezadoLayout.add(presolicitud); | |||
| this.add(encabezadoLayout); | |||
| } | |||
| private void titulo() { | |||
| HorizontalLayout tituloLayout = new HorizontalLayout(); | |||
| H2 lblTitulo = new H2(); | |||
| lblTitulo.setText("JUNTA MUNICIPAL DE AGUA POTABLE Y ALCANTARILLADO DE CELAYA, GTO"); | |||
| tituloLayout.add(lblTitulo); | |||
| this.add(tituloLayout); | |||
| } | |||
| private void formulario() { | |||
| VerticalLayout formularioLayout = new VerticalLayout(); | |||
| //formularioLayout.getStyle().set("background-color", "green"); | |||
| formularioLayout.setSpacing(true); | |||
| formularioLayout.setPadding(true); | |||
| H3 label = new H3(); | |||
| label.setText("Solicitud de Descuento en adeudo [USUARIO]"); | |||
| Span labelTexto = new Span(); | |||
| labelTexto.setText("Prepara la solicitud:"); | |||
| CheckboxGroup<String> tipoSolicitudGroup = new CheckboxGroup<>("Elige el tipo de Solicitud:"); | |||
| tipoSolicitudGroup.setItems("Recargos", "Infracciones", "Ajuste de Facturas"); | |||
| NumberField predio = new NumberField("Predio:"); | |||
| TextField solicitante = new TextField("Solicitante:"); | |||
| solicitante.setWidth("30em"); | |||
| TextField txtParentesco = new TextField("Parentesco:"); | |||
| HorizontalLayout identificacionLayout = new HorizontalLayout(); | |||
| identificacionLayout.setWidthFull(); | |||
| Span identificacionTexto = new Span(); | |||
| identificacionTexto.setText("Se identifica con:"); | |||
| ComboBox<String> cmbTipoIdentificacion = new ComboBox<>(); | |||
| cmbTipoIdentificacion.setPlaceholder("Selecciona una opcion"); | |||
| cmbTipoIdentificacion.setItems("INE/IFE", "Lic. de conducir", "Pasaporte", "Cedula prof.", "Visa", "Otro..."); | |||
| TextField numIdentificacion = new TextField(); | |||
| numIdentificacion.setPlaceholder("No. identificacion"); | |||
| numIdentificacion.setWidthFull(); | |||
| Button btnVerSolicitud = new Button("Ver Solicitud"); | |||
| btnVerSolicitud.addThemeVariants(ButtonVariant.LUMO_PRIMARY); | |||
| btnVerSolicitud.addThemeVariants(ButtonVariant.LUMO_LARGE); | |||
| identificacionLayout.add(cmbTipoIdentificacion, numIdentificacion); | |||
| formularioLayout.add(label, labelTexto, | |||
| tipoSolicitudGroup, predio, | |||
| solicitante, identificacionTexto, | |||
| identificacionLayout, txtParentesco, | |||
| btnVerSolicitud); | |||
| this.add(formularioLayout); | |||
| } | |||
| } | |||
| @ -0,0 +1,18 @@ | |||
| package mx.gob.jumapacelaya.views; | |||
| import com.vaadin.flow.component.html.H1; | |||
| import com.vaadin.flow.component.orderedlayout.VerticalLayout; | |||
| import com.vaadin.flow.router.PageTitle; | |||
| import com.vaadin.flow.router.Route; | |||
| @PageTitle("Verificacion") | |||
| @Route(value = "verificacion", layout = MainLayout.class) | |||
| public class VerificacionView extends VerticalLayout { | |||
| public VerificacionView() { | |||
| VerticalLayout layout = new VerticalLayout(); | |||
| H1 titulo = new H1("Solicitud Desc"); | |||
| add(titulo); | |||
| } | |||
| } | |||
| @ -1,36 +0,0 @@ | |||
| package mx.gob.jumapacelaya.views.home; | |||
| import com.vaadin.flow.component.html.H2; | |||
| import com.vaadin.flow.component.html.Image; | |||
| import com.vaadin.flow.component.html.Paragraph; | |||
| import com.vaadin.flow.component.orderedlayout.VerticalLayout; | |||
| import com.vaadin.flow.router.Menu; | |||
| import com.vaadin.flow.router.PageTitle; | |||
| import com.vaadin.flow.router.Route; | |||
| import com.vaadin.flow.theme.lumo.LumoUtility.Margin; | |||
| import org.vaadin.lineawesome.LineAwesomeIconUrl; | |||
| @PageTitle("Home") | |||
| @Route("") | |||
| @Menu(order = 0, icon = LineAwesomeIconUrl.FILE) | |||
| public class HomeView extends VerticalLayout { | |||
| public HomeView() { | |||
| setSpacing(false); | |||
| Image img = new Image("images/empty-plant.png", "placeholder plant"); | |||
| img.setWidth("200px"); | |||
| add(img); | |||
| H2 header = new H2("This place intentionally left empty"); | |||
| header.addClassNames(Margin.Top.XLARGE, Margin.Bottom.MEDIUM); | |||
| add(header); | |||
| add(new Paragraph("It’s a place where you can grow your own UI 🤗")); | |||
| setSizeFull(); | |||
| setJustifyContentMode(JustifyContentMode.CENTER); | |||
| setDefaultHorizontalComponentAlignment(Alignment.CENTER); | |||
| getStyle().set("text-align", "center"); | |||
| } | |||
| } | |||
| @ -0,0 +1,39 @@ | |||
| // This TypeScript configuration file is generated by vaadin-maven-plugin. | |||
| // This is needed for TypeScript compiler to compile your TypeScript code in the project. | |||
| // It is recommended to commit this file to the VCS. | |||
| // You might want to change the configurations to fit your preferences | |||
| // For more information about the configurations, please refer to http://www.typescriptlang.org/docs/handbook/tsconfig-json.html | |||
| { | |||
| "_version": "9.1", | |||
| "compilerOptions": { | |||
| "sourceMap": true, | |||
| "jsx": "react-jsx", | |||
| "inlineSources": true, | |||
| "module": "esNext", | |||
| "target": "es2020", | |||
| "moduleResolution": "bundler", | |||
| "strict": true, | |||
| "skipLibCheck": true, | |||
| "noFallthroughCasesInSwitch": true, | |||
| "noImplicitReturns": true, | |||
| "noImplicitAny": true, | |||
| "noImplicitThis": true, | |||
| "noUnusedLocals": false, | |||
| "noUnusedParameters": false, | |||
| "experimentalDecorators": true, | |||
| "useDefineForClassFields": false, | |||
| "baseUrl": "src/main/frontend", | |||
| "paths": { | |||
| "@vaadin/flow-frontend": ["generated/jar-resources"], | |||
| "@vaadin/flow-frontend/*": ["generated/jar-resources/*"], | |||
| "Frontend/*": ["*"] | |||
| } | |||
| }, | |||
| "include": [ | |||
| "src/main/frontend/**/*", | |||
| "types.d.ts" | |||
| ], | |||
| "exclude": [ | |||
| "src/main/frontend/generated/jar-resources/**" | |||
| ] | |||
| } | |||
| @ -0,0 +1,17 @@ | |||
| // This TypeScript modules definition file is generated by vaadin-maven-plugin. | |||
| // You can not directly import your different static files into TypeScript, | |||
| // This is needed for TypeScript compiler to declare and export as a TypeScript module. | |||
| // It is recommended to commit this file to the VCS. | |||
| // You might want to change the configurations to fit your preferences | |||
| declare module '*.css?inline' { | |||
| import type { CSSResultGroup } from 'lit'; | |||
| const content: CSSResultGroup; | |||
| export default content; | |||
| } | |||
| // Allow any CSS Custom Properties | |||
| declare module 'csstype' { | |||
| interface Properties { | |||
| [index: `--${string}`]: any; | |||
| } | |||
| } | |||