Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api-ui): add inflow structure form #1919

Merged
merged 10 commits into from
Feb 1, 2024

Conversation

hdinia
Copy link
Member

@hdinia hdinia commented Jan 31, 2024

ANT-983: https://gopro-tickets.rte-france.com/browse/ANT-983

This PR introduces backend and frontend changes to support the management of inflow structure form values within the hydraulic configuration of a study. It includes the implementation of RESTful API endpoints for retrieving and updating inflow structure values, as well as the corresponding frontend UI components to interact with these endpoints.

Backend Changes

New Endpoints:

GET /studies/{study_id}/areas/{area_id}/hydro/inflowstructure
Retrieves the inflow structure form values for a given area of a study.
PUT /studies/{study_id}/areas/{area_id}/hydro/inflowstructure
Updates the inflow structure form values for a given area of a study.

Models:

Introduced a new model InflowStructure to represent the inflow structure form values, currently encapsulating an inter_monthly_correlation field with validation constraints.

Services:

Modified study_service to include hydro_manager methods for getting and updating the inflow structure values based on the study and area ID.

Frontend Changes

  • Implemented a new form component InflowStructure within the study configuration area to provide a UI for viewing and modifying the inflow structure values. This component includes validation and error handling for the input field.
  • New form prop added on SplitHydroMatrix to enable the display of a form in the same view
  • Implemented utility functions getInflowStructureFields and updateInflowStructureFields to interact with the backend API for fetching and updating inflow structure data.

@hdinia hdinia self-assigned this Jan 31, 2024
@hdinia hdinia changed the title Feature/983 add inflow pattern form feat(api-ui): add inflow pattern form Jan 31, 2024
@hdinia hdinia force-pushed the feature/983-add-inflow-pattern-form branch 3 times, most recently from e0ee786 to be9f17b Compare January 31, 2024 15:45
@hdinia hdinia changed the title feat(api-ui): add inflow pattern form feat(api-ui): add inflow structure form Jan 31, 2024
@skamril skamril force-pushed the feature/983-add-inflow-pattern-form branch from af903d7 to 1b8aa01 Compare February 1, 2024 11:17
@laurent-laporte-pro laurent-laporte-pro force-pushed the feature/983-add-inflow-pattern-form branch from 9d07da0 to 4283833 Compare February 1, 2024 15:19
@laurent-laporte-pro laurent-laporte-pro merged commit a5ab20d into dev Feb 1, 2024
6 checks passed
@laurent-laporte-pro laurent-laporte-pro deleted the feature/983-add-inflow-pattern-form branch February 1, 2024 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants