Feat/year payments filter#1017
Merged
Merged
Conversation
86bf0f4 to
3cdce41
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds year filtering functionality to the payments page, allowing users to filter transactions by year in addition to the existing button filtering. The implementation includes both frontend UI updates and backend API modifications to support the new filtering capability.
Key changes include:
- Added year filtering controls to the payments page UI
- Updated backend services to handle year-based filtering in payment queries
- Enhanced CSV export functionality to include year filtering
- Added invoice-related functionality with modal support for creating, editing, and viewing invoices
Reviewed Changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| services/transactionService.ts | Added year filtering parameters to payment queries and new function to fetch distinct years |
| pages/payments/index.tsx | Added year filter UI controls and invoice management functionality |
| pages/api/transaction/years/index.ts | New API endpoint to retrieve available transaction years |
| pages/api/payments/*.ts | Updated payment APIs to support year filtering parameters |
| components/Transaction/InvoiceModal.tsx | Enhanced invoice modal with print functionality and improved data handling |
| components/Transaction/Invoice.tsx | New printable invoice component |
| redis/types.ts | Added InvoiceData interface and updated Payment interface |
| redis/paymentCache.ts | Added new function to handle payments with invoices |
Comments suppressed due to low confidence (2)
components/Transaction/Invoice.tsx:6
- The interface is named 'ReceiptProps' but the component is called 'Invoice' and handles invoice data. Consider renaming to 'InvoiceProps' for consistency.
interface ReceiptProps {
components/Transaction/Invoice.tsx:21
- The component is named 'Receipt' but it represents an invoice. Consider renaming to 'Invoice' or 'PrintableInvoice' for clarity and consistency with the file name.
const Receipt = React.forwardRef<HTMLDivElement, ReceiptProps>((props, ref) => {
chedieck
requested changes
Aug 8, 2025
| networkIds) | ||
|
|
||
| if (transactions.length === 0) { | ||
| throw new Error(RESPONSE_MESSAGES.NO_TRANSACTION_FOUND_404.message) |
Collaborator
There was a problem hiding this comment.
Yeah, shouldn't error here, now paybuttons with 0 txs are erroring
3cbb53b to
777a029
Compare
Klakurka
approved these changes
Aug 15, 2025
chedieck
approved these changes
Aug 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #1005
Depends on
Description
Added years filter to payments page
Test plan