From e299e02264df4976eaac6ab472634a2d46728b24 Mon Sep 17 00:00:00 2001 From: Clement Brousseau Date: Tue, 17 Dec 2024 15:39:54 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20compl=C3=A9ter=20le=20fil=20d'ariane=20?= =?UTF-8?q?de=20la=20route=20de=20reprise=20d'int=C3=A9gration=20#584?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DatasetListTab/UnfinishedUploadList.tsx | 7 ++++++- .../StoredDataDetails/DeliveryDetails.tsx | 8 ++++---- assets/i18n/Breadcrumb.tsx | 3 +++ assets/modules/entrepot/breadcrumbs.ts | 15 +++++++++++++++ assets/router/router.ts | 1 + 5 files changed, 29 insertions(+), 5 deletions(-) diff --git a/assets/entrepot/pages/datasheet/DatasheetView/DatasetListTab/UnfinishedUploadList.tsx b/assets/entrepot/pages/datasheet/DatasheetView/DatasetListTab/UnfinishedUploadList.tsx index ea2a8b7a..3f305545 100644 --- a/assets/entrepot/pages/datasheet/DatasheetView/DatasetListTab/UnfinishedUploadList.tsx +++ b/assets/entrepot/pages/datasheet/DatasheetView/DatasetListTab/UnfinishedUploadList.tsx @@ -28,7 +28,12 @@ const UnfinishedUploadList: FC = ({ datastoreId, uplo
-
- -
- {reportQuery.isError && } -
{reportQuery?.data?.input_upload?.name && (

{reportQuery?.data?.input_upload?.name}

)} +
+ {reportQuery.isError && } +
+ {reportQuery.data && (
diff --git a/assets/i18n/Breadcrumb.tsx b/assets/i18n/Breadcrumb.tsx index e9f133a4..0c41b2a0 100644 --- a/assets/i18n/Breadcrumb.tsx +++ b/assets/i18n/Breadcrumb.tsx @@ -32,6 +32,7 @@ export const { i18n } = declareComponentKeys< | "upload" | "datastore_datasheet_upload_integration" | "datastore_stored_data_details" + | "datastore_delivery_details" | "datastore_wfs_service_new" | "datastore_wfs_service_edit" | "datastore_wms_vector_service_new" @@ -74,6 +75,7 @@ export const BreadcrumbFrTranslations: Translations<"fr">["Breadcrumb"] = { upload: "Téléversement", datastore_datasheet_upload_integration: "Intégration de données", datastore_stored_data_details: "Détails d'une donnée stockée", + datastore_delivery_details: "Détails d'une livraison", datastore_wfs_service_new: "Création d'un service WFS", datastore_wfs_service_edit: "Modification d'un service WFS", datastore_wms_vector_service_new: "Création d'un service WMS", @@ -116,6 +118,7 @@ export const BreadcrumbEnTranslations: Translations<"en">["Breadcrumb"] = { upload: "Upload", datastore_datasheet_upload_integration: "Data integration", datastore_stored_data_details: "Details of stored data", + datastore_delivery_details: "Details of delivery", datastore_wfs_service_new: "Create a WFS service", datastore_wfs_service_edit: "Modify WFS service", datastore_wms_vector_service_new: "Create a WMS service", diff --git a/assets/modules/entrepot/breadcrumbs.ts b/assets/modules/entrepot/breadcrumbs.ts index acd87397..4ea6e79d 100644 --- a/assets/modules/entrepot/breadcrumbs.ts +++ b/assets/modules/entrepot/breadcrumbs.ts @@ -161,6 +161,21 @@ const getBreadcrumb = (route: Route, datastore?: Datastore): Brea }); } return { ...defaultProps, currentPageLabel: t("datastore_stored_data_details") }; + case "datastore_delivery_details": + defaultProps.segments = [ + ...defaultProps.segments, + ...[ + { label: t("dashboard_pro"), linkProps: routes.dashboard_pro().link }, + { label: datastore?.name, linkProps: routes.datasheet_list({ datastoreId: route.params.datastoreId }).link }, + ], + ]; + if ("datasheetName" in route.params && route.params.datasheetName) { + defaultProps.segments.push({ + label: route.params.datasheetName, + linkProps: routes.datastore_datasheet_view({ datastoreId: route.params.datastoreId, datasheetName: route.params.datasheetName }).link, + }); + } + return { ...defaultProps, currentPageLabel: t("datastore_delivery_details") }; case "datastore_wfs_service_new": case "datastore_wfs_service_edit": diff --git a/assets/router/router.ts b/assets/router/router.ts index 03851e33..e897c482 100644 --- a/assets/router/router.ts +++ b/assets/router/router.ts @@ -145,6 +145,7 @@ const routeDefs = { { datastoreId: param.path.string, uploadDataId: param.path.string, + datasheetName: param.query.optional.string, }, (p) => `${appRoot}/entrepot/${p.datastoreId}/donnees/${p.uploadDataId}/rapport` ),