diff --git a/packages/reva-admin-react/src/app/(aap)/agencies-settings-v3/organisms/[organismId]/remote/page.tsx b/packages/reva-admin-react/src/app/(aap)/agencies-settings-v3/organisms/[organismId]/remote/page.tsx index 4267c74df..8fcda830a 100644 --- a/packages/reva-admin-react/src/app/(aap)/agencies-settings-v3/organisms/[organismId]/remote/page.tsx +++ b/packages/reva-admin-react/src/app/(aap)/agencies-settings-v3/organisms/[organismId]/remote/page.tsx @@ -1,10 +1,41 @@ "use client"; import { EnhancedSectionCard } from "@/components/card/enhanced-section-card/EnhancedSectionCard"; +import { useGraphQlClient } from "@/components/graphql/graphql-client/GraphqlClient"; +import { graphql } from "@/graphql/generated"; import { Breadcrumb } from "@codegouvfr/react-dsfr/Breadcrumb"; +import { useQuery } from "@tanstack/react-query"; +import Link from "next/link"; import { useParams } from "next/navigation"; +import { getRemoteZoneLabel } from "../../../_components/getRemoteZoneLabel"; + +const getOrganismQuery = graphql(` + query getOrganismForOrganismRemotePage($organismId: ID!) { + organism_getOrganism(id: $organismId) { + id + informationsCommerciales { + id + nom + telephone + siteInternet + emailContact + } + remoteZones + } + } +`); export default function RemotePage() { const { organismId } = useParams<{ organismId: string }>(); + const { graphqlClient } = useGraphQlClient(); + + const { data: getOrganismResponse, status: getOrganismStatus } = useQuery({ + queryKey: ["organisms", "agencies-settings-layout-page-v2"], + queryFn: () => graphqlClient.request(getOrganismQuery, { organismId }), + enabled: !!organismId, + }); + + const organism = getOrganismResponse?.organism_getOrganism; + return (