Skip to content

Commit

Permalink
Merge pull request #1280 from cultuurnet/feature/PPF-530
Browse files Browse the repository at this point in the history
  • Loading branch information
Anahkiasen authored Jul 22, 2024
2 parents 23a662b + 865310b commit 741a5e3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ export const IntegrationSettings = ({
isKeepChangesDialogVisible,
onConfirmLeaveTab,
onCancelLeaveTab,
partnerStatus,
}: Props) => {
const { t } = useTranslation();

const [status, setStatus] = useState<"idle" | "success" | "error">("idle");

const basicInfoForm = useBasicInfoForm({
Expand Down Expand Up @@ -230,6 +230,11 @@ export const IntegrationSettings = ({
}
};

const hasUrlSettings =
type === IntegrationType.EntryApi &&
keyVisibility !== KeyVisibility.v1 &&
partnerStatus === "First party";

return (
<>
{status !== "idle" && (
Expand All @@ -254,8 +259,7 @@ export const IntegrationSettings = ({
errors={basicInfoForm.errors}
/>

{type === IntegrationType.EntryApi &&
keyVisibility !== KeyVisibility.v1 &&
{hasUrlSettings &&
Object.values(IntegrationUrlType).map((type) => (
<UrlList
key={type}
Expand Down
1 change: 1 addition & 0 deletions resources/ts/types/Integration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export type Integration = {
subscriptionId: string;
coupon: Coupon | null;
status: IntegrationStatus;
partnerStatus: "First party" | "Third party";
contacts: Contact[];
organization: Organization | null;
subscription: Subscription;
Expand Down

0 comments on commit 741a5e3

Please sign in to comment.