Browse Source

Se agrego un filtro para que el grid del plan anual solo mustre los mantenimientos con estado pendiente para que asi sea mas facil identificar cuales mantenimientos faltan

master
mramirezg 8 months ago
parent
commit
7bf8dc0137
4 changed files with 22 additions and 9 deletions
  1. +1
    -1
      src/main/java/mx/gob/jumapacelaya/ui/ActDiariaView.java
  2. +5
    -5
      src/main/java/mx/gob/jumapacelaya/ui/MantenimientoView.java
  3. +16
    -3
      src/main/java/mx/gob/jumapacelaya/ui/PlanAnualView.java
  4. BIN
      src/main/resources/META-INF/resources/icons/icon.png

+ 1
- 1
src/main/java/mx/gob/jumapacelaya/ui/ActDiariaView.java View File

@ -92,7 +92,7 @@ public class ActDiariaView extends VerticalLayout {
return btnVer; return btnVer;
}).setHeader("Descripcion").setAutoWidth(true); }).setHeader("Descripcion").setAutoWidth(true);
grid.addColumn(buttonTicketComponentRenderer()).setHeader("Realizar").setFlexGrow(0).setAutoWidth(true);
//grid.addColumn(buttonTicketComponentRenderer()).setHeader("Realizar").setFlexGrow(0).setAutoWidth(true);
grid.addThemeVariants(GridVariant.LUMO_WRAP_CELL_CONTENT); grid.addThemeVariants(GridVariant.LUMO_WRAP_CELL_CONTENT);
grid.getStyle().set("opacity", "0.8"); grid.getStyle().set("opacity", "0.8");


+ 5
- 5
src/main/java/mx/gob/jumapacelaya/ui/MantenimientoView.java View File

