Versio 2.0.0

Signed-off-by: laurimaaninka <lauri.maaninka@gmail.com>
This commit is contained in:
2026-04-12 23:53:23 +03:00
parent 6601a588c2
commit 88983b2e43
7 changed files with 166 additions and 44 deletions
@@ -59,18 +59,21 @@ public class KuljetusRaportit extends TabPohja {
Button tulostaRaportti = new Button("Tulosta raportti");
tulostaRaportti.setFont(buttonFont);
tulostaRaportti.setOnAction(_ ->tulostaRaportti());
yläpalkinNapit.getChildren().addAll(tarkka, new Label("Hae kuljetukset välillä:"), alkuPvm, new Label("-"), loppuPvm, haeKuljetukset, tulostaRaportti);
yläpalkinNapit.getChildren().addAll(tarkka,
new Label("Hae kuljetukset välillä:"),
alkuPvm, new Label("-"), loppuPvm,
haeKuljetukset, tulostaRaportti);
root.setCenter(tableView);
TableColumn<RaporttiRivi, String> tcNimi = new TableColumn<>("Nimi");
tcNimi.setMinWidth(150);
tcNimi.setMinWidth(200);
tcNimi.setCellValueFactory(new PropertyValueFactory<>("nimi"));
TableColumn<RaporttiRivi, LocalDate> tcPvm = new TableColumn<>("Päivämäärä");
tcPvm.setMinWidth(150);
tcPvm.setCellFactory(_ ->new PaivamaaraTableCell());
tcPvm.setCellValueFactory(new PropertyValueFactory<>("loppuPvm"));
tcPvm.setCellValueFactory(new PropertyValueFactory<>("pvm"));
TableColumn<RaporttiRivi, Integer> tcSalaatit = new TableColumn<>("Salaatit");
tcSalaatit.setMinWidth(100);
@@ -85,10 +88,27 @@ public class KuljetusRaportit extends TabPohja {
tcJälkiruoat.setCellValueFactory(new PropertyValueFactory<>("jälkiruoat"));
TableColumn<RaporttiRivi, String> tcLisätiedot = new TableColumn<>("Lisätiedot");
tcLisätiedot.setMinWidth(500);
tcLisätiedot.setMinWidth(300);
tcLisätiedot.setCellValueFactory(new PropertyValueFactory<>("lisätiedot"));
tableView.getColumns().addAll(tcNimi, tcPvm, tcSalaatit, tcPääruoat, tcJälkiruoat, tcLisätiedot);
TableColumn<RaporttiRivi, String> tcYhteyshenkilönNimi = new TableColumn<>("Yhteyshenkilön nimi");
tcYhteyshenkilönNimi.setMinWidth(200);
tcYhteyshenkilönNimi.setCellValueFactory(new PropertyValueFactory<>("yhteyshenkilönNimi"));
TableColumn<RaporttiRivi, String> tcLaskutusOsoite = new TableColumn<>("Laskutusosoite");
tcLaskutusOsoite.setMinWidth(200);
tcLaskutusOsoite.setCellValueFactory(new PropertyValueFactory<>("laskutusOsoite"));
TableColumn<RaporttiRivi, String> tcYhteyshenkilönPuhelinnumero = new TableColumn<>("Puhelinnumero");
tcYhteyshenkilönPuhelinnumero.setMinWidth(200);
tcYhteyshenkilönPuhelinnumero.setCellValueFactory(new PropertyValueFactory<>("yhteyshenkilönPuhelinnumero"));
TableColumn<RaporttiRivi, String> tcYhteyshenkilönSähköposti = new TableColumn<>("Sähköposti");
tcYhteyshenkilönSähköposti.setMinWidth(200);
tcYhteyshenkilönSähköposti.setCellValueFactory(new PropertyValueFactory<>("yhteyshenkilönSähköposti"));
tableView.getColumns().addAll(tcNimi, tcPvm, tcSalaatit, tcPääruoat, tcJälkiruoat, tcLisätiedot,
tcYhteyshenkilönNimi, tcLaskutusOsoite, tcYhteyshenkilönPuhelinnumero, tcYhteyshenkilönSähköposti);
tableView.setPlaceholder(new Label("Hae raportti"));
for (TableColumn<RaporttiRivi, ?> sarake : tableView.getColumns()) {
sarake.setSortable(false);