|
|
@ -1,10 +1,13 @@ |
|
|
|
package mx.gob.jumapacelaya.ui; |
|
|
|
import com.vaadin.flow.component.Unit; |
|
|
|
import com.vaadin.flow.component.charts.model.DataSeries; |
|
|
|
import com.vaadin.flow.component.checkbox.CheckboxGroup; |
|
|
|
import com.vaadin.flow.component.combobox.ComboBox; |
|
|
|
import com.vaadin.flow.component.datepicker.DatePicker; |
|
|
|
import com.vaadin.flow.component.formlayout.FormLayout; |
|
|
|
import com.vaadin.flow.component.grid.Grid; |
|
|
|
import com.vaadin.flow.component.html.H1; |
|
|
|
import com.vaadin.flow.component.html.H2; |
|
|
|
import com.vaadin.flow.component.html.Span; |
|
|
|
import com.vaadin.flow.component.orderedlayout.FlexLayout; |
|
|
|
import com.vaadin.flow.component.orderedlayout.HorizontalLayout; |
|
|
@ -13,11 +16,18 @@ import com.vaadin.flow.component.textfield.TextArea; |
|
|
|
import com.vaadin.flow.component.textfield.TextField; |
|
|
|
import com.vaadin.flow.router.PageTitle; |
|
|
|
import com.vaadin.flow.router.Route; |
|
|
|
import com.vaadin.flow.spring.data.VaadinSpringDataHelpers; |
|
|
|
import com.vaadin.flow.theme.lumo.LumoUtility; |
|
|
|
import jakarta.annotation.security.PermitAll; |
|
|
|
import mx.gob.jumapacelaya.models.ActividadDiaria; |
|
|
|
import org.checkerframework.checker.units.qual.A; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Collections; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
@PermitAll |
|
|
@ -26,38 +36,37 @@ import java.util.Collections; |
|
|
|
public class ActDiariaView extends VerticalLayout { |
|
|
|
|
|
|
|
//Variables Locales |
|
|
|
HorizontalLayout header = new HorizontalLayout(); |
|
|
|
|
|
|
|
|
|
|
|
public ActDiariaView() { |
|
|
|
|
|
|
|
Span etiqueta = new Span("Listado de tividades"); |
|
|
|
|
|
|
|
FormLayout formLayout=new FormLayout(); |
|
|
|
FlexLayout flexLayout = new FlexLayout(); |
|
|
|
SimpleDateFormat formato = new SimpleDateFormat("dd/MM/yyyy"); |
|
|
|
|
|
|
|
etiqueta.setWidth(100, Unit.PERCENTAGE); |
|
|
|
|
|
|
|
flexLayout.setMaxWidth(100, Unit.PERCENTAGE); |
|
|
|
flexLayout.setWidth("100%"); |
|
|
|
flexLayout.getElement().getStyle().set("background-color","red"); |
|
|
|
flexLayout.getElement().getStyle().set("border-radius", LumoUtility.BorderRadius.LARGE); |
|
|
|
HorizontalLayout header = new HorizontalLayout(); |
|
|
|
|
|
|
|
header.setSizeUndefined(); |
|
|
|
header.setFlexGrow(1,etiqueta); |
|
|
|
header.add(etiqueta); |
|
|
|
header.getElement().getStyle().set("background-color","green"); |
|
|
|
//Grid<ActividadDiaria> grid = new Grid<ActividadDiaria>(); |
|
|
|
|
|
|
|
formLayout.add(header); |
|
|
|
formLayout.setSizeUndefined(); |
|
|
|
H2 titulo = new H2(); |
|
|
|
|
|
|
|
flexLayout.add(Collections.singleton(formLayout)); |
|
|
|
Grid<ActividadDiaria> grdColumnas = new Grid<>(ActividadDiaria.class); |
|
|
|
|
|
|
|
//List<ActividadDiaria> people = Arrays.asList( |
|
|
|
// new ActividadDiaria(11, "Soprote", "Confi", "Sol", "Urgente","10/02/2024", "10/02/2024"); |
|
|
|
//new ActividadDiaria("Johannes Kepler", 1571)); |
|
|
|
|
|
|
|
add(flexLayout); |
|
|
|
public ActDiariaView() { |
|
|
|
|
|
|
|
titulo.setText("Listado de Actividades"); |
|
|
|
header.setAlignSelf(Alignment.CENTER, titulo); |
|
|
|
add(titulo, header); |
|
|
|
//Tabla echa con un grid |
|
|
|
|
|
|
|
|
|
|
|
grdColumnas.addColumn(ActividadDiaria::getNumero).setHeader("Numero"); |
|
|
|
grdColumnas.addColumn(ActividadDiaria::getProyecto).setHeader("Proyecto"); |
|
|
|
grdColumnas.addColumn(ActividadDiaria::getTipo).setHeader("Tipo"); |
|
|
|
grdColumnas.addColumn(ActividadDiaria::getEstado).setHeader("Estado"); |
|
|
|
grdColumnas.addColumn(ActividadDiaria::getAsunto).setHeader("Asunto"); |
|
|
|
grdColumnas.addColumn(ActividadDiaria::getFechaInicial).setHeader("FechaIni"); |
|
|
|
grdColumnas.addColumn(ActividadDiaria::getFechaCierre).setHeader("FechaCierre"); |
|
|
|
|
|
|
|
//grdColumnas.setItems(ActividadDiaria) |
|
|
|
} |
|
|
|
|
|
|
|
} |