fix: URI ids
now edit functionality is working
This commit is contained in:
parent
8e755bb455
commit
0b47b8c33f
2 changed files with 5 additions and 5 deletions
|
@ -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<Category> get(Long id) {
|
||||
public Optional<Category> findById(Long id) {
|
||||
return categoryRepository.findById(id);
|
||||
}
|
||||
|
||||
|
|
|
@ -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<Expense> 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
|
||||
|
|
Loading…
Reference in a new issue