Skip to content

Conversation

@lissavxo
Copy link
Collaborator

@lissavxo lissavxo commented Jul 3, 2025

Related to #1005

Depends on

Description

Added years filter to payments page

Test plan

  • Test payments page year filter
  • Test if csv is working with the new filter

@Klakurka Klakurka requested a review from chedieck July 14, 2025 22:07
@Klakurka Klakurka requested a review from Copilot July 28, 2025 16:41

This comment was marked as outdated.

@lissavxo lissavxo force-pushed the feat/year-payments-filter branch from 86bf0f4 to 3cdce41 Compare July 28, 2025 21:12
@Klakurka Klakurka requested a review from Copilot August 1, 2025 06:22
Copy link
Contributor

Copilot AI left a 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) => {

@Klakurka Klakurka added the enhancement (UI/UX/feature) New feature or request label Aug 6, 2025
networkIds)

if (transactions.length === 0) {
throw new Error(RESPONSE_MESSAGES.NO_TRANSACTION_FOUND_404.message)
Copy link
Collaborator

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

@lissavxo lissavxo force-pushed the feat/year-payments-filter branch from 3cbb53b to 777a029 Compare August 11, 2025 19:16
@lissavxo lissavxo requested a review from chedieck August 11, 2025 19:21
@chedieck chedieck merged commit a22d279 into master Aug 18, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement (UI/UX/feature) New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants