From 1f3769ff910992bbeb5412a32e6cfcca79f1ae77 Mon Sep 17 00:00:00 2001 From: Will Lytle Date: Mon, 3 Feb 2025 09:34:33 -0700 Subject: [PATCH] Tech 2492: Fix conservation builder typo and add to README's (#330) (#331) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add support for basic Auth * test commit * fix jitter on cb directions window scroll * update readmes * make CB header reszing based on availalbe space and not on scrolling * revert admin-role super admin config changes * attmepting to revert changes to config-sync --------- Co-authored-by: Simao Rodrigues Co-authored-by: Andrés González Co-authored-by: Simão Rodrigues Co-authored-by: Clément Prod'homme Co-authored-by: Will --- README.md | 38 +- cms/README.md | 64 +- .../sync/admin-role.strapi-super-admin.json | 964 +++++++++--------- frontend/README.md | 13 +- .../main-panel/panels/modelling/index.tsx | 52 +- frontend/translations/en.json | 2 +- 6 files changed, 612 insertions(+), 521 deletions(-) diff --git a/README.md b/README.md index f8968af5..280fcc63 100644 --- a/README.md +++ b/README.md @@ -16,17 +16,39 @@ External services: - *Mapbox*: used for serving layers for the map -- *HubSpot*: used for the contact form, see [configuration instructions](hubspot.md) +- *HubSpot*: used for the contact form, see [configuration instructions][hubspot] This repository contains all the code and documentation necessary to set up and deploy the project. It is organised in 5 main subdirectories, with accompanying documentation inside each. -| Subdirectory name | Description | Documentation | -|-------------------|-------------------------------------------------------------|----------------------------------------------------------------------------------------------------------| -| frontend | The Next.js client application | [frontend/README.md](frontend/README.md) | -| cms | The Strapi CMS / API | [cms/README.md](cms/README.md) | -| cloud_functions/analysis | The on-the-fly analysis cloud function | [cloud_functions/analysis/README.md](cloud_functions/analysis/README.md) | -| data | The Python data importers and uploaders | [data/README.md](data/README.md) | -| infrastructure | The Terraform project & GH Actions workflow (provisioning & deployment to Google Cloud Platform) | [infrastructure/README.md](infrastructure/README.md) | +| Subdirectory name | Description | Documentation | +|--------------------------|--------------------------------------------------------------------------------------------------|---------------------------------------------| +| frontend | The Next.js client application | [frontend][frontend] | +| cms | The Strapi CMS / API | [cms] | +| cloud_functions/analysis | The on-the-fly analysis cloud function | [cloud functions][cloud_functions_analysis] | +| data | The Python data importers and uploaders | [data] | +| infrastructure | The Terraform project & GH Actions workflow (provisioning & deployment to Google Cloud Platform) | [infrastructure] | + ### Deployment and Infrastructure The project is deployed on the Google Cloud Platform (GCP) using GitHub Actions for continuous integration and deployment. The infrastructure is provisioned and managed using Terraform scripts, ensuring consistent and reproducible deployments. + +### Development +In General each of subdirectories listed above act as standalone services and can be developed in isolation. For detailed instructions on development in those services please see the linked README's for the given service. There are, however, a few exceptions to this which are outlined below. + +#### Frontend Typescript Types +Type definitions and internal data fetching hooks are automatically generated via integrations with [Orval][orval] and [Strapi][strapi]. Please see the [frontend documentation][frontend_types] for how to manage this dependency when developing locally. + +#### Development Hooks +This repo uses `husky` to manage development flow hooks. There are hooks for: `pre-commit`, `post-checkout`, and `post-merge`. These hooks ensure the code is linted and formatted, as well as ensuring that generated types are up to date and the Strapi CMS config models are all up to date. For these checks to pass you must have an accurate `.env` file in the CMS directory and have the config file synced from the Strapi back office. Please refer to the [developing strapi docs][strapi_config] and the [strapi config sync docs][strapi_config_sync] to set this up prior to branching and committing. + +[cloud_functions_analysis]: cloud_functions/analysis/README.md +[cms]: cms/README.md +[data]: data/README.md +[frontend]: frontend/README.md +[frontend_types]: frontend/README.md#automatic-type-building +[hubspot]: hubspot.md +[infrastructure]: infrastructure/README.md +[orval]: https://orval.dev/overview +[strapi]: https://strapi.io/ +[strapi_config_sync]: cms/README.md#config-sync-plugin-and-configuration-version-control +[strapi_config]: cms/README.md#local-config-setup \ No newline at end of file diff --git a/cms/README.md b/cms/README.md index ef51ba76..925f630a 100644 --- a/cms/README.md +++ b/cms/README.md @@ -1,18 +1,33 @@ # CMS / API -This directory contains a [Strapi](https://strapi.io/) headless CMS, which provides a backoffice and an API for . +This directory contains a [Strapi][strapi] headless CMS, which provides a backoffice and an API for the PostrgreSQL database backing the 30x30 tracker. -Strapi comes with a full featured [Command Line Interface](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html) (CLI) which lets you scaffold and manage your project in seconds. +Strapi comes with a full featured [Command Line Interface][strapi_cli] (CLI) which lets you scaffold and manage your project in seconds. ## Config -The CMS needs to be configured with server and PostgreSQL database instance connection details. Please check the `.env.example` file for required environment variables. Those are set by Terraform in GH Secrets, and then passed into the docker images during deployment by GH Actions. Please refer to [infrastructure documentation](../infrastructure/README.md) for details. +The CMS needs to be configured with server and PostgreSQL database instance connection details. Please check the `.env.example` file for required environment variables. Those are set by Terraform in GH Secrets, and then passed into the docker images during deployment by GH Actions. Please refer to [infrastructure documentation][infrastructure] for details. + +### Local Config Setup +In order to make changes to the database schema or to add new data to exiting tables, you need to make the desired changes in the [strapi backoffice][backoffice]. The following steps are also needed for initial development to ensure database configs are in sync with prod, even if no changes are being made to the database. To set this up: +- Create a new Postgres DB on your local machine +- Start your local postgres server +- Install the postgis extension on your new table +- Update the `.env` file to contain the credentials for the local database +- [Build] and [Start the local server][start] + - This will perform the necessary migrations to make your local database schema match the production DB schema. It does not, however, populate the DB with any data +- Navigate to the [local backoffice][local_backoffice] +- create your personal credentials to log in with + - There is no local password recovery. If you need to reset local auth, you'll need to start fresh with a new local database +- From the left nav drawer navigate `Settings -> Config Sync -> Interface` +- If there are difference between the DB and the [sync directory][sync] they will be highlighted here. Select Import to sync your DB with the [sync directory][sync] + - This will synchronize your local DB configs with the production configs ## Run locally ### `develop` -Start your Strapi application with autoReload enabled. [Learn more](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html#strapi-develop) +Start your Strapi application with autoReload enabled. [Learn more][strapi_cli_develop] ``` npm run dev @@ -22,7 +37,7 @@ yarn dev ### `start` -Start your Strapi application with autoReload disabled. [Learn more](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html#strapi-start) +Start your Strapi application with autoReload disabled. [Learn more][strapi_cli_develop] ``` npm run start @@ -32,7 +47,7 @@ yarn start ### `build` -Build your admin panel. [Learn more](https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html#strapi-build) +Build your admin panel. [Learn more][strapi_cli_build] ``` npm run build @@ -49,7 +64,7 @@ Open the app at http://localhost:1337 ## Deploy -Deployment to GCP handled by GH Actions. Please refer to [infrastructure documentation](../infrastructure/README.md). +Deployment to GCP handled by GH Actions. Please refer to [infrastructure documentation][infrastructure]. ## API documentation @@ -94,9 +109,13 @@ Tooltips and dictionary values for the dashboard: - mpaa-protection-level - protection-status +### Updating models via the backoffce + +Changes to the database need to be made via the Strapi backoffice locally. To do this, follow the [local config setup instructions][local-config-setup]. Then make your changes in the [local backoffice][local_backoffice]. This will update the corresponding files in the this directory. Merging these changes to the `develop` brach migrate the changes to the staging database and similarly for merges to `main` and the production database + ### Models updated by scripts -These models are updated by an import script, which utilises the Strapi import / export API. Please refer to [data documentation](../data/README.md). +These models are updated by an import script, which utilises the Strapi import / export API. Please refer to [data documentation][data]. - fishing-protection-level-stat - habitat-stat @@ -108,14 +127,31 @@ These models are updated by an import script, which utilises the Strapi import / ## config-sync plugin and configuration version control This Strapi is configured to use the [config-sync plugin](https://market.strapi.io/plugins/strapi-plugin-config-sync), which allows to version control config data and migrate it between environments. -Examples of configuration under config-sync are user and admin role permissions, API permissions and settings of the admin panel. The consequence of this is that if any settings are changed directly in the staging / production admin panel, but not synced in the repository, they will be overwitten on subsequent deployments. +Examples of configuration under config-sync are user and admin role permissions, API permissions and settings of the admin panel. The consequence of this is that if any settings are changed directly in the staging / production admin panel, but not synced in the repository, they will be overwritten on subsequent deployments. ## Strapi resources -- [Resource center](https://strapi.io/resource-center) - Strapi resource center. -- [Strapi documentation](https://docs.strapi.io) - Official Strapi documentation. -- [Strapi tutorials](https://strapi.io/tutorials) - List of tutorials made by the core team and the community. -- [Strapi blog](https://docs.strapi.io) - Official Strapi blog containing articles made by the Strapi team and the community. -- [Changelog](https://strapi.io/changelog) - Find out about the Strapi product updates, new features and general improvements. +- [Resource center][strapi_rc] - Strapi resource center. +- [Strapi documentation][strapi_docs] - Official Strapi documentation. +- [Strapi tutorials][strapi_tutorials] - List of tutorials made by the core team and the community. +- [Strapi blog][strapi_docs] - Official Strapi blog containing articles made by the Strapi team and the community. +- [Changelog][strapi_changelog] - Find out about the Strapi product updates, new features and general improvements. Feel free to check out the [Strapi GitHub repository](https://github.com/strapi/strapi). Your feedback and contributions are welcome! + +[backoffice]: #updating-models-via-the-backoffce +[build]: #build +[data]: ../data/README.md +[infrastructure]: ../infrastructure/README.md +[local_backoffice]: http://localhost:1337/admin/ +[local_config_setup]: #local-config-setup +[start]: #start +[strapi]:https://strapi.io/ +[strapi_changelog]: https://strapi.io/changelog +[strapi_cli]: https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html +[strapi_cli_build]: https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html#strapi-build +[strapi_cli_develop]: https://docs.strapi.io/developer-docs/latest/developer-resources/cli/CLI.html#strapi-develop +[strapi_docs]: https://docs.strapi.io +[strapi_rc]: https://strapi.io/resource-center +[strapi_tutorials]: https://strapi.io/tutorials +[sync]: ./config/sync/ diff --git a/cms/config/sync/admin-role.strapi-super-admin.json b/cms/config/sync/admin-role.strapi-super-admin.json index 5d9f481e..81b35132 100644 --- a/cms/config/sync/admin-role.strapi-super-admin.json +++ b/cms/config/sync/admin-role.strapi-super-admin.json @@ -5,6 +5,7 @@ "permissions": [ { "action": "plugin::content-manager.explorer.create", + "actionParameters": {}, "subject": "api::contact-detail.contact-detail", "properties": { "fields": [ @@ -16,41 +17,41 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.delete", + "actionParameters": {}, "subject": "api::contact-detail.contact-detail", "properties": { "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.publish", + "actionParameters": {}, "subject": "api::contact-detail.contact-detail", "properties": { "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.read", + "actionParameters": {}, "subject": "api::contact-detail.contact-detail", "properties": { "fields": [ @@ -62,15 +63,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.update", + "actionParameters": {}, "subject": "api::contact-detail.contact-detail", "properties": { "fields": [ @@ -82,15 +83,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.create", + "actionParameters": {}, "subject": "api::data-info.data-info", "properties": { "fields": [ @@ -100,28 +101,28 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.delete", + "actionParameters": {}, "subject": "api::data-info.data-info", "properties": { "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.read", + "actionParameters": {}, "subject": "api::data-info.data-info", "properties": { "fields": [ @@ -131,15 +132,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.update", + "actionParameters": {}, "subject": "api::data-info.data-info", "properties": { "fields": [ @@ -149,15 +150,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.create", + "actionParameters": {}, "subject": "api::data-source.data-source", "properties": { "fields": [ @@ -167,28 +168,28 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.delete", + "actionParameters": {}, "subject": "api::data-source.data-source", "properties": { "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.read", + "actionParameters": {}, "subject": "api::data-source.data-source", "properties": { "fields": [ @@ -198,15 +199,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.update", + "actionParameters": {}, "subject": "api::data-source.data-source", "properties": { "fields": [ @@ -216,15 +217,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.create", + "actionParameters": {}, "subject": "api::data-tool-ecosystem.data-tool-ecosystem", "properties": { "fields": [ @@ -232,41 +233,41 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.delete", + "actionParameters": {}, "subject": "api::data-tool-ecosystem.data-tool-ecosystem", "properties": { "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.publish", + "actionParameters": {}, "subject": "api::data-tool-ecosystem.data-tool-ecosystem", "properties": { "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.read", + "actionParameters": {}, "subject": "api::data-tool-ecosystem.data-tool-ecosystem", "properties": { "fields": [ @@ -274,15 +275,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.update", + "actionParameters": {}, "subject": "api::data-tool-ecosystem.data-tool-ecosystem", "properties": { "fields": [ @@ -290,15 +291,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.create", + "actionParameters": {}, "subject": "api::data-tool-language.data-tool-language", "properties": { "fields": [ @@ -308,41 +309,41 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.delete", + "actionParameters": {}, "subject": "api::data-tool-language.data-tool-language", "properties": { "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.publish", + "actionParameters": {}, "subject": "api::data-tool-language.data-tool-language", "properties": { "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.read", + "actionParameters": {}, "subject": "api::data-tool-language.data-tool-language", "properties": { "fields": [ @@ -352,15 +353,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.update", + "actionParameters": {}, "subject": "api::data-tool-language.data-tool-language", "properties": { "fields": [ @@ -370,15 +371,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.create", + "actionParameters": {}, "subject": "api::data-tool-resource-type.data-tool-resource-type", "properties": { "fields": [ @@ -386,41 +387,41 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.delete", + "actionParameters": {}, "subject": "api::data-tool-resource-type.data-tool-resource-type", "properties": { "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.publish", + "actionParameters": {}, "subject": "api::data-tool-resource-type.data-tool-resource-type", "properties": { "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.read", + "actionParameters": {}, "subject": "api::data-tool-resource-type.data-tool-resource-type", "properties": { "fields": [ @@ -428,15 +429,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.update", + "actionParameters": {}, "subject": "api::data-tool-resource-type.data-tool-resource-type", "properties": { "fields": [ @@ -444,15 +445,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.create", + "actionParameters": {}, "subject": "api::data-tool.data-tool", "properties": { "fields": [ @@ -466,41 +467,41 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.delete", + "actionParameters": {}, "subject": "api::data-tool.data-tool", "properties": { "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.publish", + "actionParameters": {}, "subject": "api::data-tool.data-tool", "properties": { "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.read", + "actionParameters": {}, "subject": "api::data-tool.data-tool", "properties": { "fields": [ @@ -514,15 +515,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.update", + "actionParameters": {}, "subject": "api::data-tool.data-tool", "properties": { "fields": [ @@ -536,15 +537,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.create", + "actionParameters": {}, "subject": "api::dataset.dataset", "properties": { "fields": [ @@ -554,41 +555,41 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.delete", + "actionParameters": {}, "subject": "api::dataset.dataset", "properties": { "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.publish", + "actionParameters": {}, "subject": "api::dataset.dataset", "properties": { "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.read", + "actionParameters": {}, "subject": "api::dataset.dataset", "properties": { "fields": [ @@ -598,15 +599,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.update", + "actionParameters": {}, "subject": "api::dataset.dataset", "properties": { "fields": [ @@ -616,15 +617,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.create", + "actionParameters": {}, "subject": "api::environment.environment", "properties": { "fields": [ @@ -633,28 +634,28 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.delete", + "actionParameters": {}, "subject": "api::environment.environment", "properties": { "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.read", + "actionParameters": {}, "subject": "api::environment.environment", "properties": { "fields": [ @@ -663,15 +664,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.update", + "actionParameters": {}, "subject": "api::environment.environment", "properties": { "fields": [ @@ -680,15 +681,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.create", + "actionParameters": {}, "subject": "api::fishing-protection-level-stat.fishing-protection-level-stat", "properties": { "fields": [ @@ -698,18 +699,18 @@ "pct" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.delete", + "actionParameters": {}, "subject": "api::fishing-protection-level-stat.fishing-protection-level-stat", "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.read", + "actionParameters": {}, "subject": "api::fishing-protection-level-stat.fishing-protection-level-stat", "properties": { "fields": [ @@ -719,11 +720,11 @@ "pct" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.update", + "actionParameters": {}, "subject": "api::fishing-protection-level-stat.fishing-protection-level-stat", "properties": { "fields": [ @@ -733,11 +734,11 @@ "pct" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.create", + "actionParameters": {}, "subject": "api::fishing-protection-level.fishing-protection-level", "properties": { "fields": [ @@ -747,28 +748,28 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.delete", + "actionParameters": {}, "subject": "api::fishing-protection-level.fishing-protection-level", "properties": { "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.read", + "actionParameters": {}, "subject": "api::fishing-protection-level.fishing-protection-level", "properties": { "fields": [ @@ -778,15 +779,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.update", + "actionParameters": {}, "subject": "api::fishing-protection-level.fishing-protection-level", "properties": { "fields": [ @@ -796,15 +797,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.create", + "actionParameters": {}, "subject": "api::habitat-stat.habitat-stat", "properties": { "fields": [ @@ -816,18 +817,18 @@ "environment" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.delete", + "actionParameters": {}, "subject": "api::habitat-stat.habitat-stat", "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.read", + "actionParameters": {}, "subject": "api::habitat-stat.habitat-stat", "properties": { "fields": [ @@ -839,11 +840,11 @@ "environment" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.update", + "actionParameters": {}, "subject": "api::habitat-stat.habitat-stat", "properties": { "fields": [ @@ -855,11 +856,11 @@ "environment" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.create", + "actionParameters": {}, "subject": "api::habitat.habitat", "properties": { "fields": [ @@ -869,28 +870,28 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.delete", + "actionParameters": {}, "subject": "api::habitat.habitat", "properties": { "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.read", + "actionParameters": {}, "subject": "api::habitat.habitat", "properties": { "fields": [ @@ -900,15 +901,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.update", + "actionParameters": {}, "subject": "api::habitat.habitat", "properties": { "fields": [ @@ -918,15 +919,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.create", + "actionParameters": {}, "subject": "api::layer.layer", "properties": { "fields": [ @@ -952,41 +953,41 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.delete", + "actionParameters": {}, "subject": "api::layer.layer", "properties": { "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.publish", + "actionParameters": {}, "subject": "api::layer.layer", "properties": { "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.read", + "actionParameters": {}, "subject": "api::layer.layer", "properties": { "fields": [ @@ -1012,15 +1013,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.update", + "actionParameters": {}, "subject": "api::layer.layer", "properties": { "fields": [ @@ -1046,15 +1047,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.create", + "actionParameters": {}, "subject": "api::location.location", "properties": { "fields": [ @@ -1076,18 +1077,18 @@ "marine_target_year" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.delete", + "actionParameters": {}, "subject": "api::location.location", "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.read", + "actionParameters": {}, "subject": "api::location.location", "properties": { "fields": [ @@ -1109,11 +1110,11 @@ "marine_target_year" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.update", + "actionParameters": {}, "subject": "api::location.location", "properties": { "fields": [ @@ -1135,11 +1136,11 @@ "marine_target_year" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.create", + "actionParameters": {}, "subject": "api::mpa-iucn-category.mpa-iucn-category", "properties": { "fields": [ @@ -1149,28 +1150,28 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.delete", + "actionParameters": {}, "subject": "api::mpa-iucn-category.mpa-iucn-category", "properties": { "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.read", + "actionParameters": {}, "subject": "api::mpa-iucn-category.mpa-iucn-category", "properties": { "fields": [ @@ -1180,15 +1181,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.update", + "actionParameters": {}, "subject": "api::mpa-iucn-category.mpa-iucn-category", "properties": { "fields": [ @@ -1198,15 +1199,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.create", + "actionParameters": {}, "subject": "api::mpaa-establishment-stage.mpaa-establishment-stage", "properties": { "fields": [ @@ -1216,28 +1217,28 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.delete", + "actionParameters": {}, "subject": "api::mpaa-establishment-stage.mpaa-establishment-stage", "properties": { "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.read", + "actionParameters": {}, "subject": "api::mpaa-establishment-stage.mpaa-establishment-stage", "properties": { "fields": [ @@ -1247,15 +1248,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.update", + "actionParameters": {}, "subject": "api::mpaa-establishment-stage.mpaa-establishment-stage", "properties": { "fields": [ @@ -1265,15 +1266,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.create", + "actionParameters": {}, "subject": "api::mpaa-protection-level-stat.mpaa-protection-level-stat", "properties": { "fields": [ @@ -1283,18 +1284,18 @@ "location" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.delete", + "actionParameters": {}, "subject": "api::mpaa-protection-level-stat.mpaa-protection-level-stat", "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.read", + "actionParameters": {}, "subject": "api::mpaa-protection-level-stat.mpaa-protection-level-stat", "properties": { "fields": [ @@ -1304,11 +1305,11 @@ "location" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.update", + "actionParameters": {}, "subject": "api::mpaa-protection-level-stat.mpaa-protection-level-stat", "properties": { "fields": [ @@ -1318,11 +1319,11 @@ "location" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.create", + "actionParameters": {}, "subject": "api::mpaa-protection-level.mpaa-protection-level", "properties": { "fields": [ @@ -1332,28 +1333,28 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.delete", + "actionParameters": {}, "subject": "api::mpaa-protection-level.mpaa-protection-level", "properties": { "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.read", + "actionParameters": {}, "subject": "api::mpaa-protection-level.mpaa-protection-level", "properties": { "fields": [ @@ -1363,15 +1364,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.update", + "actionParameters": {}, "subject": "api::mpaa-protection-level.mpaa-protection-level", "properties": { "fields": [ @@ -1381,15 +1382,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.create", + "actionParameters": {}, "subject": "api::pa.pa", "properties": { "fields": [ @@ -1411,18 +1412,18 @@ "parent" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.delete", + "actionParameters": {}, "subject": "api::pa.pa", "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.read", + "actionParameters": {}, "subject": "api::pa.pa", "properties": { "fields": [ @@ -1444,11 +1445,11 @@ "parent" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.update", + "actionParameters": {}, "subject": "api::pa.pa", "properties": { "fields": [ @@ -1470,11 +1471,11 @@ "parent" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.create", + "actionParameters": {}, "subject": "api::protection-coverage-stat.protection-coverage-stat", "properties": { "fields": [ @@ -1490,18 +1491,18 @@ "global_contribution" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.delete", + "actionParameters": {}, "subject": "api::protection-coverage-stat.protection-coverage-stat", "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.read", + "actionParameters": {}, "subject": "api::protection-coverage-stat.protection-coverage-stat", "properties": { "fields": [ @@ -1517,11 +1518,11 @@ "global_contribution" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.update", + "actionParameters": {}, "subject": "api::protection-coverage-stat.protection-coverage-stat", "properties": { "fields": [ @@ -1537,11 +1538,11 @@ "global_contribution" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.create", + "actionParameters": {}, "subject": "api::protection-status.protection-status", "properties": { "fields": [ @@ -1551,28 +1552,28 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.delete", + "actionParameters": {}, "subject": "api::protection-status.protection-status", "properties": { "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.read", + "actionParameters": {}, "subject": "api::protection-status.protection-status", "properties": { "fields": [ @@ -1582,15 +1583,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.update", + "actionParameters": {}, "subject": "api::protection-status.protection-status", "properties": { "fields": [ @@ -1600,15 +1601,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.create", + "actionParameters": {}, "subject": "api::static-indicator.static-indicator", "properties": { "fields": [ @@ -1619,41 +1620,41 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.delete", + "actionParameters": {}, "subject": "api::static-indicator.static-indicator", "properties": { "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.publish", + "actionParameters": {}, "subject": "api::static-indicator.static-indicator", "properties": { "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.read", + "actionParameters": {}, "subject": "api::static-indicator.static-indicator", "properties": { "fields": [ @@ -1664,15 +1665,15 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.update", + "actionParameters": {}, "subject": "api::static-indicator.static-indicator", "properties": { "fields": [ @@ -1683,232 +1684,232 @@ ], "locales": [ "en", - "es", - "fr" + "fr", + "es" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::api-tokens.access", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::api-tokens.create", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::api-tokens.delete", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::api-tokens.read", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::api-tokens.regenerate", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::api-tokens.update", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::marketplace.read", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::project-settings.read", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::project-settings.update", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::roles.create", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::roles.delete", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::roles.read", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::roles.update", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::transfer.tokens.access", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::transfer.tokens.create", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::transfer.tokens.delete", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::transfer.tokens.read", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::transfer.tokens.regenerate", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::transfer.tokens.update", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::users.create", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::users.delete", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::users.read", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::users.update", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::webhooks.create", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::webhooks.delete", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::webhooks.read", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "admin::webhooks.update", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::config-sync.menu-link", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::config-sync.settings.read", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.collection-types.configure-view", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.components.configure-layout", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.create", + "actionParameters": {}, "subject": "plugin::users-permissions.user", "properties": { "fields": [ @@ -1923,18 +1924,18 @@ "role" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.delete", + "actionParameters": {}, "subject": "plugin::users-permissions.user", "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.read", + "actionParameters": {}, "subject": "plugin::users-permissions.user", "properties": { "fields": [ @@ -1949,11 +1950,11 @@ "role" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.explorer.update", + "actionParameters": {}, "subject": "plugin::users-permissions.user", "properties": { "fields": [ @@ -1968,218 +1969,217 @@ "role" ] }, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-manager.single-types.configure-view", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::content-type-builder.read", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::documentation.read", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::documentation.settings.read", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::documentation.settings.regenerate", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::documentation.settings.update", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::email.settings.read", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::i18n.locale.create", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::i18n.locale.delete", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::i18n.locale.read", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::i18n.locale.update", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::import-export-entries.export", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::import-export-entries.import", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::upload.assets.copy-link", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::upload.assets.create", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::upload.assets.download", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::upload.assets.update", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::upload.configure-view", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::upload.read", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::upload.settings.read", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::users-permissions.advanced-settings.read", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::users-permissions.advanced-settings.update", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::users-permissions.email-templates.read", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::users-permissions.email-templates.update", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::users-permissions.providers.read", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::users-permissions.providers.update", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::users-permissions.roles.create", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::users-permissions.roles.delete", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::users-permissions.roles.read", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] }, { "action": "plugin::users-permissions.roles.update", + "actionParameters": {}, "subject": null, "properties": {}, - "conditions": [], - "actionParameters": {} + "conditions": [] } ] } \ No newline at end of file diff --git a/frontend/README.md b/frontend/README.md index 82a37574..d923b985 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -1,8 +1,9 @@ # Frontend +This directory contains the code for the Nextjs, React application that is the user interface for the [30x30 application][30x30]. ## Config -The client needs to be configured with settings for accessig the API and external services. Please check the `.env.default` file for required environment variables. Those are set partially by Terraform in GH Secrets, and then passed into the docker images during deployment by GH Actions. Some are managed manually in GH Secrets. Please refer to [infrastructure documentation](../infrastructure/README.md) for details. +The client needs to be configured with settings for accessing the API and external services. Please check the `.env.default` file for required environment variables. Those are set partially by Terraform in GH Secrets, and then passed into the docker images during deployment by GH Actions. Some are managed manually in GH Secrets. Please refer to [infrastructure documentation](../infrastructure/README.md) for details. See [HubSpot configuration details](../hubspot.md). @@ -10,7 +11,7 @@ See [HubSpot configuration details](../hubspot.md). ### Install -Go to the `client/` directory and install the dependencies: +Go to the `frontend/` directory and install the dependencies: ```bash yarn install @@ -22,6 +23,9 @@ Copy the .env.example file to .env.default and fill in the fields with values fr `HTTP_AUTH_*` and `NEXTAUTH_*` fields enable temporary auth with a hardcoded user/pass for pre-launch purposes. If all fields are set, a username and password will be required. Auth details are available on LastPass. +### Automatic Type Building +This app makes use of [Orval][orval] to automatically generate types and data fetching hooks for endpoints created by the [Strapi API][strapi]. These types and helper functions are generated using files that are created at build time for the Strapi API and are re-built when starting the dev server. Before starting the dev server it's good to make sure you have the most up-to-date build of the API. Please Follow the [instructions to build the API][cms_build] when you first clone the repo and every time you pull an update from `main`. + ### Start Start the client with: @@ -36,3 +40,8 @@ To run with docker: docker-compose up --build Open the app at http://localhost:3000 + +[30x30]: https://30x30.skytruth.org/ +[cms]: ../cms/README.md +[cms_build]: ../cms/README.md#build +[orval]: https://orval.dev/overview \ No newline at end of file diff --git a/frontend/src/containers/map/sidebar/main-panel/panels/modelling/index.tsx b/frontend/src/containers/map/sidebar/main-panel/panels/modelling/index.tsx index 207d84e1..229aef10 100644 --- a/frontend/src/containers/map/sidebar/main-panel/panels/modelling/index.tsx +++ b/frontend/src/containers/map/sidebar/main-panel/panels/modelling/index.tsx @@ -1,4 +1,4 @@ -import { useCallback, useEffect, useMemo, useRef } from 'react'; +import { useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { useAtomValue } from 'jotai'; import { useTranslations } from 'next-intl'; @@ -6,8 +6,6 @@ import { useTranslations } from 'next-intl'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'; import { modellingAtom } from '@/containers/map/store'; import { useSyncMapContentSettings } from '@/containers/map/sync-settings'; -import useScrollPosition from '@/hooks/use-scroll-position'; -import { cn } from '@/lib/classnames'; import { FCWithMessages } from '@/types'; import LocationSelector from '../../location-selector'; @@ -19,8 +17,10 @@ import ModellingWidget from './widget'; const SidebarModelling: FCWithMessages = () => { const t = useTranslations('containers.map-sidebar-main-panel'); + const [headerSize, setHeaderSize] = useState(null); + + const contentRef = useRef(null); const containerRef = useRef(null); - const containerScroll = useScrollPosition(containerRef); const { status: modellingStatus } = useAtomValue(modellingAtom); const [{ tab }, setSettings] = useSyncMapContentSettings(); @@ -35,7 +35,7 @@ const SidebarModelling: FCWithMessages = () => { // Scroll to the top when the tab changes (whether that's initiated by clicking on the tab trigger // or programmatically via `setSettings` in a different component) useEffect(() => { - containerRef.current?.scrollTo({ top: 0 }); + contentRef.current?.scrollTo({ top: 0 }); }, [tab]); // This page doesn't have a summary tab so we force the user to see the terrestrial tab if the @@ -46,17 +46,41 @@ const SidebarModelling: FCWithMessages = () => { } }, [setSettings, tab]); + // Dynamically shrink the panel header based on available height + useEffect(() => { + const updateHeight = () => { + if (containerRef.current) { + let textSize = 'text-xl'; + const { + current: { clientHeight }, + } = containerRef; + + if (clientHeight <= 700 && clientHeight > 630) { + textSize = 'text-3xl'; + } + if (clientHeight > 700) { + textSize = 'text-5xl'; + } + setHeaderSize(textSize); + } + }; + + updateHeight(); + window.addEventListener('resize', updateHeight); + + return () => window.removeEventListener('resize', updateHeight); + }, []); + return ( - +
-

0, - })} - > +

{showIntro ? t('conservation-scenarios') : t('custom-area')}

@@ -66,7 +90,7 @@ const SidebarModelling: FCWithMessages = () => { {t('marine')}
-
+
{showIntro && } {!showIntro && } diff --git a/frontend/translations/en.json b/frontend/translations/en.json index 909b1cb5..3d631ae2 100644 --- a/frontend/translations/en.json +++ b/frontend/translations/en.json @@ -215,7 +215,7 @@ "re-draw": "Re-draw", "how-to-draw": "How to draw a custom area on the map, using the drawing functionality?", "step-1-alt": "Step 01", - "step-1-description": "Click on the Draw a shape button located above, in the blue section at the top of the panel.", + "step-1-description": "Click on the Draw a shape button located below.", "step-2-alt": "Step 02", "step-2-description": "Start drawing on the map by clicking. Each click adds an anchor point. All sides of the polygon are connected through anchor points.", "step-3-alt": "Step 03",