Erweiterungen

This commit is contained in:
2025-09-15 11:48:30 +02:00
parent 9eae13b5d8
commit b0eb3f7721
3 changed files with 6 additions and 6 deletions

View File

@@ -26,7 +26,7 @@ public final class ViewToolbar extends Composite<Header> {
if (components.length > 0) { if (components.length > 0) {
var actions = new Div(components); var actions = new Div(components);
actions.addClassNames(Display.FLEX, FlexDirection.COLUMN, JustifyContent.BETWEEN, Flex.GROW, Gap.SMALL, actions.addClassNames(Display.FLEX, FlexDirection.COLUMN, JustifyContent.END, Flex.GROW, Gap.SMALL,
FlexDirection.Breakpoint.Medium.ROW); FlexDirection.Breakpoint.Medium.ROW);
getContent().add(actions); getContent().add(actions);
} }

View File

@@ -33,7 +33,7 @@ import lombok.extern.slf4j.Slf4j;
import org.bson.types.ObjectId; import org.bson.types.ObjectId;
@Route(value = "job_history", layout = de.assecutor.votianlt.pages.base.ui.view.MainLayout.class) @Route(value = "job_history", layout = de.assecutor.votianlt.pages.base.ui.view.MainLayout.class)
@PageTitle("Job History") @PageTitle("Job Historie")
@RolesAllowed("USER") @RolesAllowed("USER")
@Slf4j @Slf4j
public class JobHistoryView extends Main implements HasUrlParameter<String> { public class JobHistoryView extends Main implements HasUrlParameter<String> {
@@ -57,7 +57,7 @@ public class JobHistoryView extends Main implements HasUrlParameter<String> {
LumoUtility.FlexDirection.COLUMN, LumoUtility.Padding.MEDIUM, LumoUtility.FlexDirection.COLUMN, LumoUtility.Padding.MEDIUM,
LumoUtility.Gap.SMALL); LumoUtility.Gap.SMALL);
add(new ViewToolbar("Job History")); add(new ViewToolbar("Job Historie"));
content = new VerticalLayout(); content = new VerticalLayout();
content.setSpacing(true); content.setSpacing(true);
@@ -96,7 +96,7 @@ public class JobHistoryView extends Main implements HasUrlParameter<String> {
content.removeAll(); content.removeAll();
// Header mit Job-Informationen // Header mit Job-Informationen
H2 header = new H2("Job History - " + (job.getJobNumber() != null ? job.getJobNumber() : "Unbekannte Auftragsnummer")); H2 header = new H2("Job Historie - " + (job.getJobNumber() != null ? job.getJobNumber() : "Unbekannte Auftragsnummer"));
content.add(header); content.add(header);
// Job basic info for context // Job basic info for context
@@ -123,7 +123,7 @@ public class JobHistoryView extends Main implements HasUrlParameter<String> {
content.add(timeline); content.add(timeline);
} }
} catch (Exception e) { } catch (Exception e) {
Span errorMessage = new Span("Fehler beim Laden der Job History: " + e.getMessage()); Span errorMessage = new Span("Fehler beim Laden der Job Historie: " + e.getMessage());
errorMessage.getStyle().set("color", "var(--lumo-error-text-color)"); errorMessage.getStyle().set("color", "var(--lumo-error-text-color)");
content.add(errorMessage); content.add(errorMessage);
} }

View File

@@ -118,7 +118,7 @@ public class JobSummaryView extends Main implements HasUrlParameter<String> {
} }
// Create Job History Button for toolbar // Create Job History Button for toolbar
Button jobHistoryButton = new Button("Job History"); Button jobHistoryButton = new Button("Job Historie");
jobHistoryButton.addThemeVariants(ButtonVariant.LUMO_PRIMARY); jobHistoryButton.addThemeVariants(ButtonVariant.LUMO_PRIMARY);
jobHistoryButton.addClickListener(e -> { jobHistoryButton.addClickListener(e -> {
getUI().ifPresent(ui -> ui.navigate("job_history/" + job.getId().toHexString())); getUI().ifPresent(ui -> ui.navigate("job_history/" + job.getId().toHexString()));