[N/A] custom-project creation: restoration #159
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several updates to the project form components to support restoration activities and improve form handling. The changes primarily focus on adding support for restoration plans and enhancing existing form components to handle new parameters.
Enhancements for Restoration Activities:
client/src/containers/projects/form/restoration-plan/index.tsx
: Introduced a newRestorationPlanProjectForm
component to handle restoration plans, including a table for annual hectares restored and validation logic.client/src/containers/projects/form/restoration-plan/columns.tsx
: Defined columns for the restoration plan table, including aCellValue
component for input fields.client/src/containers/projects/form/index.tsx
: Updated the mainProjectForm
component to conditionally render theRestorationPlanProjectForm
based on the activity type. [1] [2]Form Handling Improvements:
client/src/containers/projects/form/cell-value.tsx
: Enhanced theCellValue
component to accept additional props (className
andhasUnit
) and applied conditional styling. [1] [2]client/src/containers/projects/form/cost-inputs-overrides/capex/index.tsx
: Added support forrestorationActivity
in theCapexCostInputsTable
component, including conditional enabling logic. [1] [2]client/src/containers/projects/form/cost-inputs-overrides/opex/index.tsx
: Similar updates for theOpexCostInputsTable
component to handlerestorationActivity
. [1] [2]client/src/containers/projects/form/cost-inputs-overrides/other/index.tsx
: Updated theOtherCostInputsTable
component to includerestorationActivity
support. [1] [2]Additional Improvements:
client/src/containers/projects/form/setup/conservation-project-details/loss-rate.tsx
: Added a success check for fetching activity type defaults to ensure data is available before rendering.client/src/containers/projects/form/setup/conservation-project-details/t1-global-emission-factor.tsx
: Added a success check for fetching activity type defaults.client/src/containers/projects/form/setup/conservation-project-details/t2-national-emission-factors.tsx
: Added a success check for fetching activity type defaults.