From d5b580b54e8f264c893f0c129c75524d653256f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Prod=27homme?= Date: Wed, 13 Nov 2024 16:25:35 +0100 Subject: [PATCH] refactor(cms): Add `full_name` attribute and change `temporal_resolution`'s type --- client/src/types/generated/strapi.schemas.ts | 3 ++ .../sync/admin-role.strapi-super-admin.json | 15 +++--- ...onfiguration_components##legend.items.json | 12 ++--- ...nfiguration_components##metadata.item.json | 46 +++++++++++++------ cms/src/components/metadata/item.json | 10 ++-- .../1.0.0/full_documentation.json | 29 ++++++++---- cms/types/generated/components.d.ts | 3 +- 7 files changed, 78 insertions(+), 40 deletions(-) diff --git a/client/src/types/generated/strapi.schemas.ts b/client/src/types/generated/strapi.schemas.ts index da8c7e2..e920ffd 100644 --- a/client/src/types/generated/strapi.schemas.ts +++ b/client/src/types/generated/strapi.schemas.ts @@ -1180,6 +1180,7 @@ export type LayerDatasetDataAttributesSubTopicDataAttributesCreatedBy = { export type LayerDatasetDataAttributesMetadata = { description?: string; + full_name?: string; id?: number; main_applications?: string; source?: string; @@ -1511,6 +1512,7 @@ export interface LayerRequest { export interface MetadataItemComponent { description?: string; + full_name?: string; id?: number; main_applications?: string; source?: string; @@ -1909,6 +1911,7 @@ export type DatasetLayersDataItemAttributesDatasetDataAttributesSubTopicDataAttr export type DatasetLayersDataItemAttributesDatasetDataAttributesMetadata = { description?: string; + full_name?: string; id?: number; main_applications?: string; source?: string; diff --git a/cms/config/sync/admin-role.strapi-super-admin.json b/cms/config/sync/admin-role.strapi-super-admin.json index 23b5607..aea45eb 100644 --- a/cms/config/sync/admin-role.strapi-super-admin.json +++ b/cms/config/sync/admin-role.strapi-super-admin.json @@ -18,10 +18,11 @@ "metadata.website", "metadata.description", "metadata.main_applications", - "metadata.temporal_resolution", "metadata.temporal_coverage", "metadata.spatial_resolution", - "metadata.units" + "metadata.units", + "metadata.full_name", + "metadata.temporal_resolution" ] }, "conditions": [] @@ -48,10 +49,11 @@ "metadata.website", "metadata.description", "metadata.main_applications", - "metadata.temporal_resolution", "metadata.temporal_coverage", "metadata.spatial_resolution", - "metadata.units" + "metadata.units", + "metadata.full_name", + "metadata.temporal_resolution" ] }, "conditions": [] @@ -71,10 +73,11 @@ "metadata.website", "metadata.description", "metadata.main_applications", - "metadata.temporal_resolution", "metadata.temporal_coverage", "metadata.spatial_resolution", - "metadata.units" + "metadata.units", + "metadata.full_name", + "metadata.temporal_resolution" ] }, "conditions": [] diff --git a/cms/config/sync/core-store.plugin_content_manager_configuration_components##legend.items.json b/cms/config/sync/core-store.plugin_content_manager_configuration_components##legend.items.json index 00f89af..8796f9b 100644 --- a/cms/config/sync/core-store.plugin_content_manager_configuration_components##legend.items.json +++ b/cms/config/sync/core-store.plugin_content_manager_configuration_components##legend.items.json @@ -64,7 +64,7 @@ "size": { "edit": { "label": "size", - "description": "Only for legends of type “scale”", + "description": "", "placeholder": "", "visible": true, "editable": true @@ -78,7 +78,7 @@ "group": { "edit": { "label": "group", - "description": "Only for legends of type “scale”", + "description": "", "placeholder": "", "visible": true, "editable": true @@ -112,13 +112,13 @@ { "name": "value", "size": 6 - } - ], - [ + }, { "name": "size", "size": 4 - }, + } + ], + [ { "name": "group", "size": 6 diff --git a/cms/config/sync/core-store.plugin_content_manager_configuration_components##metadata.item.json b/cms/config/sync/core-store.plugin_content_manager_configuration_components##metadata.item.json index 952ecb5..5dce4c6 100644 --- a/cms/config/sync/core-store.plugin_content_manager_configuration_components##metadata.item.json +++ b/cms/config/sync/core-store.plugin_content_manager_configuration_components##metadata.item.json @@ -75,20 +75,6 @@ "sortable": false } }, - "temporal_resolution": { - "edit": { - "label": "temporal_resolution", - "description": "", - "placeholder": "", - "visible": true, - "editable": true - }, - "list": { - "label": "temporal_resolution", - "searchable": true, - "sortable": true - } - }, "temporal_coverage": { "edit": { "label": "temporal_coverage", @@ -130,6 +116,34 @@ "searchable": true, "sortable": true } + }, + "full_name": { + "edit": { + "label": "full_name", + "description": "", + "placeholder": "", + "visible": true, + "editable": true + }, + "list": { + "label": "full_name", + "searchable": true, + "sortable": true + } + }, + "temporal_resolution": { + "edit": { + "label": "temporal_resolution", + "description": "", + "placeholder": "", + "visible": true, + "editable": true + }, + "list": { + "label": "temporal_resolution", + "searchable": false, + "sortable": false + } } }, "layouts": { @@ -141,6 +155,10 @@ ], "edit": [ [ + { + "name": "full_name", + "size": 6 + }, { "name": "source", "size": 6 diff --git a/cms/src/components/metadata/item.json b/cms/src/components/metadata/item.json index 5c507db..55008a5 100644 --- a/cms/src/components/metadata/item.json +++ b/cms/src/components/metadata/item.json @@ -19,9 +19,6 @@ "main_applications": { "type": "richtext" }, - "temporal_resolution": { - "type": "string" - }, "temporal_coverage": { "type": "richtext" }, @@ -30,6 +27,13 @@ }, "units": { "type": "string" + }, + "full_name": { + "type": "string", + "required": true + }, + "temporal_resolution": { + "type": "richtext" } } } diff --git a/cms/src/extensions/documentation/documentation/1.0.0/full_documentation.json b/cms/src/extensions/documentation/documentation/1.0.0/full_documentation.json index 74611dd..27ddf2e 100644 --- a/cms/src/extensions/documentation/documentation/1.0.0/full_documentation.json +++ b/cms/src/extensions/documentation/documentation/1.0.0/full_documentation.json @@ -14,7 +14,7 @@ "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "x-generation-date": "2024-11-13T14:44:54.472Z" + "x-generation-date": "2024-11-13T15:23:46.976Z" }, "x-strapi-config": { "path": "/documentation", @@ -733,9 +733,6 @@ "main_applications": { "type": "string" }, - "temporal_resolution": { - "type": "string" - }, "temporal_coverage": { "type": "string" }, @@ -744,6 +741,12 @@ }, "units": { "type": "string" + }, + "full_name": { + "type": "string" + }, + "temporal_resolution": { + "type": "string" } } }, @@ -985,9 +988,6 @@ "main_applications": { "type": "string" }, - "temporal_resolution": { - "type": "string" - }, "temporal_coverage": { "type": "string" }, @@ -996,6 +996,12 @@ }, "units": { "type": "string" + }, + "full_name": { + "type": "string" + }, + "temporal_resolution": { + "type": "string" } } }, @@ -1691,9 +1697,6 @@ "main_applications": { "type": "string" }, - "temporal_resolution": { - "type": "string" - }, "temporal_coverage": { "type": "string" }, @@ -1702,6 +1705,12 @@ }, "units": { "type": "string" + }, + "full_name": { + "type": "string" + }, + "temporal_resolution": { + "type": "string" } } }, diff --git a/cms/types/generated/components.d.ts b/cms/types/generated/components.d.ts index b174892..ff7c4e4 100644 --- a/cms/types/generated/components.d.ts +++ b/cms/types/generated/components.d.ts @@ -11,10 +11,11 @@ export interface MetadataItem extends Schema.Component { website: Attribute.String; description: Attribute.Text; main_applications: Attribute.RichText; - temporal_resolution: Attribute.String; temporal_coverage: Attribute.RichText; spatial_resolution: Attribute.String; units: Attribute.String; + full_name: Attribute.String & Attribute.Required; + temporal_resolution: Attribute.RichText; }; }