From 5060101e83d2b125bc35e0e47f1a3a491f8973e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Prod=27homme?= Date: Fri, 22 Nov 2024 11:55:27 +0100 Subject: [PATCH] feat(cms/client): Add dataset short description SS-143 --- client/src/components/dataset-card/index.tsx | 11 ++++++- client/src/hooks/use-datasets-by-sub-topic.ts | 5 ++- client/src/types/generated/strapi.schemas.ts | 5 +++ .../sync/admin-role.strapi-super-admin.json | 9 ++++-- ...n_content_types##api##dataset.dataset.json | 32 +++++++++++++++---- .../dataset/content-types/dataset/schema.json | 4 +++ .../1.0.0/full_documentation.json | 17 +++++++++- cms/types/generated/contentTypes.d.ts | 4 +++ 8 files changed, 75 insertions(+), 12 deletions(-) diff --git a/client/src/components/dataset-card/index.tsx b/client/src/components/dataset-card/index.tsx index 6f3f78b..f1fd957 100644 --- a/client/src/components/dataset-card/index.tsx +++ b/client/src/components/dataset-card/index.tsx @@ -48,12 +48,20 @@ import { interface DatasetCardProps { id: number; name: string; + shortDescription?: string; defaultLayerId: number | undefined; layers: DatasetLayersDataItem[]; metadata?: MetadataItemComponent; } -const DatasetCard = ({ id, name, defaultLayerId, layers, metadata }: DatasetCardProps) => { +const DatasetCard = ({ + id, + name, + shortDescription, + defaultLayerId, + layers, + metadata, +}: DatasetCardProps) => { const [layersConfiguration, { addLayer, updateLayer, removeLayer }] = useMapLayers(); const [location] = useLocation(); @@ -360,6 +368,7 @@ const DatasetCard = ({ id, name, defaultLayerId, layers, metadata }: DatasetCard /> + {!!shortDescription &&
{shortDescription}
}
{layers.length > 1 && (