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