diff --git a/src/main/java/com/application/munera/views/expenses/ExpensesView.java b/src/main/java/com/application/munera/views/expenses/ExpensesView.java index 9b37412..6a8b869 100644 --- a/src/main/java/com/application/munera/views/expenses/ExpensesView.java +++ b/src/main/java/com/application/munera/views/expenses/ExpensesView.java @@ -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);