|
|
@ -47,6 +47,10 @@ public class MantenimientoView extends VerticalLayout implements BeforeEnterObse |
|
|
|
private final DatePicker fecha; |
|
|
|
private final ComboBox<String> tipoMantt; |
|
|
|
|
|
|
|
|
|
|
|
Span userSignSpan = new Span("Nombre Usuario"); |
|
|
|
|
|
|
|
|
|
|
|
public MantenimientoView() { |
|
|
|
this.databaseService = new DatabaseService(); |
|
|
|
this.controlsLayout = new VerticalLayout(); |
|
|
@ -110,6 +114,15 @@ public class MantenimientoView extends VerticalLayout implements BeforeEnterObse |
|
|
|
ComboBox<String> usuario = new ComboBox<>("Usuario"); |
|
|
|
List<String> usuarios = databaseService.getUsuarios(); |
|
|
|
usuario.setItems(usuarios); |
|
|
|
usuario.addValueChangeListener(event -> { |
|
|
|
String usuarioSeleccionado = event.getValue(); |
|
|
|
if (usuarioSeleccionado != null) { |
|
|
|
String nombreUsuario = databaseService.getNombreUsuario(usuarioSeleccionado); |
|
|
|
userSignSpan.setText(nombreUsuario); |
|
|
|
} else { |
|
|
|
userSignSpan.setText("S.M.T Nombre"); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
departamentoLayout.add(area, usuario); |
|
|
|
departamentoLayout.setWidthFull(); |
|
|
@ -313,11 +326,12 @@ public class MantenimientoView extends VerticalLayout implements BeforeEnterObse |
|
|
|
userSignPad.setHeight("200px"); |
|
|
|
userSignPad.setPenColor("#000000"); |
|
|
|
userSignPad.getElement().getStyle().set("border", "1px solid black"); |
|
|
|
Span userSignSpan = new Span("Nombre Usuario"); |
|
|
|
Span tituloUser = new Span("Usuario Interno"); |
|
|
|
userSignLayout.setSizeFull(); |
|
|
|
userSignLayout.setSpacing(true); |
|
|
|
userSignLayout.setSpacing(false); |
|
|
|
userSignLayout.setAlignItems(Alignment.CENTER); |
|
|
|
userSignLayout.add(userSignPad, userSignSpan); |
|
|
|
userSignLayout.add(userSignPad, userSignSpan, tituloUser); |
|
|
|
|
|
|
|
VerticalLayout smtSignLayout = new VerticalLayout(); |
|
|
|
SignaturePad smtSignPad = new SignaturePad(); |
|
|
@ -326,10 +340,12 @@ public class MantenimientoView extends VerticalLayout implements BeforeEnterObse |
|
|
|
smtSignPad.setPenColor("#000000"); |
|
|
|
smtSignPad.getElement().getStyle().set("border", "1px solid black"); |
|
|
|
Span smtSignSpan = new Span("S.M.T. Nombre"); |
|
|
|
Span tituloSMT = new Span("Responsable de Soporte"); |
|
|
|
smtSignLayout.setSizeFull(); |
|
|
|
smtSignLayout.setSpacing(true); |
|
|
|
smtSignLayout.setSpacing(false); |
|
|
|
smtSignLayout.setAlignItems(Alignment.CENTER); |
|
|
|
smtSignLayout.add(smtSignPad, smtSignSpan); |
|
|
|
smtSignLayout.add(smtSignPad, smtSignSpan, tituloSMT); |
|
|
|
|
|
|
|
VerticalLayout gcialSignLayout = new VerticalLayout(); |
|
|
|
SignaturePad gciatiSignPad = new SignaturePad(); |
|
|
|