-
Notifications
You must be signed in to change notification settings - Fork 3
Feat/year payments filter #1017
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
86bf0f4 to
3cdce41
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) => {
services/transactionService.ts
Outdated
| networkIds) | ||
|
|
||
| if (transactions.length === 0) { | ||
| throw new Error(RESPONSE_MESSAGES.NO_TRANSACTION_FOUND_404.message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, shouldn't error here, now paybuttons with 0 txs are erroring
3cbb53b to
777a029
Compare
Related to #1005
Depends on
Description
Added years filter to payments page
Test plan