Skip to content
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

Add filters for qfrounds for project donation page #1028

Merged
merged 2 commits into from
Jun 14, 2023

Conversation

CarlosQ96
Copy link
Collaborator

@CarlosQ96 CarlosQ96 commented Jun 14, 2023

Filter by QfRoundId
Related to: Giveth/giveth-dapps-v2#2694

(ONLY the filters part, ill make a separated PR for the distributed matching, I think we can have a meeting about this tomorrow)

@CarlosQ96
Copy link
Collaborator Author

@alireza-sharifpour @MohammadPCh to filter by qfround
I added to the query

export const fetchDonationsByProjectIdQuery = `
  query (
    $take: Int
    $skip: Int
    $traceable: Boolean
    $qfRoundId: Int
    $projectId: Int!
    $searchTerm: String
    $status: String
    $orderBy: SortBy
  ) {
    donationsByProjectId(
      take: $take
      skip: $skip
      traceable: $traceable
      qfRoundId: $qfRoundId
      projectId: $projectId
      searchTerm: $searchTerm
      status: $status
      orderBy: $orderBy
    ) {
      donations {
        id
        transactionId
        transactionNetworkId
        toWalletAddress
        fromWalletAddress
        currency
        anonymous
        valueUsd
        amount
        qfRound {
          id
        }
        status
        user {
          id
          walletAddress
          firstName
          email
        }
        createdAt
      }
      totalCount
      totalUsdBalance
    }
  }
`;

This argument

    @Arg('qfRoundId', type => Int, { defaultValue: null, nullable: true })

@CarlosQ96
Copy link
Collaborator Author

dont send the attribute if you want all donations

@CarlosQ96
Copy link
Collaborator Author

The ids are retrieves from the query qfRounds

Copy link
Collaborator

@mohammadranjbarz mohammadranjbarz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @CarlosQ96
LGTM

@mohammadranjbarz mohammadranjbarz merged commit 29646d5 into f_980_implement_qfRound Jun 14, 2023
@mohammadranjbarz mohammadranjbarz deleted the feature_qf_round_filters branch June 14, 2023 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants