Skip to content

Commit

Permalink
refactor(cms): Add full_name attribute and change `temporal_resolut…
Browse files Browse the repository at this point in the history
…ion`'s type
  • Loading branch information
clementprdhomme committed Nov 13, 2024
1 parent 3321bfb commit d5b580b
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 40 deletions.
3 changes: 3 additions & 0 deletions client/src/types/generated/strapi.schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,7 @@ export type LayerDatasetDataAttributesSubTopicDataAttributesCreatedBy = {

export type LayerDatasetDataAttributesMetadata = {
description?: string;
full_name?: string;
id?: number;
main_applications?: string;
source?: string;
Expand Down Expand Up @@ -1511,6 +1512,7 @@ export interface LayerRequest {

export interface MetadataItemComponent {
description?: string;
full_name?: string;
id?: number;
main_applications?: string;
source?: string;
Expand Down Expand Up @@ -1909,6 +1911,7 @@ export type DatasetLayersDataItemAttributesDatasetDataAttributesSubTopicDataAttr

export type DatasetLayersDataItemAttributesDatasetDataAttributesMetadata = {
description?: string;
full_name?: string;
id?: number;
main_applications?: string;
source?: string;
Expand Down
15 changes: 9 additions & 6 deletions cms/config/sync/admin-role.strapi-super-admin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": []
Expand All @@ -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": []
Expand All @@ -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": []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"size": {
"edit": {
"label": "size",
"description": "Only for legends of type “scale”",
"description": "",
"placeholder": "",
"visible": true,
"editable": true
Expand All @@ -78,7 +78,7 @@
"group": {
"edit": {
"label": "group",
"description": "Only for legends of type “scale”",
"description": "",
"placeholder": "",
"visible": true,
"editable": true
Expand Down Expand Up @@ -112,13 +112,13 @@
{
"name": "value",
"size": 6
}
],
[
},
{
"name": "size",
"size": 4
},
}
],
[
{
"name": "group",
"size": 6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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": {
Expand All @@ -141,6 +155,10 @@
],
"edit": [
[
{
"name": "full_name",
"size": 6
},
{
"name": "source",
"size": 6
Expand Down
10 changes: 7 additions & 3 deletions cms/src/components/metadata/item.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
"main_applications": {
"type": "richtext"
},
"temporal_resolution": {
"type": "string"
},
"temporal_coverage": {
"type": "richtext"
},
Expand All @@ -30,6 +27,13 @@
},
"units": {
"type": "string"
},
"full_name": {
"type": "string",
"required": true
},
"temporal_resolution": {
"type": "richtext"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -733,9 +733,6 @@
"main_applications": {
"type": "string"
},
"temporal_resolution": {
"type": "string"
},
"temporal_coverage": {
"type": "string"
},
Expand All @@ -744,6 +741,12 @@
},
"units": {
"type": "string"
},
"full_name": {
"type": "string"
},
"temporal_resolution": {
"type": "string"
}
}
},
Expand Down Expand Up @@ -985,9 +988,6 @@
"main_applications": {
"type": "string"
},
"temporal_resolution": {
"type": "string"
},
"temporal_coverage": {
"type": "string"
},
Expand All @@ -996,6 +996,12 @@
},
"units": {
"type": "string"
},
"full_name": {
"type": "string"
},
"temporal_resolution": {
"type": "string"
}
}
},
Expand Down Expand Up @@ -1691,9 +1697,6 @@
"main_applications": {
"type": "string"
},
"temporal_resolution": {
"type": "string"
},
"temporal_coverage": {
"type": "string"
},
Expand All @@ -1702,6 +1705,12 @@
},
"units": {
"type": "string"
},
"full_name": {
"type": "string"
},
"temporal_resolution": {
"type": "string"
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion cms/types/generated/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
}

Expand Down

0 comments on commit d5b580b

Please sign in to comment.