fix: refresh grid issue

This commit is contained in:
filippo-ferrari 2024-07-13 18:44:13 +02:00
parent 40b1966f14
commit 1b0b469c7b
2 changed files with 8 additions and 6 deletions

View file

@ -39,11 +39,11 @@ Munera is a companion for managing expenses efficiently and effortlessly, whethe
2. **Weekly and Monthly Summaries** 2. **Weekly and Monthly Summaries**
- Create functionality to generate weekly and monthly summaries, including filtering and sorting options. - Create functionality to generate weekly and monthly summaries, including filtering and sorting options.
~~- Create a dashboard or log of "next expenses" that lists the next recurring expenses that you expect to receive~~ - ~~Create a dashboard or log of "next expenses" that lists the next recurring expenses that you expect to receive~~
3. **Reports for Creditors and Debtors** 3. **Reports for Creditors and Debtors**
~~- Develop reports outlining debts or credits for each creditor and debtor to provide users with a comprehensive overview.~~ - ~~Develop reports outlining debts or credits for each creditor and debtor to provide users with a comprehensive overview.~~
~~- CRUD operations for creditors and debtors~~ - ~~CRUD operations for creditors and debtors~~
4. **Create a way to set the currency of each expense** 4. **Create a way to set the currency of each expense**
- It should be possible in the form of an expense - It should be possible in the form of an expense
@ -51,12 +51,13 @@ Munera is a companion for managing expenses efficiently and effortlessly, whethe
- If possible, the calculations should take into account the different currencies - If possible, the calculations should take into account the different currencies
5. **Events** 5. **Events**
~~- Options to create events in which to put expenses (vacations, congress, etc)~~ - ~~Options to create events in which to put expenses (vacations, congress, etc)~~
~~- Each event has a number of people connected to it, expenses can be added to these people~~ - ~~Each event has a number of people connected to it, expenses can be added to these people~~
- A reports tells which people need to give/take money to which people in order to be even - A reports tells which people need to give/take money to which people in order to be even
## Known Issues ## Known Issues
- Form still needs more validation when empty, some entities can be created with all null values, even the ones that have constraints throw SQL errors, they need to be gracefully handled. - Form still needs more validation when empty, some entities can be created with all null values, even the ones that have constraints throw SQL errors, they need to be gracefully handled.
- Graphs still need a lot of improvements - Graphs still need a lot of improvements
- PeriodUnit and Interval need to be implemented - PeriodUnit and Interval need to be implemented
- ~~ExpenseView dosent refresh after an edit operation anymore~~

View file

@ -276,6 +276,7 @@ public class ExpensesView extends Div implements BeforeEnterObserver {
} }
private void refreshGrid() { private void refreshGrid() {
grid.setItems(this.expenseService.findAll());
grid.select(null); grid.select(null);
grid.getDataProvider().refreshAll(); grid.getDataProvider().refreshAll();
} }