refactor: changed label

This commit is contained in:
effe 2024-09-10 09:56:12 -04:00
parent 8e8f167a93
commit 24056192f6

View file

@ -77,7 +77,7 @@ public class PeopleView extends Div implements BeforeEnterObserver {
grid.addThemeVariants(GridVariant.LUMO_NO_BORDER); grid.addThemeVariants(GridVariant.LUMO_NO_BORDER);
grid.addHierarchyColumn(this::getNodeName).setHeader("Name"); grid.addHierarchyColumn(this::getNodeName).setHeader("Name");
grid.addColumn(this::getNodeCost).setHeader("Total Expenses Value").setSortable(true); grid.addColumn(this::getNodeCost).setHeader("Balance").setSortable(true);
grid.addColumn(new ComponentRenderer<>(persona -> { grid.addColumn(new ComponentRenderer<>(persona -> {
if (persona instanceof Person) return this.viewsService.createPersonBadge(personService.calculateNetBalance((Person) persona)); if (persona instanceof Person) return this.viewsService.createPersonBadge(personService.calculateNetBalance((Person) persona));
else return this.viewsService.createExpenseBadge(((Expense) persona)); else return this.viewsService.createExpenseBadge(((Expense) persona));