diff --git a/src/main/java/com/application/munera/services/CategoryService.java b/src/main/java/com/application/munera/services/CategoryService.java index 1c4a98c..539718e 100644 --- a/src/main/java/com/application/munera/services/CategoryService.java +++ b/src/main/java/com/application/munera/services/CategoryService.java @@ -2,10 +2,10 @@ package com.application.munera.services; import com.application.munera.data.Category; import com.application.munera.repositories.CategoryRepository; -import jakarta.persistence.Cache; -import org.springframework.stereotype.Service; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + import java.util.List; import java.util.Optional; @@ -18,7 +18,7 @@ public class CategoryService { this.categoryRepository = categoryRepository; } - public Optional get(Long id) { + public Optional findById(Long id) { return categoryRepository.findById(id); } 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 234d2c5..a0272ae 100644 --- a/src/main/java/com/application/munera/views/expenses/ExpensesView.java +++ b/src/main/java/com/application/munera/views/expenses/ExpensesView.java @@ -40,7 +40,7 @@ import java.util.Optional; @Uses(Icon.class) public class ExpensesView extends Div implements BeforeEnterObserver { - private final String EXPENSE_ID = "ExpenseID"; + private final String EXPENSE_ID = "expenseID"; private final String EXPENSE_EDIT_ROUTE_TEMPLATE = "/%s/edit"; private final Grid grid = new Grid<>(Expense.class, false); @@ -143,7 +143,7 @@ public class ExpensesView extends Div implements BeforeEnterObserver { populateForm(expenseFromBackend.get()); } else { Notification.show( - String.format("The requested samplePerson was not found, ID = %s", expenseId.get()), 3000, + String.format("The requested expense was not found, ID = %s", expenseId.get()), 3000, Notification.Position.BOTTOM_START); // when a row is selected but the data is no longer available, // refresh grid