From 99372cf3ca27e5215a4faf0b9a8989863de3171a Mon Sep 17 00:00:00 2001 From: Agnieszka Figiel Date: Fri, 27 Oct 2023 11:57:44 +0200 Subject: [PATCH] Added location geographic bounding box as a JSON field --- .../sync/admin-role.strapi-super-admin.json | 9 +++-- ...content_types##api##location.location.json | 36 ++++++++++++++----- .../content-types/location/schema.json | 3 ++ cms/types/generated/contentTypes.d.ts | 1 + 4 files changed, 38 insertions(+), 11 deletions(-) diff --git a/cms/config/sync/admin-role.strapi-super-admin.json b/cms/config/sync/admin-role.strapi-super-admin.json index 47a7a31e..083dd480 100644 --- a/cms/config/sync/admin-role.strapi-super-admin.json +++ b/cms/config/sync/admin-role.strapi-super-admin.json @@ -330,7 +330,8 @@ "members", "fishing_protection_level_stats", "mpaa_protection_level_stats", - "protection_coverage_stats" + "protection_coverage_stats", + "bounds" ] }, "conditions": [] @@ -356,7 +357,8 @@ "members", "fishing_protection_level_stats", "mpaa_protection_level_stats", - "protection_coverage_stats" + "protection_coverage_stats", + "bounds" ] }, "conditions": [] @@ -375,7 +377,8 @@ "members", "fishing_protection_level_stats", "mpaa_protection_level_stats", - "protection_coverage_stats" + "protection_coverage_stats", + "bounds" ] }, "conditions": [] diff --git a/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##location.location.json b/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##location.location.json index d52e3351..2a2b3e28 100644 --- a/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##location.location.json +++ b/cms/config/sync/core-store.plugin_content_manager_configuration_content_types##api##location.location.json @@ -151,6 +151,20 @@ "sortable": false } }, + "bounds": { + "edit": { + "label": "bounds", + "description": "", + "placeholder": "", + "visible": true, + "editable": true + }, + "list": { + "label": "bounds", + "searchable": false, + "sortable": false + } + }, "createdAt": { "edit": { "label": "createdAt", @@ -211,6 +225,14 @@ } }, "layouts": { + "list": [ + "id", + "code", + "name", + "type", + "totalMarineArea", + "groups" + ], "edit": [ [ { @@ -257,15 +279,13 @@ "name": "protection_coverage_stats", "size": 6 } + ], + [ + { + "name": "bounds", + "size": 12 + } ] - ], - "list": [ - "id", - "code", - "name", - "type", - "totalMarineArea", - "groups" ] } }, diff --git a/cms/src/api/location/content-types/location/schema.json b/cms/src/api/location/content-types/location/schema.json index 200d533e..6f99f302 100644 --- a/cms/src/api/location/content-types/location/schema.json +++ b/cms/src/api/location/content-types/location/schema.json @@ -61,6 +61,9 @@ "relation": "oneToMany", "target": "api::protection-coverage-stat.protection-coverage-stat", "mappedBy": "location" + }, + "bounds": { + "type": "json" } } } diff --git a/cms/types/generated/contentTypes.d.ts b/cms/types/generated/contentTypes.d.ts index a9e2971e..b0d86f86 100644 --- a/cms/types/generated/contentTypes.d.ts +++ b/cms/types/generated/contentTypes.d.ts @@ -948,6 +948,7 @@ export interface ApiLocationLocation extends Schema.CollectionType { 'oneToMany', 'api::protection-coverage-stat.protection-coverage-stat' >; + bounds: Attribute.JSON; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; createdBy: Attribute.Relation<