Detalles #87

Merged
alex merged 8 commits from Detalles into main 2024-11-28 13:53:16 +00:00
Showing only changes of commit 5f3e1c1f1a - Show all commits

View File

@ -8,6 +8,7 @@ import com.primefactorsolutions.service.EmployeeService;
import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.button.Button;
import com.vaadin.flow.component.combobox.ComboBox;
import com.vaadin.flow.component.html.Span;
import com.vaadin.flow.component.notification.Notification;
import com.vaadin.flow.component.orderedlayout.HorizontalLayout;
import com.vaadin.flow.component.textfield.TextField;
@ -42,6 +43,7 @@ public class DocumentView extends BeanValidationForm<Document> implements HasUrl
private final TextField fileName = new TextField("Nombre del documento");
private final ComboBox<DocumentType> documentType = new ComboBox<>("Tipo de documento");
private final ComboBox<Employee> employeeComboBox = new ComboBox<>("Empleado");
private final Span pdfOnlyMessage = new Span("Únicamente se permite la carga de archivos en formato PDF.");
private final MemoryBuffer buffer = new MemoryBuffer();
private final Upload uploadButton = new Upload(buffer);
private final DocumentService documentService;
@ -268,6 +270,6 @@ public class DocumentView extends BeanValidationForm<Document> implements HasUrl
HorizontalLayout buttonLayout = new HorizontalLayout();
buttonLayout.add(uploadButton, createViewDocumentButton());
buttonLayout.setSpacing(true);
return List.of(fileName, documentType, employeeComboBox, buttonLayout, createCloseButton());
return List.of(fileName, documentType, employeeComboBox, pdfOnlyMessage, buttonLayout, createCloseButton());
}
}