Skip to content

Commit

Permalink
fix(Dashboard): hide resume contributions message for hosts (#10639)
Browse files Browse the repository at this point in the history
  • Loading branch information
Betree authored Sep 5, 2024
1 parent 24db73c commit 97db9de
Show file tree
Hide file tree
Showing 6 changed files with 2,684 additions and 2,416 deletions.
25 changes: 19 additions & 6 deletions components/dashboard/sections/contributions/Contributions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,16 @@ const dashboardContributionsMetadataQuery = gql`
) @skip(if: $onlyExpectedFunds) {
totalCount
}
PAUSED_RESUMABLE: orders(
filter: INCOMING
status: [PAUSED]
includeIncognito: true
includeHostedAccounts: false
includeChildrenAccounts: true
pausedBy: [COLLECTIVE, HOST, PLATFORM]
) @skip(if: $onlyExpectedFunds) {
totalCount
}
DISPUTED: orders(
filter: $filter
status: [DISPUTED]
Expand Down Expand Up @@ -852,12 +862,15 @@ const Contributions = ({ accountSlug, direction, onlyExpectedFunds, includeHoste
/>
<Filterbar {...queryFilter} />

{isIncoming && !onlyExpectedFunds && metadata?.account?.[ContributionsTab.PAUSED].totalCount > 0 && (
<PausedIncomingContributionsMessage
account={metadata.account}
count={metadata.account[ContributionsTab.PAUSED].totalCount}
/>
)}
{isIncoming &&
!onlyExpectedFunds &&
metadata?.account?.PAUSED_RESUMABLE.totalCount > 0 &&
!metadata.account.parent && (
<PausedIncomingContributionsMessage
account={metadata.account}
count={metadata.account[ContributionsTab.PAUSED].totalCount}
/>
)}

{error ? (
<MessageBoxGraphqlError error={error} />
Expand Down
1 change: 0 additions & 1 deletion graphql.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ module.exports = {
'components/edit-collective/sections/PaymentReceipts.js',
'components/edit-collective/sections/Webhooks.js',
'components/tier-page/graphql/queries.js',
'components/tier-page/index.js',
'lib/graphql/v1/fragments.js',
'lib/graphql/v1/mutations.js',
'lib/graphql/v1/queries.js',
Expand Down
97 changes: 0 additions & 97 deletions lib/graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -4559,18 +4559,6 @@ type Mutation {
): UserDetails
editConnectedAccount(connectedAccount: ConnectedAccountInputType!): ConnectedAccountType

"""
Update a single tier
"""
editTier(
"""
The tier to update
"""
tier: TierInputType!
): Tier @deprecated(reason: "2024-07-16: Please use editTiers mutation from GraphQLV2")
editTiers(id: Int!, tiers: [TierInputType]): [Tier]
@deprecated(reason: "2024-07-16: Please use editTiers mutation from GraphQLV2")

"""
Updates all the core contributors (role = ADMIN or MEMBER) for this collective.
"""
Expand Down Expand Up @@ -4774,7 +4762,6 @@ input CollectiveInputType {
image: String
backgroundImage: String
tags: [String]
tiers: [TierInputType]
settings: JSON
data: JSON @deprecated(reason: "2020-10-08: data cannot be edited. This field will be ignored.")

Expand Down Expand Up @@ -4834,90 +4821,6 @@ input LocationInputType {
structured: JSON
}

"""
Input type for TierType
"""
input TierInputType {
id: Int
type: String
name: String
description: String

"""
A long, html-formatted description.
"""
longDescription: String

"""
Whether this tier has a standalone page
"""
useStandalonePage: Boolean

"""
Link to a video (YouTube, Vimeo).
"""
videoUrl: String

"""
amount in the lowest unit of the currency of the host (ie. in cents)
"""
amount: Int

"""
Button text
"""
button: String
currency: String
presets: [Int]
interval: String
maxQuantity: Int
minimumAmount: Int
amountType: String

"""
amount that you are trying to raise with this tier
"""
goal: Int
customFields: [CustomFieldsInputType]

"""
Start of the campaign
"""
startsAt: String

"""
End of the campaign
"""
endsAt: String

"""
Invoice receipt template
"""
invoiceTemplate: String
}

"""
Input for custom fields for order
"""
input CustomFieldsInputType {
type: CustomFieldType
name: String
label: String
required: Boolean
}

"""
Type of custom field
"""
enum CustomFieldType {
number
text
email
date
radio
url
}

"""
Input type for MemberType
"""
Expand Down
Loading

0 comments on commit 97db9de

Please sign in to comment.