@ -55,8 +55,9 @@ public class CrearnuevoTicketView extends VerticalLayout {
RedmineUser user = userService . getRedmineUser ( ) ;
/ / Componentes principales de la UI
ComboBox < String > tipoTickets = createTicketTypeComboBox ( ) ;
TextField asunto = createTextField ( "Asunto" , "7 00px" ) ;
TextField asunto = createTextField ( "Asunto" , "10 00px" ) ;
TextArea descripcion = createTextArea ( "Descripcion" , "1000px" , "250px" ) ;
/ / Marcar campos como obligatorios
@ -66,16 +67,33 @@ public class CrearnuevoTicketView extends VerticalLayout {
uploadFile . addSucceededListener ( event - > handleFileUpload ( event . getFileName ( ) ) ) ;
/ / Configuracion del Boton
Button createButton = new Button ( "Enviar ticket" , event - > handleCreateButton ( user , tipoTickets , asunto , descripcion ) ) ;
createButton . addThemeVariants ( ButtonVariant . LUMO_PRIMARY , ButtonVariant . LUMO_LARGE ) ;
VerticalLayout fieldsLayout = new VerticalLayout ( descripcion , uploadFile , ticketTypeDesc ) ;
fieldsLayout . setAlignItems ( Alignment . CENTER ) ;
HorizontalLayout firstFields = new HorizontalLayout ( tipoTickets , asunto ) ;
VerticalLayout buttonLayout = new VerticalLayout ( createButton ) ;
/ / Alineacion de los componentes ComboBox Tipos de tickets y Descripcion del tipo de ticket
HorizontalLayout firstFields = new HorizontalLayout ( tipoTickets , ticketTypeDesc ) ;
/ / Alineacion de los componentes de asunto y descripcion
VerticalLayout fieldsLayout = new VerticalLayout ( asunto , descripcion ) ;
fieldsLayout . setAlignItems ( Alignment . START ) ;
/ / Alineacion del Boton y del Upload
HorizontalLayout buttonLayout = new HorizontalLayout ( uploadFile , createButton ) ;
buttonLayout . setAlignItems ( Alignment . START ) ;
buttonLayout . setMargin ( true ) ;
/ / Estilizacion del Span que muestra la descripcion del tipo de ticket
ticketTypeDesc . getStyle ( ) . set ( "font-size" , "15px" ) ;
ticketTypeDesc . getStyle ( ) . set ( "background-color" , "#edeef0" ) ;
ticketTypeDesc . getStyle ( ) . set ( "border-radius" , "5px" ) ;
ticketTypeDesc . getStyle ( ) . set ( "padding" , "10px" ) ;
add ( new H2 ( "Crear nuevo ticket" ) , firstFields , fieldsLayout , buttonLayout ) ;
}