@ -187,7 +187,7 @@ public class MantenimientoView extends VerticalLayout implements BeforeEnterObse
txtNombreEquipo.setReadOnly(true); txtNombreEquipo.setReadOnly(true);
departamentoLayout.add(area, usuario, btnEnviarCorreo, txtNombreEquipo);
departamentoLayout.add(area, usuario/*, btnEnviarCorreo*/, txtNombreEquipo);
departamentoLayout.setWidthFull(); departamentoLayout.setWidthFull();
createHardwareSection(databaseService); createHardwareSection(databaseService);
@ -411,7 +411,7 @@ public class MantenimientoView extends VerticalLayout implements BeforeEnterObse
private void signLayout() { private void signLayout() {
VerticalLayout userSignLayout = new VerticalLayout(); VerticalLayout userSignLayout = new VerticalLayout();
userSignPad = new SignaturePad(); userSignPad = new SignaturePad();
userSignPad.setBackgroundColor(0, 0, 0, 0);
userSignPad.setBackgroundColor("#FFFFFF");
userSignPad.setHeight("200px"); userSignPad.setHeight("200px");
userSignPad.setPenColor("#000000"); userSignPad.setPenColor("#000000");
userSignPad.getElement().getStyle().set("border", "1px solid black"); userSignPad.getElement().getStyle().set("border", "1px solid black");
@ -426,9 +426,9 @@ public class MantenimientoView extends VerticalLayout implements BeforeEnterObse
VerticalLayout smtSignLayout = new VerticalLayout(); VerticalLayout smtSignLayout = new VerticalLayout();
smtSignPad = new SignaturePad(); smtSignPad = new SignaturePad();
smtSignPad.setHeight("200px"); smtSignPad.setHeight("200px");
smtSignPad.setBackgroundColor(0, 0, 0, 0);
smtSignPad.setBackgroundColor("#FFFFFF");
smtSignPad.setPenColor("#000000"); smtSignPad.setPenColor("#000000");
smtSignPad.getElement().getStyle().set("border", "1px solid black");
smtSignPad.getElement().getStyle().set("border", "2px solid black");
String u = securityService.getAuthenticatedUser(); String u = securityService.getAuthenticatedUser();
Span smtSignSpan = new Span(u); Span smtSignSpan = new Span(u);
Span tituloSMT = new Span("Responsable de Soporte"); Span tituloSMT = new Span("Responsable de Soporte");
@ -440,7 +440,7 @@ public class MantenimientoView extends VerticalLayout implements BeforeEnterObse
VerticalLayout gcialSignLayout = new VerticalLayout(); VerticalLayout gcialSignLayout = new VerticalLayout();
gciatiSignPad = new SignaturePad(); gciatiSignPad = new SignaturePad();
gciatiSignPad.setBackgroundColor(0, 0, 0, 0);
gciatiSignPad.setBackgroundColor("#FFFFFF");
gciatiSignPad.setHeight("200px"); gciatiSignPad.setHeight("200px");
gciatiSignPad.setPenColor("#000000"); gciatiSignPad.setPenColor("#000000");
gciatiSignPad.getElement().getStyle().set("border", "1px solid black"); gciatiSignPad.getElement().getStyle().set("border", "1px solid black");


+ 16
- 3
src/main/java/mx/gob/jumapacelaya/ui/PlanAnualView.java View File

@ -65,6 +65,7 @@ public class PlanAnualView extends VerticalLayout {
// Se crea el filtro para el grid. // Se crea el filtro para el grid.
PlanAnualFilter planAnualFilter = new PlanAnualFilter(dataView); PlanAnualFilter planAnualFilter = new PlanAnualFilter(dataView);
planAnualFilter.setExcludeRealizado(true);
HeaderRow headerRow = planAnualGrid.appendHeaderRow(); HeaderRow headerRow = planAnualGrid.appendHeaderRow();
@ -129,13 +130,18 @@ public class PlanAnualView extends VerticalLayout {
btnInsertar.setVisible(false); btnInsertar.setVisible(false);
VerticalLayout gridLayout = new VerticalLayout(); VerticalLayout gridLayout = new VerticalLayout();
gridLayout.add(planAnualGrid, upload, btnInsertar);
gridLayout.setSizeFull();
gridLayout.add(planAnualGrid);
HorizontalLayout uploadLayout = new HorizontalLayout();
uploadLayout.add(upload, btnInsertar);
this.setPadding(false); this.setPadding(false);
this.setMargin(false); this.setMargin(false);
this.setSpacing(false); this.setSpacing(false);
add(header, gridLayout);
this.setSizeFull();
add(header, gridLayout, uploadLayout);
} }
@ -319,6 +325,7 @@ public class PlanAnualView extends VerticalLayout {
private static class PlanAnualFilter { private static class PlanAnualFilter {
private final GridListDataView<PlanAnual> dataView; private final GridListDataView<PlanAnual> dataView;
private String smt; private String smt;
private boolean excludeRealizado = true;
public PlanAnualFilter(GridListDataView<PlanAnual> dataView) { public PlanAnualFilter(GridListDataView<PlanAnual> dataView) {
this.dataView = dataView; this.dataView = dataView;
@ -330,9 +337,15 @@ public class PlanAnualView extends VerticalLayout {
this.dataView.refreshAll(); this.dataView.refreshAll();
} }
public void setExcludeRealizado(boolean excludeRealizado) {
this.excludeRealizado = excludeRealizado;
this.dataView.refreshAll();
}
public boolean test(PlanAnual planAnual) { public boolean test(PlanAnual planAnual) {
boolean matchesSmt = matches(planAnual.getSmt(), smt); boolean matchesSmt = matches(planAnual.getSmt(), smt);
return matchesSmt;
boolean isNoRealizado = !excludeRealizado || !"REALIZADO".equalsIgnoreCase(planAnual.getEstado());
return matchesSmt && isNoRealizado;
} }


BIN
src/main/resources/META-INF/resources/icons/icon.png View File

Before After
Width: 512  |  Height: 512  |  Size: 2.4 KiB Width: 512  |  Height: 512  |  Size: 37 KiB

Loading…
Cancel
Save