From c3be3ac0503263b374ec368ae684585deca1f1f6 Mon Sep 17 00:00:00 2001 From: filippo-ferrari Date: Fri, 9 Aug 2024 00:21:42 +0200 Subject: [PATCH] refactor: label changes --- .../munera/views/people/PeopleView.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/application/munera/views/people/PeopleView.java b/src/main/java/com/application/munera/views/people/PeopleView.java index 163e4c1..118aa2c 100644 --- a/src/main/java/com/application/munera/views/people/PeopleView.java +++ b/src/main/java/com/application/munera/views/people/PeopleView.java @@ -239,28 +239,28 @@ public class PeopleView extends Div implements BeforeEnterObserver { return badge; } - private Span createExpenseBadge(Boolean isExpenseResolved) { + private Span createExpenseBadge(Boolean isExpensePaid) { Span badge = new Span(); - if (Boolean.TRUE.equals(isExpenseResolved)) { - badge.setText("Resolved"); + if (Boolean.TRUE.equals(isExpensePaid)) { + badge.setText("Paid"); badge.getElement().getThemeList().add("badge success"); } else { - badge.setText("To be Resolved"); + badge.setText("Owed"); badge.getElement().getThemeList().add("badge error"); } return badge; } public void setGridData(List people) { - for (Person person : people) { + for (Person user : people) { // Add the person as a root item - grid.getTreeData().addItem(null, person); + grid.getTreeData().addItem(null, user); // Fetch expenses for the current person - List expenses = expenseService.findExpenseByUser(person); + List expenses = expenseService.findExpenseByUser(user); // Add each expense as a child item under the person - for (Expense expense : expenses) grid.getTreeData().addItem(person, expense); + for (Expense expense : expenses) grid.getTreeData().addItem(user, expense); } } } \ No newline at end of file