|
|
@ -1,12 +1,17 @@ |
|
|
|
package mx.gob.jumapacelaya.ui.mantenimiento; |
|
|
|
|
|
|
|
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.checkbox.CheckboxGroup; |
|
|
|
import com.vaadin.flow.component.combobox.ComboBox; |
|
|
|
import com.vaadin.flow.component.datepicker.DatePicker; |
|
|
|
import com.vaadin.flow.component.html.Span; |
|
|
|
import com.vaadin.flow.component.orderedlayout.FlexComponent; |
|
|
|
import com.vaadin.flow.component.orderedlayout.FlexLayout; |
|
|
|
import com.vaadin.flow.component.orderedlayout.HorizontalLayout; |
|
|
|
import com.vaadin.flow.component.orderedlayout.VerticalLayout; |
|
|
|
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.theme.lumo.LumoUtility.Margin; |
|
|
|
import jakarta.annotation.security.PermitAll; |
|
|
|
import mx.gob.jumapacelaya.ui.MainLayout; |
|
|
|
|
|
|
@ -17,21 +22,78 @@ import mx.gob.jumapacelaya.ui.MainLayout; |
|
|
|
public class MantenimientoView extends VerticalLayout { |
|
|
|
|
|
|
|
public MantenimientoView() { |
|
|
|
setSpacing(false); |
|
|
|
|
|
|
|
Image img = new Image("images/empty-plant.png", "placeholder plant"); |
|
|
|
img.setWidth("200px"); |
|
|
|
add(img); |
|
|
|
//Componentes de texto |
|
|
|
TextField area = new TextField("Area o Departamento"); |
|
|
|
TextField nomenclatura = new TextField("Nomenclatura"); |
|
|
|
TextField usuario = new TextField("Usuario"); |
|
|
|
TextArea otras = new TextArea("¿Cuales?"); |
|
|
|
|
|
|
|
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 🤗")); |
|
|
|
//Selector de fecha |
|
|
|
DatePicker fecha = new DatePicker("Fecha"); |
|
|
|
|
|
|
|
setSizeFull(); |
|
|
|
setJustifyContentMode(JustifyContentMode.CENTER); |
|
|
|
setDefaultHorizontalComponentAlignment(Alignment.CENTER); |
|
|
|
getStyle().set("text-align", "center"); |
|
|
|
//ComboBox |
|
|
|
ComboBox<String> tipoMantt = new ComboBox<>("Tipo de Mantenimiento"); |
|
|
|
tipoMantt.setItems("Preventivo","Correctivo"); //Esto a futuro debera traer los tipos de mantenimiento directo de la BD |
|
|
|
ComboBox<String> tipoEquipo = new ComboBox<>("Tipo de Equipo"); |
|
|
|
tipoEquipo.setItems("Laptop", "Escritorio"); |
|
|
|
|
|
|
|
//CheckBoxes LIMPIEZA DE EQUIPO |
|
|
|
CheckboxGroup<String> limpiezaEq = new CheckboxGroup<>(); |
|
|
|
limpiezaEq.setWidthFull(); |
|
|
|
limpiezaEq.setLabel("LIMPIEZA DE EQUIPO REALIZDA"); |
|
|
|
limpiezaEq.setItems("CPU","Monitor","Laptop"); |
|
|
|
limpiezaEq.setWidthFull(); |
|
|
|
|
|
|
|
CheckboxGroup<String> escannerImp = new CheckboxGroup<>(); |
|
|
|
escannerImp.setItems("Escaner", "Impresora", "Otro"); |
|
|
|
escannerImp.setWidthFull(); |
|
|
|
|
|
|
|
//CheckBoxes ACTUALIZACIONES DE SEGURIDAD |
|
|
|
CheckboxGroup<String> actualiSeg = new CheckboxGroup(); |
|
|
|
Span etiqueta = new Span("ACTUALIZACIONES DE SEGURIDAD INFORMATICA"); |
|
|
|
actualiSeg.setLabel("Actualizaciones necesarias"); |
|
|
|
actualiSeg.setItems("S.O", "Antivirus", "Firewall"); |
|
|
|
|
|
|
|
CheckboxGroup<String> forma = new CheckboxGroup<>(); |
|
|
|
forma.setLabel("Actividad realizada de forma:"); |
|
|
|
forma.setItems("Remota", "Manual"); |
|
|
|
|
|
|
|
CheckboxGroup<String> masActu = new CheckboxGroup<>(); |
|
|
|
masActu.setLabel("¿Requiere mas actualizaciones?:"); |
|
|
|
masActu.setItems("Si", "No"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//?Diseño del Layout de la fecha y la nomenclatura |
|
|
|
HorizontalLayout header = new HorizontalLayout(); |
|
|
|
header.setWidthFull(); |
|
|
|
header.add(fecha); |
|
|
|
header.addAndExpand(new HorizontalLayout()); |
|
|
|
header.add(nomenclatura); |
|
|
|
|
|
|
|
//?Diseño del layout para el tipo de mantenimiento |
|
|
|
VerticalLayout body = new VerticalLayout(tipoMantt); |
|
|
|
|
|
|
|
//?Diseño para los campos de area y el usuario |
|
|
|
HorizontalLayout usuarioLayout = new HorizontalLayout(area, usuario, tipoEquipo); |
|
|
|
|
|
|
|
//?Alineacion de los checkBoxes |
|
|
|
HorizontalLayout checkboxLayout = new HorizontalLayout(forma, masActu, otras); |
|
|
|
|
|
|
|
|
|
|
|
//?Reparaciones realizadas |
|
|
|
VerticalLayout reparacionLayout = new VerticalLayout(); |
|
|
|
Span etiqueta2 = new Span("Reparación Realizada al Equipo"); |
|
|
|
TextField instalacion = new TextField("Instalacion de Software"); |
|
|
|
TextField reparacion = new TextField("Reparacion de Hardware"); |
|
|
|
TextField cambio = new TextField("Cambio de Dispositivo"); |
|
|
|
reparacionLayout.add(etiqueta2, instalacion, reparacion, cambio); |
|
|
|
reparacionLayout.setAlignItems(Alignment.STRETCH); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
add(header, body, usuarioLayout, limpiezaEq, escannerImp, etiqueta, actualiSeg, checkboxLayout, reparacionLayout); |
|
|
|
} |
|
|
|
|
|
|
|
} |