Repository navigation
feature: transaction search on Primary and Savings account pages (UserFront) - #632
matthewguerra-cog wants to merge 2 commits into
Conversation
…count pages Co-Authored-By: Matthew Guerra <matthew.guerra@cognition.ai>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
| <dependency> | ||
| <groupId>com.h2database</groupId> | ||
| <artifactId>h2</artifactId> | ||
| <scope>test</scope> |
There was a problem hiding this comment.
👁️ TD Information Security: Critically vulnerable H2 test dependency
h2 inherits version 1.4.195 from Spring Boot 1.5.4.RELEASE, introducing critical CVE-2021-42392 against the Dependencies criterion. The vulnerability permits remote code execution when an H2 Console accepts untrusted remote connections. Test scope excludes production packaging; these tests do not expose that console.
View in Devin Review · Custom reviewer
Was this helpful? React with 👍 or 👎 to provide feedback.
|
|
||
| <div th:fragment="filterForm(actionUrl)" class="panel panel-default transaction-filter"> | ||
| <div class="panel-heading"> | ||
| <strong><i class="fa fa-filter" aria-hidden="true"></i> Search transactions</strong> |
There was a problem hiding this comment.
🧠 TD French Language (Bill 96): Transaction search copy stays English
On both account pages, filterForm displays “Search transactions” and other English labels without locale keys. emptyState and result counts also stay English. Add transactionSearch.title with fr-CA “Rechercher des opérations” and localize the remaining filter, count, and empty-state copy.
View in Devin Review · Custom reviewer
Was this helpful? React with 👍 or 👎 to provide feedback.
| <div class="form-group col-sm-4 col-md-2"> | ||
| <label for="minAmount">Min amount</label> | ||
| <div class="input-group"> | ||
| <span class="input-group-addon"><i class="fa fa-usd" aria-hidden="true"></i></span> |
There was a problem hiding this comment.
🧠 TD French Language (Bill 96): French amount filters show leading dollars
For fr-CA, minAmount and maxAmount display a dollar sign before the value. Place the sign after the input for French currency order, as in 1 250,00 $.
View in Devin Review · Custom reviewer
Was this helpful? React with 👍 or 👎 to provide feedback.
…st of UTC Co-Authored-By: Matthew Guerra <matthew.guerra@cognition.ai>
Summary
Adds a filter panel above the transaction table on
/account/primaryAccountand/account/savingsAccount: date range, type (deposit / withdraw / transfer), min / max amount, and free text on description. Filtering runs in the database, the form is a plainGETso the filters live in the query string (reload and links keep them), and there's a Clear filters link plus an empty state. No schema change.TransactionFilter(form object, bound with@ModelAttribute("filter")+BindingResult, so a bad value likeminAmount=abcis ignored instead of a 400).TransactionSpecifications.forAccount(accountField, account, filter)builds one JPASpecificationused for both entities;Primary/SavingsTransactionDaonow also extendJpaSpecificationExecutor. Results are ordered bydate, id.typecolumn. The app stores deposits, withdrawals and Primary→Savings transfers all astype = "Account", so the column can't tell them apart.deposit→description LIKE 'deposit%',withdraw→'withdraw%',transfer→'%transfer%'(case-insensitive).from/tobind asLocalDateand become midnight in the server's zone, so the selected day is kept on servers west of UTC (ajava.util.Datebound with ISO format parses at UTC midnight and shifted back a day;TransactionFilterDateTestbinds underAmerica/Los_Angelesto cover it). Date range is inclusive of the wholetoday; amount range is inclusive; free text is case-insensitive with%/_escaped.common/transactionFilter.html(filterForm,emptyState), Bootstrap 3 panel styling to match the pages. DataTables' own client-side search box is turned off (searching: false) so there's one search, not two; its sorting and paging are unchanged.TransactionSearchTest(@DataJpaTeston H2, test-scope dependency only) covers each filter, combinations, account scoping and the empty result.mvn -B packageis green on JDK 8 (9 tests). Note:UserFrontApplicationTests.contextLoadsneeds the MySQL fromapplication.properties; against a current MySQL 5.7 the old connector needs?useSSL=falseon the URL (pre-existing, not changed here).Out of scope
The test-scope
h2inherits 1.4.195 from Boot 1.5.4, which has CVE-2021-42392 (H2 Console RCE). It is only on the test classpath, not in the packaged jar, and no console is started; left for the Boot upgrade.Overlapping open PRs
No open PR adds transaction search. These touch the same files and will need a rebase depending on merge order: #360 (paginate transaction history, same handlers/templates), #357 (load
Useronce in the same handlers), #352 / #350 (remove the DAOs'findAll()), #343 (@GetMappinginAccountController). Clear of the Boot 3 upgrade PRs (#605, #623–#625).Screenshot (sample data,
type=transferon Primary)Devin-Org: engineering
Implemented in session Build transaction search in Online Banking UserFront
Review with Devin · Open in Devin Desktop