|
|
@ -11,6 +11,7 @@ import com.vaadin.flow.component.combobox.ComboBox; |
|
|
|
import com.vaadin.flow.component.html.H2; |
|
|
|
import com.vaadin.flow.component.notification.Notification; |
|
|
|
import com.vaadin.flow.component.notification.NotificationVariant; |
|
|
|
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; |
|
|
@ -30,6 +31,7 @@ public class CrearnuevoTicketView extends VerticalLayout { |
|
|
|
projectId.setReadOnly(true); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Combo de los tipos de tickets |
|
|
|
ComboBox<String> tipoTickets = new ComboBox<>("Tipo de ticket"); |
|
|
|
ApiRedmine api = new ApiRedmine(); |
|
|
@ -45,7 +47,7 @@ public class CrearnuevoTicketView extends VerticalLayout { |
|
|
|
//Campo de texto para la descripcion |
|
|
|
TextArea descripcion = new TextArea("Descripcion"); |
|
|
|
descripcion.setWidth("1000px"); |
|
|
|
descripcion.setHeight("300px"); |
|
|
|
descripcion.setHeight("250px"); |
|
|
|
|
|
|
|
|
|
|
|
//Respuestas Json para verificar posibles errores al enviar los nuevos tickets no visibles en la interfaz |
|
|
@ -84,14 +86,16 @@ public class CrearnuevoTicketView extends VerticalLayout { |
|
|
|
}); |
|
|
|
createButton.addThemeVariants(ButtonVariant.LUMO_PRIMARY); |
|
|
|
|
|
|
|
VerticalLayout fieldsLayout = new VerticalLayout(asunto, descripcion); |
|
|
|
VerticalLayout fieldsLayout = new VerticalLayout(descripcion); |
|
|
|
fieldsLayout.setAlignItems(Alignment.CENTER); |
|
|
|
|
|
|
|
HorizontalLayout firstFields = new HorizontalLayout(tipoTickets, asunto); |
|
|
|
|
|
|
|
VerticalLayout buttonLayout = new VerticalLayout(createButton); |
|
|
|
buttonLayout.setAlignItems(Alignment.END); |
|
|
|
buttonLayout.setMargin(true); |
|
|
|
|
|
|
|
add(new H2("Crear nuevo ticket"),projectId, tipoTickets, fieldsLayout,buttonLayout/*,jsonOutput,responseField*/); |
|
|
|
add(new H2("Crear nuevo ticket"),projectId, firstFields, fieldsLayout,buttonLayout/*,jsonOutput,responseField*/); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|