feat: style and dialog improvements

- Add backdrop blur for landing view hero and section panels

- Refactor PickupStationDialog with improved button styling and layout
This commit is contained in:
2026-03-20 14:38:18 +01:00
parent 8d4f04156e
commit b79fc79546
3 changed files with 39 additions and 28 deletions

Binary file not shown.

View File

@@ -1802,6 +1802,16 @@ vaadin-confirm-dialog-overlay::part(content) {
box-shadow: var(--app-shadow-xl);
}
vaadin-dialog-overlay[theme~="no-inner-card"]::part(content) {
border-radius: 0;
border: none;
background: none;
backdrop-filter: none;
box-shadow: none;
padding: 0;
margin: 0;
}
vaadin-tabsheet::part(content) {
border-radius: 0 0 24px 24px;
background: rgba(255, 255, 255, 0.86);

View File

@@ -6,6 +6,7 @@ import com.vaadin.flow.component.checkbox.Checkbox;
import com.vaadin.flow.component.combobox.ComboBox;
import com.vaadin.flow.component.datepicker.DatePicker;
import com.vaadin.flow.component.dialog.Dialog;
import com.vaadin.flow.component.html.Div;
import com.vaadin.flow.component.html.H3;
import com.vaadin.flow.component.html.Span;
import com.vaadin.flow.component.icon.Icon;
@@ -262,12 +263,14 @@ public class PickupStationDialog extends Dialog {
setWidth("960px");
setHeight("80vh");
// Remove white rounded card from dialog overlay
getElement().setAttribute("theme", "no-inner-card");
// Address form
VerticalLayout formLayout = new VerticalLayout();
formLayout.setPadding(true);
formLayout.setSpacing(true);
formLayout.setWidthFull();
formLayout.addClassName("dialog-form-panel");
// Customer selection
customerComboBox = new ComboBox<>(translationHelper.getTranslation("addjob.customer.label"));
@@ -434,24 +437,15 @@ public class PickupStationDialog extends Dialog {
formLayout.add(customerComboBox, company, salutation, firstName, lastName, phone, streetLayout, addressAddition,
zipCityLayout, saveAddress);
// TabSheet with address, appointments, and cargo tabs
TabSheet tabSheet = new TabSheet();
tabSheet.setWidthFull();
tabSheet.setSizeFull();
// Red border frame filling the dialog
Div redFrame = new Div();
redFrame.getStyle().set("border", "10px solid red");
redFrame.getStyle().set("border-radius", "0");
redFrame.getStyle().set("box-sizing", "border-box");
redFrame.setSizeFull();
addressTabError = createTabErrorIndicator();
appointmentsTabError = createTabErrorIndicator();
cargoTabError = createTabErrorIndicator();
Tab addressTab = tabSheet.add(translationHelper.getTranslation("addjob.tab.addresses"), formLayout);
addressTab.add(addressTabError);
Tab appointmentsTab = tabSheet.add(translationHelper.getTranslation("addjob.tab.appointments"),
createAppointmentsTab(availableAppUsers));
appointmentsTab.add(appointmentsTabError);
Tab cargoTab = tabSheet.add(translationHelper.getTranslation("addjob.tab.cargo"), createCargoTab());
cargoTab.add(cargoTabError);
add(tabSheet);
add(redFrame);
redFrame.getStyle().set("flex", "1");
// Footer buttons
Button saveButton = new Button(translationHelper.getTranslation("dialog.confirm"), e -> {
@@ -566,14 +560,16 @@ public class PickupStationDialog extends Dialog {
if (data.getCustomerSelection() != null) {
customerComboBox.setValue(data.getCustomerSelection());
}
if (data.getAppointmentDate() != null) {
if (data.getAppointmentDate() != null && appointmentDatePicker != null) {
appointmentDatePicker.setValue(data.getAppointmentDate());
}
if (data.getAppointmentTime() != null) {
if (data.getAppointmentTime() != null && appointmentTimePicker != null) {
appointmentTimePicker.setValue(data.getAppointmentTime());
}
digitalProcessingCheckbox.setValue(data.isDigitalProcessing());
if (data.getAppUser() != null) {
if (digitalProcessingCheckbox != null) {
digitalProcessingCheckbox.setValue(data.isDigitalProcessing());
}
if (data.getAppUser() != null && appUserComboBox != null) {
appUserComboBox.setValue(data.getAppUser());
}
if (data.getCargoItems() != null && !data.getCargoItems().isEmpty() && cargoList != null) {
@@ -624,7 +620,9 @@ public class PickupStationDialog extends Dialog {
addressValid &= validateTextField(houseNumber);
addressValid &= validateTextField(zip);
addressValid &= validateTextField(city);
addressTabError.setVisible(!addressValid);
if (addressTabError != null) {
addressTabError.setVisible(!addressValid);
}
// Appointments tab validation
boolean appointmentsValid = true;
@@ -633,16 +631,21 @@ public class PickupStationDialog extends Dialog {
applyErrorStyling(appointmentDatePicker, dateEmpty);
appointmentsValid &= !dateEmpty;
}
if (Boolean.TRUE.equals(digitalProcessingCheckbox.getValue()) && appUserComboBox != null) {
if (digitalProcessingCheckbox != null && Boolean.TRUE.equals(digitalProcessingCheckbox.getValue())
&& appUserComboBox != null) {
boolean appUserEmpty = appUserComboBox.getValue() == null;
applyErrorStyling(appUserComboBox, appUserEmpty);
appointmentsValid &= !appUserEmpty;
}
appointmentsTabError.setVisible(!appointmentsValid);
if (appointmentsTabError != null) {
appointmentsTabError.setVisible(!appointmentsValid);
}
// Cargo tab validation
boolean cargoValid = validateCargoItems();
cargoTabError.setVisible(!cargoValid);
if (cargoTabError != null) {
cargoTabError.setVisible(!cargoValid);
}
return addressValid && appointmentsValid && cargoValid;
}
@@ -761,7 +764,6 @@ public class PickupStationDialog extends Dialog {
content.setSpacing(true);
content.setWidth("720px");
content.setDefaultHorizontalComponentAlignment(FlexComponent.Alignment.STRETCH);
content.addClassName("dialog-content-panel");
// Digital processing + App user
digitalProcessingCheckbox = new Checkbox(translationHelper.getTranslation("profile.settings.digitalprocess"));
@@ -854,7 +856,6 @@ public class PickupStationDialog extends Dialog {
VerticalLayout cargoAreaContainer = new VerticalLayout();
cargoAreaContainer.setWidthFull();
cargoAreaContainer.setSpacing(true);
cargoAreaContainer.addClassName("dialog-cargo-card");
H3 cargoTitle = new H3(translationHelper.getTranslation("addjob.tab.cargo"));