Skip to content

Commit

Permalink
feat: ajout bouton pour accéder au form générer pyramide raster #470
Browse files Browse the repository at this point in the history
  • Loading branch information
ocruze committed Oct 22, 2024
1 parent 1d5a672 commit da40e6f
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion assets/entrepot/pages/service/view/ServiceView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const ServiceView: FC<ServiceViewProps> = ({ datastoreId, offeringId, datasheetN

const serviceQuery = useQuery<Service, CartesApiException>({
queryKey: RQKeys.datastore_offering(datastoreId, offeringId),
queryFn: () => api.service.getService(datastoreId, offeringId),
queryFn: ({ signal }) => api.service.getService(datastoreId, offeringId, { signal }),
staleTime: 60000,
});

Expand Down Expand Up @@ -135,6 +135,22 @@ const ServiceView: FC<ServiceViewProps> = ({ datastoreId, offeringId, datasheetN
</div>
)}

{serviceQuery.data?.type === OfferingTypeEnum.WMSVECTOR && serviceQuery.data?.status === OfferingStatusEnum.PUBLISHED && (
<div className={fr.cx("fr-grid-row", "fr-grid-row--middle", "fr-mb-4w")}>
<Button
linkProps={
routes.datastore_pyramid_raster_generate({
datastoreId,
offeringId,
datasheetName,
}).link
}
>
Créer un service raster WMS/WMTS
</Button>
</div>
)}

<div className={fr.cx("fr-grid-row", "fr-mb-4w")}>
<div className={fr.cx("fr-col-12", "fr-col-md-8")}>{initialValues && <RMap initial={initialValues} currentStyle={currentStyle} />}</div>
<div className={fr.cx("fr-col-12", "fr-col-md-4", "fr-p-1w", "fr-px-2w")}>
Expand Down

0 comments on commit da40e6f

Please sign in to comment.