From 7a116fda37847b4f36a3672d2d67edd5a68712a6 Mon Sep 17 00:00:00 2001 From: Sven Carstensen Date: Wed, 13 Aug 2025 13:52:55 +0200 Subject: [PATCH] Erweiterungen --- .../pages/add_job/ui/view/AddJobView.java | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/main/java/de/assecutor/votianlt/pages/add_job/ui/view/AddJobView.java b/src/main/java/de/assecutor/votianlt/pages/add_job/ui/view/AddJobView.java index 98fb234..3aeda18 100644 --- a/src/main/java/de/assecutor/votianlt/pages/add_job/ui/view/AddJobView.java +++ b/src/main/java/de/assecutor/votianlt/pages/add_job/ui/view/AddJobView.java @@ -7,7 +7,6 @@ import com.vaadin.flow.component.combobox.ComboBox; import com.vaadin.flow.component.datepicker.DatePicker; import com.vaadin.flow.component.timepicker.TimePicker; -import com.vaadin.flow.component.html.Div; import com.vaadin.flow.component.html.H3; import com.vaadin.flow.component.html.Main; import com.vaadin.flow.component.html.Span; @@ -26,7 +25,6 @@ import com.vaadin.flow.component.dnd.DragSource; import com.vaadin.flow.component.dnd.DropTarget; import com.vaadin.flow.component.dnd.EffectAllowed; import com.vaadin.flow.data.binder.Binder; -import com.vaadin.flow.data.binder.ValidationException; import com.vaadin.flow.router.Menu; import com.vaadin.flow.component.Component; import com.vaadin.flow.component.textfield.TextArea; @@ -94,11 +92,6 @@ public class AddJobView extends Main { // Stage sections for drag and drop private VerticalLayout pickupSection; private VerticalLayout deliverySection; - private HorizontalLayout mainLayout; - - // Drag sources for dynamic control - private DragSource pickupDragSource; - private DragSource deliveryDragSource; private final Binder binder = new Binder<>(Job.class); @@ -247,7 +240,7 @@ public class AddJobView extends Main { tabContent.add(customerLayout); // Main content layout with two equal columns (50% each) - mainLayout = new HorizontalLayout(); + HorizontalLayout mainLayout = new HorizontalLayout(); mainLayout.setWidthFull(); mainLayout.setSpacing(true); mainLayout.setDefaultVerticalComponentAlignment(FlexComponent.Alignment.START); @@ -255,12 +248,13 @@ public class AddJobView extends Main { // Left column (50%) - Pickup address section pickupSection = createPickupSection(); pickupSection.setWidth("50%"); - pickupDragSource = configureDragAndDrop(pickupSection, "pickup"); + // Drag sources for dynamic control + DragSource pickupDragSource = configureDragAndDrop(pickupSection, "pickup"); // Right column (50%) - Delivery address section deliverySection = createDeliverySection(); deliverySection.setWidth("50%"); - deliveryDragSource = configureDragAndDrop(deliverySection, "delivery"); + DragSource deliveryDragSource = configureDragAndDrop(deliverySection, "delivery"); // Setup focus listeners for input fields setupInputFieldFocusListeners(); @@ -942,7 +936,7 @@ public class AddJobView extends Main { try { // Hier würden Sie normalerweise den SecurityService verwenden // Für diese Demo nehmen wir einen festen Wert - return "test@votianlt.de"; // TODO: SecurityService integrieren + return "test@votianlt.de"; } catch (Exception e) { return null; }