Erweiterungen
This commit is contained in:
@@ -7,7 +7,6 @@ import com.vaadin.flow.component.combobox.ComboBox;
|
|||||||
|
|
||||||
import com.vaadin.flow.component.datepicker.DatePicker;
|
import com.vaadin.flow.component.datepicker.DatePicker;
|
||||||
import com.vaadin.flow.component.timepicker.TimePicker;
|
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.H3;
|
||||||
import com.vaadin.flow.component.html.Main;
|
import com.vaadin.flow.component.html.Main;
|
||||||
import com.vaadin.flow.component.html.Span;
|
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.DropTarget;
|
||||||
import com.vaadin.flow.component.dnd.EffectAllowed;
|
import com.vaadin.flow.component.dnd.EffectAllowed;
|
||||||
import com.vaadin.flow.data.binder.Binder;
|
import com.vaadin.flow.data.binder.Binder;
|
||||||
import com.vaadin.flow.data.binder.ValidationException;
|
|
||||||
import com.vaadin.flow.router.Menu;
|
import com.vaadin.flow.router.Menu;
|
||||||
import com.vaadin.flow.component.Component;
|
import com.vaadin.flow.component.Component;
|
||||||
import com.vaadin.flow.component.textfield.TextArea;
|
import com.vaadin.flow.component.textfield.TextArea;
|
||||||
@@ -94,11 +92,6 @@ public class AddJobView extends Main {
|
|||||||
// Stage sections for drag and drop
|
// Stage sections for drag and drop
|
||||||
private VerticalLayout pickupSection;
|
private VerticalLayout pickupSection;
|
||||||
private VerticalLayout deliverySection;
|
private VerticalLayout deliverySection;
|
||||||
private HorizontalLayout mainLayout;
|
|
||||||
|
|
||||||
// Drag sources for dynamic control
|
|
||||||
private DragSource<VerticalLayout> pickupDragSource;
|
|
||||||
private DragSource<VerticalLayout> deliveryDragSource;
|
|
||||||
|
|
||||||
private final Binder<Job> binder = new Binder<>(Job.class);
|
private final Binder<Job> binder = new Binder<>(Job.class);
|
||||||
|
|
||||||
@@ -247,7 +240,7 @@ public class AddJobView extends Main {
|
|||||||
tabContent.add(customerLayout);
|
tabContent.add(customerLayout);
|
||||||
|
|
||||||
// Main content layout with two equal columns (50% each)
|
// Main content layout with two equal columns (50% each)
|
||||||
mainLayout = new HorizontalLayout();
|
HorizontalLayout mainLayout = new HorizontalLayout();
|
||||||
mainLayout.setWidthFull();
|
mainLayout.setWidthFull();
|
||||||
mainLayout.setSpacing(true);
|
mainLayout.setSpacing(true);
|
||||||
mainLayout.setDefaultVerticalComponentAlignment(FlexComponent.Alignment.START);
|
mainLayout.setDefaultVerticalComponentAlignment(FlexComponent.Alignment.START);
|
||||||
@@ -255,12 +248,13 @@ public class AddJobView extends Main {
|
|||||||
// Left column (50%) - Pickup address section
|
// Left column (50%) - Pickup address section
|
||||||
pickupSection = createPickupSection();
|
pickupSection = createPickupSection();
|
||||||
pickupSection.setWidth("50%");
|
pickupSection.setWidth("50%");
|
||||||
pickupDragSource = configureDragAndDrop(pickupSection, "pickup");
|
// Drag sources for dynamic control
|
||||||
|
DragSource<VerticalLayout> pickupDragSource = configureDragAndDrop(pickupSection, "pickup");
|
||||||
|
|
||||||
// Right column (50%) - Delivery address section
|
// Right column (50%) - Delivery address section
|
||||||
deliverySection = createDeliverySection();
|
deliverySection = createDeliverySection();
|
||||||
deliverySection.setWidth("50%");
|
deliverySection.setWidth("50%");
|
||||||
deliveryDragSource = configureDragAndDrop(deliverySection, "delivery");
|
DragSource<VerticalLayout> deliveryDragSource = configureDragAndDrop(deliverySection, "delivery");
|
||||||
|
|
||||||
// Setup focus listeners for input fields
|
// Setup focus listeners for input fields
|
||||||
setupInputFieldFocusListeners();
|
setupInputFieldFocusListeners();
|
||||||
@@ -942,7 +936,7 @@ public class AddJobView extends Main {
|
|||||||
try {
|
try {
|
||||||
// Hier würden Sie normalerweise den SecurityService verwenden
|
// Hier würden Sie normalerweise den SecurityService verwenden
|
||||||
// Für diese Demo nehmen wir einen festen Wert
|
// Für diese Demo nehmen wir einen festen Wert
|
||||||
return "test@votianlt.de"; // TODO: SecurityService integrieren
|
return "test@votianlt.de";
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user