fix: category column

This commit is contained in:
filippo-ferrari 2024-05-25 15:18:48 +02:00
parent d3df28a950
commit a6063690e9

View file

@ -80,7 +80,9 @@ public class ExpensesView extends Div implements BeforeEnterObserver {
// Configure Grid
grid.addColumn(Expense::getName).setHeader("Name").setSortable(true);
grid.addColumn(Expense::getCost).setHeader("Amount").setSortable(true);
grid.addColumn(Expense::getCategory).setHeader("Category").setSortable(true);
grid.addColumn(expenseCategory -> expenseCategory.getCategory().getName())
.setHeader("Category")
.setSortable(true);
grid.addColumn(Expense::getPeriodInterval).setHeader("Period Interval").setSortable(true);
grid.addColumn(Expense::getPeriodUnit).setHeader("Period Unit").setSortable(true);
grid.addColumn(Expense::getDate).setHeader("Date").setSortable(true);