[FEATURE] PWA + Showcase Grid
CI / build-and-test (pull_request) Successful in 10m36s

This commit is contained in:
Pit Friedrich
2026-07-12 18:10:26 +02:00
parent 9df764d065
commit acb2f5964f
11 changed files with 4771 additions and 93 deletions
@@ -1,10 +1,9 @@
package com.example.views;
import com.example.components.BarChart;
import com.example.components.Card;
import com.example.components.LineChart;
import com.example.components.PieChart;
import com.vaadin.flow.component.Component;
import com.vaadin.flow.component.html.H3;
import com.vaadin.flow.component.notification.Notification;
import com.vaadin.flow.component.orderedlayout.VerticalLayout;
import com.vaadin.flow.router.PageTitle;
@@ -51,20 +50,8 @@ public class DashboardView extends VerticalLayout {
Notification.show("Slice %d".formatted(e.getDataPointIndex()));
});
add(card("Umsatz-Entwicklung", lineChart),
card("Umsatz nach Monat", barChart),
card("Umsatz nach Region", pieChart));
}
private Component card(String title, Component chart) {
H3 heading = new H3(title);
heading.addClassName("dialect-card__title");
VerticalLayout card = new VerticalLayout(heading, chart);
card.addClassName("dialect-card");
card.setWidthFull();
card.setPadding(false);
card.setSpacing(false);
return card;
add(new Card("Umsatz-Entwicklung", lineChart),
new Card("Umsatz nach Monat", barChart),
new Card("Umsatz nach Region", pieChart));
}
}