|
|
@ -1,8 +1,11 @@ |
|
|
|
package mx.gob.jumapacelaya.ui; |
|
|
|
import com.vaadin.flow.component.button.Button; |
|
|
|
import com.vaadin.flow.component.button.ButtonVariant; |
|
|
|
import com.vaadin.flow.component.grid.ColumnPathRenderer; |
|
|
|
import com.vaadin.flow.component.grid.Grid; |
|
|
|
import com.vaadin.flow.component.html.H2; |
|
|
|
import com.vaadin.flow.component.html.H3; |
|
|
|
import com.vaadin.flow.component.icon.VaadinIcon; |
|
|
|
import com.vaadin.flow.component.orderedlayout.HorizontalLayout; |
|
|
|
import com.vaadin.flow.component.orderedlayout.VerticalLayout; |
|
|
|
import com.vaadin.flow.data.renderer.ComponentRenderer; |
|
|
@ -28,7 +31,9 @@ public class ActDiariaView extends VerticalLayout { |
|
|
|
|
|
|
|
HorizontalLayout header = new HorizontalLayout(); |
|
|
|
|
|
|
|
H3 titulo = new H3(); |
|
|
|
H2 titulo = new H2(); |
|
|
|
|
|
|
|
Button btnCorrectivo = new Button("Correctivo"); |
|
|
|
|
|
|
|
Grid<ActividadDiaria> grdColumnas = new Grid<>(ActividadDiaria.class,false); |
|
|
|
|
|
|
@ -60,14 +65,23 @@ public class ActDiariaView extends VerticalLayout { |
|
|
|
grdColumnas.addColumn(date->{ |
|
|
|
return formato.format(date.getFechaCierre()); |
|
|
|
}).setHeader("Fecha de cierre"); |
|
|
|
Button btnCorrectivo = new Button("Correctivo"); |
|
|
|
grdColumnas.setItems(people); |
|
|
|
|
|
|
|
grdColumnas.setItems(people); |
|
|
|
// grdColumnas.addColumn( |
|
|
|
// new ColumnPathRenderer<>(Button::new, (btnCorrectivo, ActividadDiaria) ->{ |
|
|
|
// btnCorrectivo.addThemeVariants(ButtonVariant.LUMO_ICON, |
|
|
|
// ButtonVariant.LUMO_ERROR, |
|
|
|
// ButtonVariant.LUMO_TERTIARY); |
|
|
|
// btnCorrectivo.setIcon(new Icon(VaadinIcon.TRASH)); |
|
|
|
// })).setHeader("Prueba"); |
|
|
|
|
|
|
|
|
|
|
|
// add(titulo, header, grdColumnas); |
|
|
|
this.setPadding(false); |
|
|
|
this.setMargin(false); |
|
|
|
this.setSpacing(false); |
|
|
|
add(headerLayout, gridLayout); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |