From 560dac1346ec857b25bb6a2fd3ff4f7732ed3da0 Mon Sep 17 00:00:00 2001 From: mramirezg Date: Mon, 21 Oct 2024 10:11:51 -0600 Subject: [PATCH] Se agrego el boton para guardar en la vista de mantenimientos --- .../gob/jumapacelaya/ui/MantenimientoView.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/main/java/mx/gob/jumapacelaya/ui/MantenimientoView.java b/src/main/java/mx/gob/jumapacelaya/ui/MantenimientoView.java index dee4045..365b10b 100644 --- a/src/main/java/mx/gob/jumapacelaya/ui/MantenimientoView.java +++ b/src/main/java/mx/gob/jumapacelaya/ui/MantenimientoView.java @@ -46,6 +46,7 @@ public class MantenimientoView extends VerticalLayout implements BeforeEnterObse private final HorizontalLayout firmasLayout; private final DatePicker fecha; private final ComboBox tipoMantt; + private final HorizontalLayout botonesLayout; Span userSignSpan = new Span("Nombre Usuario"); @@ -57,6 +58,7 @@ public class MantenimientoView extends VerticalLayout implements BeforeEnterObse this.actualizacionesLayout = new VerticalLayout(); this.etiquetaLayout = new VerticalLayout(); this.firmasLayout = new HorizontalLayout(); + this.botonesLayout = new HorizontalLayout(); HorizontalLayout fechaLayout = new HorizontalLayout(); //Componentes de texto @@ -131,9 +133,10 @@ public class MantenimientoView extends VerticalLayout implements BeforeEnterObse addActualizacionesSection(); correctivoLayout(); signLayout(); + buttons(); - add(fechaLayout, departamentoLayout, controlsLayout, actualizacionesLayout, etiquetaLayout, firmasLayout); + add(fechaLayout, departamentoLayout, controlsLayout, actualizacionesLayout, etiquetaLayout, firmasLayout, botonesLayout); } @@ -368,6 +371,17 @@ public class MantenimientoView extends VerticalLayout implements BeforeEnterObse } + private void buttons() { + HorizontalLayout buttonsLayout = new HorizontalLayout(); + Button btnGuardar = new Button("Guardar"); + btnGuardar.addThemeVariants(ButtonVariant.LUMO_PRIMARY); + buttonsLayout.setSizeFull(); + buttonsLayout.add(btnGuardar); + + botonesLayout.add(buttonsLayout); + } + + @Override public void beforeEnter(BeforeEnterEvent beforeEnterEvent) { String fechaParam = beforeEnterEvent.getLocation().getQueryParameters().getParameters().get("fecha") != null