diff --git a/coral/src/app/features/components/ClaimBanner.test.tsx b/coral/src/app/features/components/ClaimBanner.test.tsx index ae42474bae..ce18353610 100644 --- a/coral/src/app/features/components/ClaimBanner.test.tsx +++ b/coral/src/app/features/components/ClaimBanner.test.tsx @@ -12,7 +12,7 @@ const testProps = { claimEntity: mockClaimEntity, isError: false, hasOpenClaimRequest: false, - hasOpenRequest: false, + hasOpenRequestOnAnyEnv: false, entityOwner: "teamname", }; @@ -70,7 +70,7 @@ describe("ClaimBanner", () => { ); }); @@ -92,7 +92,7 @@ describe("ClaimBanner", () => { ); }); @@ -115,7 +115,7 @@ describe("ClaimBanner", () => { {...testProps} entityType={"topic"} hasOpenClaimRequest={true} - hasOpenRequest={true} + hasOpenRequestOnAnyEnv={true} />, { memoryRouter: true, @@ -151,7 +151,7 @@ describe("ClaimBanner", () => { {...testProps} entityType={"connector"} hasOpenClaimRequest={true} - hasOpenRequest={true} + hasOpenRequestOnAnyEnv={true} />, { memoryRouter: true, diff --git a/coral/src/app/features/components/ClaimBanner.tsx b/coral/src/app/features/components/ClaimBanner.tsx index c976a50c33..a2f665ef56 100644 --- a/coral/src/app/features/components/ClaimBanner.tsx +++ b/coral/src/app/features/components/ClaimBanner.tsx @@ -5,7 +5,7 @@ import illustration from "src/app/images/topic-details-banner-Illustration.svg"; interface ClaimBannerProps { entityType: "topic" | "connector"; entityName: string; - hasOpenRequest: boolean; + hasOpenRequestOnAnyEnv: boolean; hasOpenClaimRequest: boolean; claimEntity: () => void; isError: boolean; @@ -17,14 +17,14 @@ const ClaimBanner = ({ entityType, entityName, hasOpenClaimRequest, - hasOpenRequest, + hasOpenRequestOnAnyEnv, claimEntity, isError, errorMessage, entityOwner, }: ClaimBannerProps) => { - // if there is an open claim request, hasOpenRequest is true, too - if (hasOpenRequest && !hasOpenClaimRequest) { + // if there is an open claim request, hasOpenRequestOnAnyEnv is true, too + if (hasOpenRequestOnAnyEnv && !hasOpenClaimRequest) { // We do not render an InternalLinkButton to the Requests page for this state... // .. because a user cannot see the requests opened by members of other teams return ( diff --git a/coral/src/app/features/connectors/details/ConnectorDetails.tsx b/coral/src/app/features/connectors/details/ConnectorDetails.tsx index 7fc3abfcff..69ccdaadba 100644 --- a/coral/src/app/features/connectors/details/ConnectorDetails.tsx +++ b/coral/src/app/features/connectors/details/ConnectorDetails.tsx @@ -187,7 +187,9 @@ function ConnectorDetails(props: ConnectorOverviewProps) { connectorData?.connectorInfo.hasOpenClaimRequest } entityOwner={connectorData.connectorInfo.teamName} - hasOpenRequest={connectorData?.connectorInfo.hasOpenRequest} + hasOpenRequestOnAnyEnv={ + connectorData?.connectorInfo.hasOpenRequestOnAnyEnv + } claimEntity={() => setShowClaimModal(true)} isError={isErrorCreateClaimConnectorRequest} errorMessage={claimErrorMessage} diff --git a/coral/src/app/features/topics/details/TopicDetails.tsx b/coral/src/app/features/topics/details/TopicDetails.tsx index b1a4688236..3b23011386 100644 --- a/coral/src/app/features/topics/details/TopicDetails.tsx +++ b/coral/src/app/features/topics/details/TopicDetails.tsx @@ -178,7 +178,9 @@ function TopicDetails(props: TopicOverviewProps) { entityName={topicName} hasOpenClaimRequest={topicData?.topicInfo.hasOpenClaimRequest} entityOwner={topicData.topicInfo.teamname} - hasOpenRequest={topicData?.topicInfo.hasOpenRequest} + hasOpenRequestOnAnyEnv={ + topicData?.topicInfo.hasOpenRequestOnAnyEnv + } claimEntity={() => setShowClaimModal(true)} isError={createClaimTopicRequestIsError} errorMessage={claimErrorMessage}